I want my custom EditText to behave like this

   - When app starts it seems a TextView (ie normal text on solid color 
   background, cursor not shown)
   - When users taps, it changes its appearance to look "selected" (ie a 
   different background, still cursor not displayed)
   - When user long taps, it requests focus and shows soft keyboard if 
   necessary
   - When user tap anywhere else, the last long tapped custom EditText, if 
   any, goes back in the "normal" state

It seems quite basic to me, however I can't get it to work properly. A 
number of unwanted things happens, and when I try to repair one of them, a 
plenty of new issues arise. I'd like to know if there is a simple workflow 
for getting an EditText which behaves

   1. like a normal TextView when doesn't interact with user and when user 
   tap it
   2. like a clicked EditText when user long clicks it (ie show soft 
   keyboard if necessary and possibly change appearance)

Please help me. I have read all the docs and the sources for View, TextView 
and EditText, but the interaction among focus, motion events, selection, etc 
are so difficult to understand and the code is not commented at all.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to