Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
问题很简单“如何在添加内容后从 WebView 中删除标题栏?通常您使用requestWindowFeature(Window.FEATURE_NO_TITLE);但您只能在添加内容之前使用该方法:(
requestWindowFeature(Window.FEATURE_NO_TITLE);
那么有什么想法吗?:)
谢谢
我相当肯定这个问题的答案是“你不能”。
您最好的选择可能是关闭真实的窗口标题(正如您在问题中详细说明的那样),然后在您的布局文件中定义一个您自己的类似标题栏的元素......然后您可以随意显示/隐藏它。