I'm testing my app on android 4.0.4 Samsung galaxy duos, the problem is if I set:
android:textIsSelectable="true"
the keyboard doesn't appear, though it appears on the emulator. Any suggestions?
Here is how my EditBox
looks like
<EditText
android:focusable="true"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="textVisiblePassword|textCapWords|textMultiLine"
android:textIsSelectable="true"
android:gravity="top|left"
android:minLines="6"
android:maxLines="10"
android:minHeight="140dp"
android:hint="@string/message"
/>
<requestFocus />
You need to put
requestFocus
insideEditText
element:Add a requestfocus. In xml:
Programmatically
To "force" the SoftKeyboard to appear, you can do it dynamically:
Set onFocusChangeListener to appear your keyboard:
See InputMethodManager Documentation for more information.
See also these answers to forcing the Keyboard to appear: Forcing the Soft Keyboard open