2017-10-26 7 views
0

DialogFragmentのカスタムレイアウトはDatePickerであり、次のようにいくつかのラベルがあります。しかし、ホワイトフィールドを削除することはできません。また、カレンダーで日を選択解除するにはどうしたらいいですか? API 26DatePickerのカスタムダイアログボックスにレイアウトの問題があります

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> 

答えて

0

親に一致するように、コンテナのLinearLayoutの幅と高さを設定します。 親に一致する日付ピッカーの幅を設定します。

+0

動作しません –

関連する問題