Nicknumber
Lurker
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?
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?