为什么我这里明明都给他添加了跟随父容器的尺寸,这里还是没有占满屏幕啊?哪里写错了吗?



<androidx.constraintlayout.widget.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
    android:layout_height="match_parent">
<DatePicker
    android:id="@+id/riqi"
    android:layout_width="match_parent"
    android:layout_height="match_parent">DatePicker>
androidx.constraintlayout.widget.ConstraintLayout>

img


为什么我这里明明都给他添加了跟随父容器的尺寸,这里还是没有占满屏幕啊?哪里写错了吗?

看你的截图已经是长满全屏幕了,你的意思是要去掉上面的 titleBar 吗,可以在

img


manifest 这里 找到你的themes文件
让他继承自 Theme.AppCompat.Light.NoActionBar

img