How to check EditText visibility status in android?

I change the visibility from EditText from invisible to visible using setvisibility(View.INVISIBLE) and setvisibility(View.VISIBLE) . But I also want to know if there is any method provided in android for checking the visibility of an EditText ie is EditText visible or any of this type.

Thanks in advance.

+6
source share
3 answers

You can get this by calling the isShown() method on EditText .

+25
source

Try using this method:

isShown ();

+11
source

you can also try ...

 if(edittextname.getVisibility() == View.VISIBLE) { } 

or

 if(edittextname.getVisibility() == View.INVISIBLE) { } 
+11
source

Source: https://habr.com/ru/post/902844/


All Articles