nascondere la barra di stato su Android 4.0 e Bassa
Impostando il tema di applicazione nel file di manifest.xml.
android:theme="@android:style/Theme.Holo.NoActionBar.Fullscreen"
O
Scrivendo il codice Java in modo onCreate() di attività.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// If the Android version is lower than Jellybean, use this call to hide
// the status bar.
if (Build.VERSION.SDK_INT < 16) {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
setContentView(R.layout.activity_main);
}
nascondere la barra di stato su Android 4.1 e superiore
Scrivendo codice Java in() metodo di attività onCreate.
View decorView = getWindow().getDecorView();
// Hide the status bar.
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
// Remember that you should never show the action bar if the
// status bar is hidden, so hide that too if necessary.
ActionBar actionBar = getActionBar();
actionBar.hide();
fonte
2015-11-15 11:00:34
http://stackoverflow.com/questions/33692388/android-remove-actionbar-title-keeping-toolbar-menu/33692402#33692402 –
barra di stato è quello che voglio rimosso, non barra delle azioni . – user5495265