Android Question multiple edittext views - input in wrong view


Well-Known Member
Licensed User
i've got 2 edittext views on a panel. one is disabled by default (it's enabled under certain circumstances).
if the user innocently tries to type in that view (even though she is told not to), the input magically appears in the other edittext ... why? shouldn't the input simply be ignored as the view is disabled? with the defunct winmo, i seem to remember you could turn off tab stops so that focus didn't bounce from view to view. you had to specifically position the pointer to get focus. is there something similar here? might that be involved?

in a similar vein, i've given the 2 edittext views rounded edges with the same colorable drawable background. the 2 edittext views are not the same size (the main edittext view is wider). when the panel is made visible, everything looks fine. but if the user starts to type in the main view, it suddenly shrinks in size to that of the other, smaller view. if i declare 2 different color drawable variables (even though they are the same color and rounded edge size), then everything is fine. can anyone else make the shrinking happen? if so, why should the first, wider edittext view suddenly inherit the size of the second, narrower edittext view just because the color is the same? as a test i added a third edittext view of yet another size and assigned the 1 color drawable as its background color. whichever edittext is the last one to be assigned the 1 color drawable background, its size is the one that gets assigned to the other 2 edittext views.

thanks for any thoughts.


Well-Known Member
Licensed User
Try this:
Dim jo As JavaObject = YourDisabledEditText
jo.RunMethod("setFocusable", Array(False))

About the second issue, you should not use the same drawable object for two different views. Each view needs its own drawable.

thanks. i think my edittext input problem is emulator-related, at least when you set the emulator to accept keyboard input (and not use the sip). in this case the javaobject suggestion had no effect.

however, when i deployed the code i was working on to the device, simply disabling the view - as normal - prevented the sip from popping up, so there was no typing appearing anywhere.

closed issue, i'm guessing. thanks again
Upvote 0