android:当主题设置为NoTitleBar.Fullscreen时启用活动标题
我有一个应用程序,我已将其主题属性设置为可以
@android:style/Theme.Black.NoTitleBar.Fullscreen
正常工作,因为我的应用程序正在全屏运行,没有窗口标题栏 现在,在我的一项活动中需要启用窗口标题,以便我可以使用
setTitle()
是否有一种方法可以覆盖应用程序中的主题属性。 我已经尝试过,
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN,WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
但这没有帮助,因为该应用程序现在不是全屏的,也没有窗口标题
I have an app for which i have set the theme attribute to
@android:style/Theme.Black.NoTitleBar.Fullscreen
this works ok as my application is running fullscreen without the window title bar
now in one of my activities in need to enable the window title so i can use the
setTitle()
is there a way to override the theme attribute in application.
i have tried
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN,WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
but that didn't help as the app now is not fullscreen and also does not have the window title
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
除了为整个应用程序设置的主题之外,您还可以在清单中为您的活动使用另一个主题属性,就像您在我的活动 NewsList 中看到的那样:
You can use another theme attribute for your activity, in your manifest, beside the theme you setted for your entire application, something like you can see for my activity NewsList: