【发布时间】:2018-09-07 00:37:50
【问题描述】:
我创建了一个应用程序。有一个登录活动,所以我只想在运行时删除操作栏。 我该怎么办???
见
您可以在图片中看到蓝色的操作栏。我只想删除它。
谢谢
【问题讨论】:
-
感谢它的工作。
标签: java android android-actionbar
我创建了一个应用程序。有一个登录活动,所以我只想在运行时删除操作栏。 我该怎么办???
见
您可以在图片中看到蓝色的操作栏。我只想删除它。
谢谢
【问题讨论】:
标签: java android android-actionbar
如果您正在使用 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的主题。
【讨论】: