switching between ImageView



I want to be able to switch between imgCardF and imgCardB on click on the imgCardF and imgCardB , like effect of flip card. here my code xml :



<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://ift.tt/nIICcg"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >

<ImageView
android:id="@+id/imgCardF"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_weight="1"
android:background="#34232b" />

<ImageView
android:id="@+id/imgCardB"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_weight="1"
android:background="#ababab" />

</RelativeLayout>

</LinearLayout>

No comments:

Post a Comment