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

Commit e9a74a1a authored by Hyejin Kim's avatar Hyejin Kim
Browse files

when locale is non-Enligh, sometimes month spinner needs a number IME

When locale is non-English like korean, chinese, etc.,
month displayed string is started with number.

So, It's better to use Number IME for month selection.

Change-Id: If0444d62679b1f31d98fdedd2f06c2d445cade2a
parent 212af6db
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.content.res.TypedArray;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
import android.text.InputType;
import android.text.format.DateFormat;
import android.text.format.DateUtils;
import android.util.AttributeSet;
@@ -660,6 +661,10 @@ public class DatePicker extends FrameLayout {
        mYearSpinner.setValue(mCurrentDate.get(Calendar.YEAR));
        mMonthSpinner.setValue(mCurrentDate.get(Calendar.MONTH));
        mDaySpinner.setValue(mCurrentDate.get(Calendar.DAY_OF_MONTH));

        if (Character.isDigit(displayedValues[0].charAt(0))) {
            mMonthSpinnerInput.setRawInputType(InputType.TYPE_CLASS_NUMBER);
        }
    }

    /**