Search code examples
androidthemesandroid-manifesttitlebar

Getting Title Bar on specific Activity when Theme.NoTitleBar is applied to application


Suppose I have an android app with android:theme="@android:style/Theme.NoTitleBar" applied to the application element in the manifest.

Is it possible, for a specific activity, to deviate from this application-wide theme and declaratively (i.e. through the manifest) get a title bar for that activity?

Thanks.


Solution

  • The non-declarative solution proposed by @arun-c-thomas put me on the right path:

    Applying @android:style/Theme.DeviceDefault reverts the no-titlebar theme. It is not ideal in that it applies a full theme that would also revert other customizations that might have been in place, but in my case this is not an issue.