由ConstraintLayout忽略的android–fitsSystemWindows

由ConstraintLayout忽略的android–fitsSystemWindows,第1张

概述我试图在我的应用程序中显示一个活动,状态栏是完全透明的.我添加到我的风格:<itemname="android:statusBarColor">@android:colorransparent</item><itemname="android:windowTranslucentStatus">true</item><itemname="android:windowTranslucent

我试图在我的应用程序中显示一个活动,状态栏是完全透明的.我添加到我的风格:

<item name="androID:statusbarcolor">@androID:color/transparent</item><item name="androID:windowTranslucentStatus">true</item><item name="androID:windowTranslucentNavigation">true</item>

但出于某种原因,我的所有观点都出现在状态栏下方.所有视图都与父应用程序顶部对齐:layout_constrainttop_totopOf =“parent”.

解决方法:

我通过在我的活动中添加以下代码来修复它:

Window w = getwindow();w.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_liMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_liMITS);
总结

以上是内存溢出为你收集整理的由ConstraintLayout忽略的android – fitsSystemWindows全部内容,希望文章能够帮你解决由ConstraintLayout忽略的android – fitsSystemWindows所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1119618.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-29
下一篇2022-05-29

发表评论

登录后才能评论

评论列表(0条)

    保存