onstart

When is the Android Fragment onCreateOptionsMenu method called?

Android FAQ: When is the Android Fragment onCreateOptionsMenu method called?

I was just working through a problem with an Android Menu and MenuItem, and added some debug code to the methods in my Android Fragment, and found that the onCreateOptionsMenu method is called after onStart. I didn’t put Log/debug code in every activity lifecycle method, but for the ones I did add logging code to, the specific order of the fragment method calls looked like this:

How to populate sample data when a Play Framework application starts up

If you ever need an example of how to do something when a Play Framework application starts up, check out the Zentasks application in the Play distribution samples directory. You'll find the following code in the Global.scala file in the app subdirectory of the project. It shows how to use the onStart method of the Global object to populate some sample data when the Play Framework app starts up.

Here's the source code for that class:

Android Handler and ProgressBar example

This is an Android Handler and ProgressBar example, from the excellent book, Beginning Android 3. (See the URL that I have linked to.)