Check if Visible or GONE

 Check if Visible or GONE


You can check if layout is visible, invisible or gone by using this code:

Code:
imageview1.getVisibility();


Example:
if(imageview1.getVisibility() == View.VISIBLE){
     imageview1.setVisibility(View.INVISIBLE);
}

Comments

Popular posts from this blog

Number with Comma (9,999)

Get Percent of the Number (98%)

Get X, Y Position of Layout