Closed Bug 744987 Opened 8 years ago Closed 8 years ago
Avoid initialize message in Gecko
When the first optimizations in startup landed, the idea was to delay initializing until we show the UI. Later another optimization landed which showed the ActionBar in XML and the textured background as a part of WindowBackground -- thereby UI is shown way faster than onCreate() actually does setContentView(). This removes the necessity for sending a delayed message for the UI thread in onResume(). Also, it is highly recommended to have the initial UI setup in onWindowFocusChanged(). This is exactly where the activity becomes visible to the user.
Blogs about using onWindowFocusChanged(): http://damianflannery.wordpress.com/2011/06/08/start-animation-in-oncreate-or-onresume-on-android/ http://researcharea.blogspot.com/2011/03/onwindowfocuschanged-method-in-android.html
Assignee: nobody → sriram
This patch reverts back GeckoAppHandler to default Handler, moves the initialize from onResume() to onWindowFocusChanged().
Comment on attachment 614591 [details] [diff] [review] Patch Looks like a good backout of the GeckoHandler and message code. The docs for onWindowFocusChanged seem to suggest it is a good spot to init the UI and you are calling the super method. Also want Brad's review for the cleanup to make sure this is what he had in mind.
Attachment #614591 - Flags: review?(blassey.bugs) → review+
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.