Add hint to EditText for Talkback
Set the title as the hint of EditText to fix the missing accessibility label. Fix: 386758099 Test: atest DeviceNamePreferenceControllerTest Flag: EXEMPT bug fix Change-Id: Icde6796aa3faa3e0ad79611ba2dd0b18b13590a7
This commit is contained in:
@@ -67,6 +67,9 @@ public class ValidatedEditTextPreference extends CustomEditTextPreferenceCompat
|
||||
protected void onBindDialogView(View view) {
|
||||
super.onBindDialogView(view);
|
||||
final EditText editText = view.findViewById(android.R.id.edit);
|
||||
if (editText != null) {
|
||||
editText.setHint(getDialogTitle());
|
||||
}
|
||||
if (editText != null && !TextUtils.isEmpty(editText.getText())) {
|
||||
editText.setSelection(editText.getText().length());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user