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
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