How to Disable Focus?

sconcequence

Member
Licensed User
Longtime User
How do you disable the focus on a view that is currently focused? For example, EditTexts keep the focus. How do you make an EditText lose focus after input?

I even tried setting the focus of something else, like my ScrollView, but that only gives focus to the first EditText in the list.

Help! Thanks in advance.

--
 

sconcequence

Member
Licensed User
Longtime User
Disabling and Enabling the View...

EditText.Enabled = False followed by EditText.Enabled = True placed in the _EnterPressed event acts as if nothing happened. The EditText still has focus.

--
 
Upvote 0

MDEnt

Member
Licensed User
Longtime User
I have recently used the Enabled = False and True as mentioned in this thread to disable some buttons - and have a question...

I have a panel - panel1 that is full screen - it has some buttons on it.

I have a second panel - panel 2 that is not full screen and is centered on screen on top of panel1

When panel2 is active on top of panel 1 - i don't want the panel1 buttons to be available to be pressed - but also don't want them to disappear.

I used the Enabled = False for the panel1 buttons - which works fine to make the buttons on panel1 not available - but what happens is the the button background disappears and the button text stays - which looks odd. They are statelistdrawable buttons - is this normal behavior, or has this been seen before? - I'd like to disable the panel1 buttons but have them remain visible.
 
Upvote 0
Top