Skip to content

Commit 6862b6f

Browse files
paulfthomaspekingme
authored andcommitted
[DatePicker] Make header not focusable
PiperOrigin-RevId: 642318050
1 parent 3a31eef commit 6862b6f

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

lib/java/com/google/android/material/datepicker/res/layout-land/mtrl_picker_header_dialog.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@
3838
android:layout_weight="1"
3939
android:paddingStart="@dimen/mtrl_calendar_header_text_padding"
4040
android:paddingLeft="@dimen/mtrl_calendar_header_text_padding"
41-
android:focusable="true"
42-
android:focusableInTouchMode="true">
41+
android:importantForAccessibility="yes"
42+
android:focusable="false"
43+
android:focusableInTouchMode="false">
4344

4445
<include layout="@layout/mtrl_picker_header_title_text"/>
4546
<include layout="@layout/mtrl_picker_header_selection_text"/>

lib/java/com/google/android/material/datepicker/res/layout/mtrl_picker_header_dialog.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@
3737
android:layout_weight="1"
3838
android:paddingStart="@dimen/mtrl_calendar_header_text_padding"
3939
android:paddingLeft="@dimen/mtrl_calendar_header_text_padding"
40-
android:focusable="true"
41-
android:focusableInTouchMode="true">
40+
android:importantForAccessibility="yes"
41+
android:focusable="false"
42+
android:focusableInTouchMode="false">
4243

4344
<include layout="@layout/mtrl_picker_header_title_text"/>
4445
<include layout="@layout/mtrl_picker_header_selection_text"/>

lib/java/com/google/android/material/datepicker/res/layout/mtrl_picker_header_fullscreen.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@
5454
android:layout_weight="1"
5555
android:paddingStart="@dimen/mtrl_calendar_header_text_padding"
5656
android:paddingLeft="@dimen/mtrl_calendar_header_text_padding"
57-
android:focusable="true"
58-
android:focusableInTouchMode="true">
57+
android:importantForAccessibility="yes"
58+
android:focusable="false"
59+
android:focusableInTouchMode="false">
5960

6061
<TextView
6162
android:id="@+id/mtrl_picker_title_text"

0 commit comments

Comments
 (0)