android:fitsSystemWindows="true"所在的控件的高度不能写死, 必须要和android:layout_height="wrap_content"或ndroid:layout_height="match_parent"配合使用才可以生效, android:layout_height="50dp"这样高度写死是不行的。 如果你想写死高度,那只能在外面多包一层布局,设置android:layout_height="wrap_content"即可
android:fitsSystemWindows=“true“不生效的原因之一
于 2022-04-14 15:40:08 首次发布