By using getVisibility( ) method on View we can get status of view.when we apply getVisibility( ) on view this method return any one of the below state.
View.VISIBLE - The view is visible.
View.INVISIBLE - The view is invisible, but any spacing it would normally take up will still be used.
Its "invisible"
View.GONE -The view is gone, you can't see it and it doesn't take up the "spot".
Here the below code is for visibility status of view finding.
imageView is an view(ImageView obj)
if (imageView.getVisibility() == View.VISIBLE) {
// Its visible
} else {
// Either gone or invisible
}
View.VISIBLE - The view is visible.
View.INVISIBLE - The view is invisible, but any spacing it would normally take up will still be used.
Its "invisible"
View.GONE -The view is gone, you can't see it and it doesn't take up the "spot".
Here the below code is for visibility status of view finding.
imageView is an view(ImageView obj)
if (imageView.getVisibility() == View.VISIBLE) {
// Its visible
} else {
// Either gone or invisible
}
No comments:
Post a Comment