Android - TextInputEditText 文本拼写颠倒

问题描述 投票:0回答:1

我的片段中有一个 TextInputEditText,每当我输入文本时,它都会被倒转拼写。所以如果我尝试输入 Leonardo,它将被拼写为 odranoeL。光标位于最后一个输入字母的开头,下一个字母放在最后一个字母的左侧。

这是我的 XML:

<com.google.android.material.textfield.TextInputLayout
                android:id="@+id/match_edit_education_input_layout"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="16dp"
                android:layout_marginTop="16dp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/match_edit_profession_input_layout">

                <com.google.android.material.textfield.TextInputEditText
                    android:id="@+id/match_edit_education_input"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="top"
                    android:hint="@string/education_mandatory"
                    android:inputType="textCapSentences" />

            </com.google.android.material.textfield.TextInputLayout>

我尝试将其隔离到另一个项目中,但我无法复制该问题。

android android-layout android-textinputedittext
1个回答
0
投票

我怀疑有一些 TextWatcher 会在每次更改时重置光标位置。

© www.soinside.com 2019 - 2024. All rights reserved.