File tree Expand file tree Collapse file tree 2 files changed +7
-11
lines changed
lib/java/com/google/android/material/timepicker Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Original file line number Diff line number Diff line change 2828
2929import android .content .Context ;
3030import android .content .res .Resources ;
31- import android .os .Build .VERSION ;
32- import android .os .Build .VERSION_CODES ;
3331import android .text .Editable ;
3432import android .text .TextUtils ;
3533import android .text .TextWatcher ;
@@ -123,12 +121,6 @@ public void onClick(View v) {
123121
124122 hourEditText = hourTextInput .getTextInput ().getEditText ();
125123 minuteEditText = minuteTextInput .getTextInput ().getEditText ();
126-
127- if (VERSION .SDK_INT >= VERSION_CODES .JELLY_BEAN_MR1 ) {
128- minuteLabel .setLabelFor (minuteEditText .getId ());
129- hourLabel .setLabelFor (hourEditText .getId ());
130- }
131-
132124 controller = new TimePickerTextInputKeyController (hourTextInput , minuteTextInput , time );
133125 hourTextInput .setChipDelegate (
134126 new ClickActionDelegate (timePickerView .getContext (), R .string .material_hour_selection ));
Original file line number Diff line number Diff line change 1717
1818<com .google.android.material.textfield.TextInputLayout xmlns : android =" http://schemas.android.com/apk/res/android"
1919 xmlns : app =" http://schemas.android.com/apk/res-auto"
20+ xmlns : tools =" http://schemas.android.com/tools"
2021 style =" @style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
2122 android : layout_width =" wrap_content"
2223 android : layout_height =" wrap_content"
2627 app : shapeAppearance =" ?attr/shapeAppearanceMediumComponent"
2728 app : shapeAppearanceOverlay =" @null" >
2829
29- <EditText
30+ <EditText
3031 android : id =" @+id/material_timepicker_edit_text"
3132 style =" @style/Widget.MaterialComponents.TimePicker.Display.TextInputEditText"
3233 android : paddingStart =" 16dp"
3334 android : layout_width =" 96dp"
34- android : layout_height =" 80dp" />
35+ android : layout_height =" 80dp"
36+ tools : ignore =" LabelFor" />
3537
3638 <TextView
39+ android : labelFor =" @+id/material_timepicker_edit_text"
3740 android : id =" @+id/material_label"
3841 android : textAppearance =" ?attr/textAppearanceCaption"
3942 android : focusable =" false"
4043 android : layout_width =" wrap_content"
41- android : layout_height =" wrap_content" />
44+ android : layout_height =" wrap_content"
45+ tools : ignore =" LabelFor" />
4246
4347</com .google.android.material.textfield.TextInputLayout>
You can’t perform that action at this time.
0 commit comments