Keyboard not shown when i click on edittextview in android?

Viewed 35634

When i click on the edittextview then some times keyboard shown or some times keyboard are not shown.

In android 2.1 it show the keyboard when i click on the edittextview

but when i start same application it on android 2.2 then it not show the keyboard.

Help me how to show that problem.

9 Answers

I had this same problem when displaying an EditText in a DialogFragment. Despite the EditText getting focus (i.e., when clicked, it showed the flashing caret), the keyboard did not display.

My solution was to add a dummy EditText to the uppermost view of my DialogFragment.

<EditText
    android:id="@+id/editTextFix"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:hint="@string/fix"
    android:importantForAutofill="no"
    tools:targetApi="o"
    android:inputType="text"
    android:visibility="gone"/>

In your parent view check if there is android:descendantFocusability="blocksDescendants" remove it.

Related