visibility - Android - why setVisibility doesn't work? -


i have togglebutton when pressed, hides/shows imageview:

public void onclick(view v) {     view view = (view) v.gettag();      imageview messagestatusimageview = (imageview) view.findviewbyid(r.id.messagestatusimageview);      if (((checkablelinearlayout)v).ischecked()) {            messagestatusimageview.setvisibility(view.gone);     } else {            messagestatusimageview.setvisibility(view.visible);     } } 

the problem imageview not becoming visible again.

does knows why?

thanks in advance.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -