如何解决Kindle屏幕重影问题?
我在我的主类中使用 start() 中的 KRepaintManager.paintImmediately(root, true) 来扩展 AbstractKindlet 来刷新屏幕,但仍然存在重影问题。当按下并关闭菜单时 - 屏幕会变清晰。我想知道菜单关闭后代码在做什么?
如何解决 Kindle 设备重影问题?
代码:
KPages pages = new KPages() {
/**
* A place holder serialization version ID
*/
private static final long serialVersionUID = 1L;
/** {@inheritDoc} */
public Insets getInsets() {
return new Insets(00, 20, 20, 20);
}
};
public static void flashScreen()
{
EventQueue.invokeLater(new Runnable(){
public void run(){
KRepaintManager.currentManager(pages).addDirtyRegion(pages, 0, 0, pages.getWidth(), pages.getHeight());
KRepaintManager.currentManager(pages).paintDirtyRegions(true);
}
});
}
在 KPages 的后退、前进导航时调用 flashScreen()。
I am using KRepaintManager.paintImmediately(root, true) from start() in my main class that extends AbstractKindlet to refresh the screen, but there are still ghosting issue there. When pressing and dismissing Menu - the screen clears up. I am wondering what code is doing after the Menu is dismissed?
How to resolve ghosting issue Kindle device?
Code:
KPages pages = new KPages() {
/**
* A place holder serialization version ID
*/
private static final long serialVersionUID = 1L;
/** {@inheritDoc} */
public Insets getInsets() {
return new Insets(00, 20, 20, 20);
}
};
public static void flashScreen()
{
EventQueue.invokeLater(new Runnable(){
public void run(){
KRepaintManager.currentManager(pages).addDirtyRegion(pages, 0, 0, pages.getWidth(), pages.getHeight());
KRepaintManager.currentManager(pages).paintDirtyRegions(true);
}
});
}
Calling flashScreen() while back, forward navigation of KPages.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
KRepaintManager.paintImmediately(root, true)
是闪烁整个屏幕的正确方法 - 有时您仍然会遇到伪像,但您无法阻止这种情况发生。一般情况下,点击Menu
按钮也会刷新屏幕。KRepaintManager.paintImmediately(root, true)
is the correct way to flash the entire screen -- sometimes you'll end up with artifacts, still, but there's nothing you can do to prevent that. Hitting theMenu
button in general will refresh the screen similarly.