November 1st, 2010, 09:29 PM
|
#1 (permalink)
|
|
New Member
Thread Author (OP)
Join Date: Nov 2010
Posts: 2
Device(s):
Carrier: Not Provided
Thanks: 1
Thanked 0 Times in 0 Posts
|
Android ImageView Visibility help
I have an ImageView object, x, loaded into my application. I want to toggle its visibility by clicking a button in the same activity. I have this code:
if(x.getVisibility() == INVISIBLE)
{
x.setVisibility(VISIBLE);
}
elseif(x.getVisibility() == VISIBLE)
{
x.setVisibility(INVISIBLE);
}
The default visibility setting is set to VISIBLE. When I click the button, the image won't vanish. Does anyone know how to fix this?
|
|
|