Jed Grant
Jed Grant

Reputation: 1425

Removing title bar changes display of ProgressDialog

In my android app, which is just a webview displaying a responsive web site, I want to remove the title bar so I add this to the application section of the manifest XML.

 android:theme="@android:style/Theme.NoTitleBar"

The problem is, I get two totally different ProgressDialog UI treatments. The one with the title bar is much nicer so I would like to keep it, but I don't want a title bar.

I believe this relates to the theme. I want to keep the theme, just not the title bar... at least I think. How do I keep the nicer styling, and hide the title bar instantly (not programmatically once the activity starts, that shows the title bar briefly)?

Upvotes: 0

Views: 460

Answers (1)

Budius
Budius

Reputation: 39856

The problem is that Theme.NoTitleBar comes from pre-Honeycomb era, so it shows a pre-Honeycomb dialog.

If your app is API 11 or up you can simply switch by the Holo version of it (I honestly don't remember the name).

Or to support both older and newer device you'll have to use this type of approach Different Theme for different Android SDK versions to apply Theme.NoTitleBar to old devices and its holo counterpart for newer devices.

happy coding.

Upvotes: 1

Related Questions