gpt4 book ai didi

android - DatePicker 的自定义对话框布局有问题

转载 作者:行者123 更新时间:2023-11-29 02:36:12 25 4
gpt4 key购买 nike

我为带有 DatePicker 和一些标签的 DialogFragment 自定义布局,如下所示。但是我不能删除右边的 whitefield,有什么建议吗?另外,如何取消选择日历中的一天(没有初始日期)? API 26

enter image description here

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">

<DatePicker
android:id="@+id/pickerReminderDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/Grey300"/>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:textAppearanceSmall"
android:padding="@dimen/indent_small"
android:background="@color/colorAccent"
android:textColor="@color/TextInverse"
android:gravity="center_horizontal
android:text="@string/dialogDateNote"/>

</LinearLayout>

最佳答案

设置容器 LinearLayout 宽度和高度以匹配父级。设置日期选择器宽度以匹配父项。

关于android - DatePicker 的自定义对话框布局有问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46959048/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com