1

I define EditText on the button of my application Its look like this:

enter image description here

But when i focus on the EditText of the Notes the keyboard is open and cover all my EditText and i can't see what i typing in the EditText.

When i hide the keyboard i see the right text that i typed in.

The xml of the LinearLayout of the EditText:

<LinearLayout
    android:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:text="Notes:"
        android:id="@+id/textView"
        android:textColor="#000000" />

    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/editText"
        android:focusable="true" />

</LinearLayout>
Yanshof
  • 9,659
  • 21
  • 95
  • 195

3 Answers3

4

You might need to use windowSoftInputMode attribute in your activity in the manifest. Somelike this:

<activity name="YourActivity"
    android:windowSoftInputMode="adjustPan">
    ...
</activity>

Check those links: Android soft keyboard covers edittext field

http://android-developers.blogspot.com/2009/04/updating-applications-for-on-screen.html

Community
  • 1
  • 1
LordCommanDev
  • 922
  • 12
  • 38
1

The only solution to this is to put your text box in a different place.

Think about it... Do you really want your text box ABOVE your keyboard?

This is a fairly common issue, and it something that should always be taken into account when designing your layout.

durbnpoisn
  • 4,666
  • 2
  • 16
  • 30
0

so this solve my problem ( thanks to @Coeus )

I define on the manifest this line

      android:windowSoftInputMode="adjustPan"
Yanshof
  • 9,659
  • 21
  • 95
  • 195