I have a imageveiw initially it should be in hidden mode,
<ImageView
android:id="@+id/custom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|right"
android:src="@drawable/custom1" />
and I created a login page ..whenever my login is successful I should show the image.
Try this
Your xml
You can set here on xml like this
or
or
Java program
set your
ImageViewlike thisDifference between
INVISIBLEandGONE.INVISIBLE– The widget will be invisible but space for the widget will be shown.GONE– Both space and widget is invisible.