我试图使用EditText
和textPassword
输入类型。我面临的情况是,在Android版本5和4.4中,所有进入该字段的字符都是通过双击来选择的,而此功能在Android版本6上不起作用。 您是否愿意帮助我在所有Android版本中拥有此功能?带有文本密码输入类型的Android EditText不会通过双击选择全部字符
这是我的xml文件:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<EditText
android:hint="Text Password Input Type"
android:inputType="textPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
这是结果:
我想这个问题是只用模拟器而不是真正的设备 – VVB
@VVB这个功能在Samsung Note 4上用Lollipop和Nexus 5与Marshmallow android版本进行了检查。发生了同样的结果。 – Nava