【发布时间】:2015-01-05 06:03:10
【问题描述】:
让我直接点,我在XML文件中有一个编辑文本如下。
<EditText
android:id="@+id/edt_brand_name_add_product"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_40"
android:layout_alignLeft="@+id/relative_img_banner"
android:layout_alignRight="@+id/relative_img_banner"
android:layout_below="@+id/relative_img_banner"
android:layout_marginTop="@dimen/dp_10"
android:background="@drawable/edit_text_login_page"
android:digits="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_ "
android:hint="Brand Name"
android:inputType="textNoSuggestions"
android:paddingLeft="@dimen/dp_5"
android:textColor="@color/edit_text_color"
android:textSize="@dimen/sp_12"
app:fontName="fonts/Roboto_Light.ttf" />
在三星 Galaxy Tab 3 中,如果我在 EditText 中键入任何数字,它将重复所有已键入的文本。例如,如果 EditText 的值为“tt”,并且如果我尝试输入任何数字,它会在您输入任何数字时重复“tt”的次数。应该是什么问题。它在 Nexus 5 或 HTC 等其他设备上运行良好。
【问题讨论】:
-
此问题可能与限制三星设备中的输入字符 (android:digits="abcd..") 有关。见:stackoverflow.com/questions/16178059/…
标签: android android-edittext numbers repeat