【问题标题】:How to hide (or remove) Action Bar at run time in android application [duplicate]如何在运行时在android应用程序中隐藏(或删除)操作栏[重复]
【发布时间】:2018-09-07 00:37:50
【问题描述】:

我创建了一个应用程序。有一个登录活动,所以我只想在运行时删除操作栏。 我该怎么办???

您可以在图片中看到蓝色的操作栏。我只想删除它。

谢谢

【问题讨论】:

  • 感谢它的工作。

标签: java android android-actionbar


【解决方案1】:

如果您正在使用 AppCompatActivity,那么您可以执行操作:

// to hide the action bar
getSupportActionBar().hide();
// to show the action bar
getSupportActionBar().show();

如果您正在使用 Activity,那么您可以执行操作:

// to hide the action bar
getActionBar().hide();
// to show the action bar
getActionBar().show();

注意:此作品仅限您使用Action Bar主题

【讨论】:

  • 谢谢 问题解决了。
  • 如果它适合您 TIA,请您接受答案
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-10-02
  • 1970-01-01
相关资源
最近更新 更多