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

Status Bar Text Visibility

Get X, Y Position of Layout

onTouchListener Hover Effect