Home > android, ui > Showing progress wheel in the window title

Showing progress wheel in the window title

This is a follow-up to my earlier post about customizing Andorid window title bar for showing a progress wheel.

I’ve since found a much easier way to do this, without having to create a custom window title. The standard Android window title bar (found in platforms\android-X\data\res\layout\screen.xml) already has a wheel-style progress indicator, but I didn’t know how to make it visible until recently.

Here is how:

// Somewhere in onCreate:

requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);

// setContentView here

setProgressBarIndeterminateVisibility(true / false);

Even though the last method call above has the word “bar” in it, this displays a spinning wheel on the right side of the window title bar.

Advertisements
Categories: android, ui

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s