如何摆脱android全屏模式下的顶部褪色边缘?
通过将以下两行代码放入 Activity.OnCreate 中,我可以获得全屏视图:
requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags( WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN );
然而,如果你仔细观察,屏幕顶部边缘仍然有一个轻微的褪色边缘,看起来像是被移除的标题栏的残留物。我怎样才能彻底摆脱它?
请参阅此屏幕截图,这是使用上述两行代码获得的全屏视图,但顶部的淡入淡出边缘可见且烦人,我已经在根目录上尝试了 android:fadingEdge="none" 和 android:fadingEdgeLength="0sp"查看此活动,不起作用:
By putting the following two lines of code in activity.OnCreate, I can get a full screen view:
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags( WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN );
However, if you look carefully, there is still a slight fading edge on the top edge of the screen which looks like a residue of the removed title bar. How can I get rid of that completely?
See this screen capture, which is a fullscreen view obtained using the above two lines of code, but the top fading edge is visible and annoying, I already tried android:fadingEdge="none" and android:fadingEdgeLength="0sp" on the root view of this activity, doesn't work:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这将满足您的要求:
This will do what you asking for: