Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3cda89d authored by Roozbeh Pournader's avatar Roozbeh Pournader
Browse files

Make TextInputTimePickerView use localized input

Previously, TextInputTimePickerView used the default numeric IME, which
could result in cases where the digits displayed in the text fields were
native, but the IME showed ASCII digits resulting in a mix.

Now we use setImeHintLocales to hint that we need a localized IME.

Change-Id: Ic4041dcc65a31bd00741c6d96d8cbc5dac9d77c8
Fixes: 63650251
Test: Manual (tested under en-US and ar-BH locales)
parent 9f675cee
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.widget;

import android.content.Context;
import android.os.LocaleList;
import android.text.Editable;
import android.text.InputFilter;
import android.text.TextWatcher;
@@ -141,6 +142,9 @@ public class TextInputTimePickerView extends RelativeLayout {
                new InputFilter.LengthFilter(maxCharLength)});
        mMinuteEditText.setFilters(new InputFilter[] {
                new InputFilter.LengthFilter(maxCharLength)});
        final LocaleList locales = mContext.getResources().getConfiguration().getLocales();
        mHourEditText.setImeHintLocales(locales);
        mMinuteEditText.setImeHintLocales(locales);
    }

    boolean validateInput() {