Когда локаль изменилась на язык хинди, приложение не принимает ввод с клавиатуры softinput. Следующий код отлично работает для английского языка. Пожалуйста, дайте мне знать, где это пошло не так.
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/farmer_phone_number_layout"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dimen_10"
android:hint="@string/mobile_number"
android:inputType="phone"
app:endIconMode="clear_text"
app:errorEnabled="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/farmer_phone_number_edt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:digits="@string/input_digits"
android:imeOptions="actionDone"
android:inputType="phone"
android:maxLength="@integer/max_length_mobile_number_at_india"
android:textColor="@color/black" />
</com.google.android.material.textfield.TextInputLayout>
Используя приведенный ниже код, я пытаюсь изменить локаль приложения.
public static Context updateResources(Context context, String countryCode) {
Locale locale;
locale = new Locale(countryCode.toLowerCase());
Configuration conf = context.getResources().getConfiguration();
conf.locale = locale;
Locale.setDefault(locale);
conf.setLayoutDirection(conf.locale);
context.getResources().updateConfiguration(conf, context.getResources().getDisplayMetrics());
return context;
}
@string/input_digits
? - person OMi Shah   schedule 08.02.2021