当我将字段的inputType设置为"numberPassword"时,Eclipse编辑器无法识别它,以下是代码:
<EditText
android:id="@+id/pin_field"
android:layout_width="236dp"
android:layout_height="wrap_content"
android:inputType="numberPassword">
<requestFocus />
</EditText>
在“android:inputType”行上,我遇到了以下错误:
"error: Error: String types not allowed (at 'inputType' with value 'numberPassword')."
在顶部的“图形布局”选项卡中,我已将版本从2.3.3更改为Android 4.0,据我所读,这可能会修复它,但似乎并没有起作用。我可能错过了一些显而易见的东西,但无法弄清楚。
以下是有关inputType和“numberPassword”的Android文档:http://developer.android.com/reference/android/R.attr.html#inputType