EditText Misbehavior in v1.5

RichardN

Well-Known Member
Licensed User
Longtime User
I have a project in which I use a full-screen EditText view to display a text result that is bigger than the page. It is a very convenient way to allow the user to scroll up/down through the results. With the Enabled property set to false the text can be scrolled up/down by touch without the view gaining focus, becoming editable and the soft keyboard popping up.


To prevent the text from being changed I set txtEditText1.Enabled=False at design time and txtEditText1.Color = Colors.White to negate the 'greyed out' appearance.

There appears however to be a problem!

- When the EditText first appears with the text content set at design time all is well... it cannot gain focus.

- In the program I make a hidden ListView visible over the top of the EditView, make a selection from it, then hide it again. All remains well and the EditText displays new content + continues to scroll, it also remains disabled without the soft keyboard popping up on focus.

- Try it a third time and guess what... The EditText becomes editable and the soft keyboard pops up on focus. Somehow the EditText.Enabled property is changing.

I should add that all this is on a device, not on the emulator.

Puzzled ???

Sample Code attached
 

Attachments

  • TestProject.zip
    5.8 KB · Views: 253

agraham

Expert
Licensed User
Longtime User
Somehow the EditText.Enabled property is changing.
Actually it's not, as can see if you log it in the button click. It's probably this Android bug. It says in Erels' link
October was too late for the Froyo update and Gingerbread but it will probably be included in Honeycomb.
I can confirm that it is indeed fixed on my Motorola Xoom where your example works fine whereas on my 2.1 Blade I see the same effect as you.
 
Upvote 0

RichardN

Well-Known Member
Licensed User
Longtime User
Thanks very much. I spent a good 1/2 hour trawling the documentation and forums for some mention of this without success. It is becoming a familiar task.
 
Upvote 0

RichardN

Well-Known Member
Licensed User
Longtime User
Yes. Search engines are only as good as the term you type in!

As a newcomer to a platform/language the learning curve is steep, regardless of experience. The default assumption from the learner is generally that the mistake/oversight is your own..... rather than searching for known bug.
 
Last edited:
Upvote 0
Top