|
15 | 15 | limitations under the License. |
16 | 16 | --> |
17 | 17 | <merge xmlns:android="http://schemas.android.com/apk/res/android" |
| 18 | + xmlns:app="http://schemas.android.com/apk/res-auto" |
| 19 | + xmlns:tools="http://schemas.android.com/tools" |
18 | 20 | android:layout_width="wrap_content" |
19 | 21 | android:layout_height="match_parent"> |
20 | 22 |
|
|
31 | 33 | android:paddingRight="@dimen/mtrl_calendar_header_content_padding" |
32 | 34 | android:orientation="vertical"> |
33 | 35 |
|
34 | | - <FrameLayout |
| 36 | + <androidx.constraintlayout.widget.ConstraintLayout |
35 | 37 | android:id="@+id/mtrl_picker_header_title_and_selection" |
36 | 38 | android:layout_width="@dimen/mtrl_calendar_landscape_header_width" |
37 | 39 | android:layout_height="0dp" |
38 | 40 | android:layout_weight="1" |
39 | 41 | android:paddingStart="@dimen/mtrl_calendar_header_text_padding" |
40 | 42 | android:paddingLeft="@dimen/mtrl_calendar_header_text_padding" |
41 | | - android:importantForAccessibility="yes" |
42 | 43 | android:focusable="false" |
43 | | - android:focusableInTouchMode="false"> |
| 44 | + android:focusableInTouchMode="false" |
| 45 | + android:importantForAccessibility="yes"> |
44 | 46 |
|
45 | | - <include layout="@layout/mtrl_picker_header_title_text"/> |
46 | | - <include layout="@layout/mtrl_picker_header_selection_text"/> |
| 47 | + <androidx.constraintlayout.widget.Guideline |
| 48 | + android:id="@+id/guideline" |
| 49 | + android:layout_width="wrap_content" |
| 50 | + android:layout_height="wrap_content" |
| 51 | + android:orientation="horizontal" |
| 52 | + app:layout_constraintGuide_percent="0.55" /> |
47 | 53 |
|
48 | | - </FrameLayout> |
| 54 | + <!-- Disable InconsistentLayout check. This ID is used in an <include> |
| 55 | + in the portrait layout , which the Lint check doesn't detect. --> |
| 56 | + <TextView |
| 57 | + android:id="@+id/mtrl_picker_title_text" |
| 58 | + style="?attr/materialCalendarHeaderTitle" |
| 59 | + android:layout_width="0dp" |
| 60 | + android:layout_height="wrap_content" |
| 61 | + app:firstBaselineToTopHeight="@dimen/mtrl_calendar_title_baseline_to_top" |
| 62 | + app:layout_constrainedHeight="true" |
| 63 | + app:layout_constraintBottom_toTopOf="@+id/guideline" |
| 64 | + app:layout_constraintEnd_toEndOf="parent" |
| 65 | + app:layout_constraintStart_toStartOf="parent" |
| 66 | + app:layout_constraintTop_toTopOf="parent" |
| 67 | + app:layout_constraintVertical_bias="0" |
| 68 | + tools:ignore="InconsistentLayout" /> |
49 | 69 |
|
50 | | - <include layout="@layout/mtrl_picker_header_toggle"/> |
| 70 | + <!-- Disable InconsistentLayout check. This ID is used in an <include> |
| 71 | + in the portrait layout , which the Lint check doesn't detect. --> |
| 72 | + <TextView |
| 73 | + android:id="@+id/mtrl_picker_header_selection_text" |
| 74 | + style="?attr/materialCalendarHeaderSelection" |
| 75 | + android:layout_width="0dp" |
| 76 | + android:layout_height="0dp" |
| 77 | + app:layout_constrainedHeight="true" |
| 78 | + app:layout_constraintBottom_toBottomOf="parent" |
| 79 | + app:layout_constraintEnd_toEndOf="parent" |
| 80 | + app:layout_constraintStart_toStartOf="parent" |
| 81 | + app:layout_constraintTop_toBottomOf="@+id/mtrl_picker_title_text" |
| 82 | + app:lineHeight="@dimen/mtrl_calendar_header_selection_line_height" |
| 83 | + tools:ignore="InconsistentLayout" /> |
| 84 | + |
| 85 | + </androidx.constraintlayout.widget.ConstraintLayout> |
| 86 | + |
| 87 | + <include layout="@layout/mtrl_picker_header_toggle" /> |
51 | 88 |
|
52 | 89 | </LinearLayout> |
53 | 90 |
|
54 | 91 | <View |
55 | 92 | style="?attr/materialCalendarHeaderDivider" |
56 | 93 | android:layout_width="@dimen/mtrl_calendar_header_divider_thickness" |
57 | 94 | android:layout_height="match_parent" |
58 | | - android:layout_gravity="end"/> |
| 95 | + android:layout_gravity="end" /> |
59 | 96 |
|
60 | 97 | </merge> |
0 commit comments