Reputation: 167
I have an image that is a tick. At the moment i know how to set visibilty using GONE/VISIBLE.
tick.setVisibility(View.VISIBLE);
I want to be able to detect whether an image is visible using an if statement.
if (tick is visible){
i++
}
Thanks
Upvotes: 0
Views: 144
Reputation: 2250
Try this code it will help you.
if (ticket.getVisiblity() == View.VISIBLE) {
i++;
}
Upvotes: 0