Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Android 3.2 remove title from action bar
- @Override
- public void onCreate(Bundle savedInstanceState)
- {
- ActionBar actionBar = getActionBar();
- actionBar.setDisplayShowTitleEnabled(false);
- actionBar.setDisplayShowHomeEnabled(false);
- super.onCreate(savedInstanceState);
- setContentView(R.layout.test);
- }
- <activity android:name=".ActivityHere"
- android:label="">
- <resources>
- <style name="ActionBar.CustomTheme" parent="@android:style/Widget.Holo.ActionBar"/>
- <style name="CustomTheme" parent="@android:style/Theme.Holo">
- <item name="android:actionBarStyle">@style/ActionBar.CustomTheme</item>
- </style>
- </resources>
- <application
- android:theme="@style/CustomTheme
- ...
- <activity
- android:name="MainActivity"
- android:theme="@android:style/Theme.Holo.NoActionBar">
- ...
- @Override
- public void onCreate()(Bundle savedInstanceState)
- {
- super.onCreate(savedInstanceState);
- setTheme(R.style.CustomTheme); // Set the custom theme which has the action bar.
- ActionBar actionBar = getActionBar();
- ...
Advertisement
Add Comment
Please, Sign In to add comment