I have 2 images, one stands behind another and is a yellow background, that stands out by 20dp, it is a frame. The front image is main image.
On click, i want main image to appear in the center of "yellow frame".
<ImageView
android:id="@+id/yellow_bkg"
android:background="#ffe467"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
/>
<ImageView
android:id="@+id/card"
android:background="@drawable/card"
android:layout_alignRight="@+id/border" //how to change this in code?
android:layout_alignEnd="@+id/border"//how to change this in code?
android:layout_margin="20dp" />
But the effect should happen in code, i.e. dynamically when i do click or touch on card imageView.