我有一个活动,其中用户呈现的编辑文本列表。问题是,一旦活动开始,虚拟键盘就会立即显示在第一个编辑文本中。我不希望发生这种情况,因为在编辑文本之前有一个微调,而且我经常发现弹出键盘就会让用户忘记前一个微调。与EditText对象的Android问题
下面是相关代码:
<Spinner
android:id="@+id/event_location"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30px"
android:prompt="@string/location_prompt" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Event Name: " />
<EditText
android:id="@+id/event_name"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Activity Type: " />
<Spinner
android:id="@+id/event_type"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Address: " />
<EditText
android:id="@+id/event_address"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
摘要:一个EditText活动开始,虚拟键盘会自动弹出。我不希望它这样做,除非用户按下编辑文本。
感谢您的任何帮助。
好吗肯定,我会尝试了这一点。有没有办法让我可以做到这一点,以便没有任何提示?即在用户点击某物之前什么都不会弹出。 编辑 - requestFocus没有改变任何东西。 – JDS
我编辑了我的答案,看到这些帮助。 – pqn