I am working on an android aap and i want to hide action bar for small screen (240x320) only not for normal and large screen. Is it possible to hide if it is then how?
Asked
Active
Viewed 232 times
1
-
1Use `getActionBar().hide()`. – Anggrayudi H Mar 21 '15 at 04:21
2 Answers
4
then you need to get the dimenstion first..
here's how to get the dimension:
Display display = getWindowManager().getDefaultDisplay();
int width = display.getWidth();
int height = display.getHeight();
see answers here on how to get the screen dimension
here's how to hide action bar
getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
getActionBar().hide();
Addition for v7 support actionbar user, the code will be:
getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
getSupportActionBar().hide();

Community
- 1
- 1

Dyrandz Famador
- 4,499
- 5
- 25
- 40
2
Hide the Status Bar on Android 4.0 and Lower
<application
...
android:theme="@android:style/Theme.Holo.NoActionBar.Fullscreen" >
...
Or Must be before setting the layout.
requestWindowFeature(Window.FEATURE_NO_TITLE);
For more information you may visit Here .

IntelliJ Amiya
- 74,896
- 15
- 165
- 198