アクティビティ内のアクションバーを削除する正しい方法はどれですか?Holoeverywhere:実行時にアクティビティからアクションバーをプログラムで削除する方法
私の活動は、私は、この静的コードorg.holoeverywhere.app.Applicationを拡張するカスタムアプリケーションのクラスをしましたし、スタートアップの幹部でorg.holoeverywhere.app.Activity
を拡張:中
ThemeManager.setDefaultTheme(ThemeManager.DARK);
ThemeManager.map(ThemeManager.DARK, R.style.Holo_Demo_Theme);
ThemeManager.map(ThemeManager.LIGHT, R.style.Holo_Demo_Theme_Light);
ThemeManager.map(ThemeManager.MIXED, R.style.Holo_Demo_Theme_Light_DarkActionBar);
ThemeManager.map(ThemeManager.DARK | ThemeManager.FULLSCREEN, R.style.Holo_Demo_Theme_Fullscreen);
ThemeManager.map(ThemeManager.LIGHT | ThemeManager.FULLSCREEN, R.style.Holo_Demo_Theme_Light_Fullscreen);
ThemeManager.map(ThemeManager.MIXED | ThemeManager.FULLSCREEN, R.style.Holo_Demo_Theme_Light_DarkActionBar_Fullscreen);
を私の活動:
protected void onCreate(Bundle savedInstanceState) {
ThemeManager.removeTheme(this);
setTheme(ThemeManager.DARK | ThemeManager.FULLSCREEN);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
私はバーが削除され-table- android 4.1.1
に、コードでrequestWindowFeature(Window.FEATURE_NO_TITLE)
を追加する場合 携帯電話の場合-android 2.3.3
- バーは削除されません。 holoeverywhereすべてを導入する前
は、実行時にholoeverywhereでアクションバーを削除する正しい方法があるだけrequestWindowFeature(Window.FEATURE_NO_TITLE).
でうまく働い?
Prototikありがとう、それは動作します。 – Maxj
またsetTheme(ThemeManager.DARK | ThemeManager.NO_ACTION_BAR)で動作します。私はNO_ACTION_BARの代わりにThemeManager.FULLSCREENを使用していました – Maxj