mirror of
https://github.com/material-components/material-components-android.git
synced 2026-02-03 16:33:36 +08:00
[DatePicker] Fix arrangement of range text fields
- gives enough space for the text to not wrap when width too narrow PiperOrigin-RevId: 632262914
This commit is contained in:
parent
b301a586b5
commit
501ae367a1
@ -26,7 +26,10 @@
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/mtrl_picker_text_input_date"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="@dimen/material_textinput_min_width_with_label"
|
||||
android:maxWidth="@dimen/material_textinput_max_width"
|
||||
android:layout_gravity="center_horizontal">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@ -20,17 +20,19 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingTop="@dimen/mtrl_calendar_text_input_padding_top"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingLeft="@dimen/mtrl_calendar_content_padding"
|
||||
android:paddingRight="@dimen/mtrl_calendar_content_padding"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/mtrl_picker_text_input_range_start"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
android:minWidth="@dimen/material_textinput_min_width_with_label"
|
||||
android:maxWidth="@dimen/material_textinput_max_width"
|
||||
android:layout_gravity="center_horizontal">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
@ -41,14 +43,16 @@
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<Space
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="0dp"/>
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="8dp"/>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/mtrl_picker_text_input_range_end"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
android:minWidth="@dimen/material_textinput_min_width_with_label"
|
||||
android:maxWidth="@dimen/material_textinput_max_width"
|
||||
android:layout_gravity="center_horizontal">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
<!-- Minimum width for text fields without a label. If a label is present,
|
||||
minimum width should be 88dp. -->
|
||||
<dimen name="material_textinput_min_width">56dp</dimen>
|
||||
<dimen name="material_textinput_min_width_with_label">88dp</dimen>
|
||||
<dimen name="material_textinput_max_width">488dp</dimen>
|
||||
|
||||
<dimen name="mtrl_textinput_outline_box_expanded_padding">16dp</dimen>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user