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.

nisha.113a5
  • 2,024
  • 16
  • 30

1 Answers1

1

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 the Menu button in general will refresh the screen similarly.

Waynn Lue
  • 11,344
  • 8
  • 51
  • 76
  • Thank you so much for solution. I have used KPages Component. This component contains 100 pages. Each page contains UI. While navigating through pages, I can see ghosting on screen. During back and forward navigation, I wanted to repaint the screen. – nisha.113a5 Apr 09 '12 at 11:02