Android Phone EditText does not update display on device

I have a small Android application that I am developing, and I have an element EditTextthat does not like to display its contents while the keyboard is on screeen.

For example, I touch editTextbox, and it calls the keyboard by pressing the letter, say, adisplays ain the text box, but after that the new text does not appear, so the user, in fact, prints blind from this point on.

This only happens on the device, not in the emulator. Vodafone 845, if that matters.

The code I use for EditText is this.

 <EditText 
 android:id="@+id/EditAddress"
 android:layout_width="200px"
 android:singleLine="True"
 android:hint="Address or Landmark"/> 

I had OnKeyListener and OnClickListener, but removing them from the code does not make any changes to the behavior. EditText is also inside a TableLayout, which is inside another TableLayout. This is the only EditText that does not work well on the device. (I did not code others in the application, but I could add some to find out what is wrong.

EDIT: Well, it seems like this is caused if the keyboard obscures the location of the original edit box so that the view should scroll down, so the edit box will not be covered by the soft keyboard. At the moment, I can change the order of my page, so the edit box is at the top. But this is a bit of a hacker solution. Does anyone know what causes this and / or how to fix it.

+3
1

, layout_height. wrap_content .

0

Source: https://habr.com/ru/post/1775915/


All Articles