2

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.

4

1 回答 1

1

KRepaintManager.paintImmediately(root, true)是让整个屏幕闪烁的正确方法——有时你仍然会得到伪像,但你无能为力。通常点击Menu按钮会刷新屏幕。

于 2012-04-09T10:13:46.590 回答