Skip to content Skip to sidebar Skip to footer

Imageview Visibility In Android

In the following code how to hide the image at the start of the APP.So when the user enters the password then show it back again package com.app.myapp; import android.app.Activit

Solution 1:

You can modify the visibility of a view with view.setVisibility(x);, where x is View.INVISIBLE, View.VISIBLE, or View.GONE.

You should probably define the image as invisible in your layout XML... android:visibility="invisible"

You can't set visibility on ImageView as your code shows, you must findViewById() to get the view to set visibility on. You seem to be doing that with your iv variable already, so just call the setVisibility() method on it.


Post a Comment for "Imageview Visibility In Android"