I have declared two imageViews(imageView1 and ImageView2) in layout. imageView1 assigned to bottom and imageView2 aligned as ALIGN_BOTTOM of imageView1. In code, after performing some action, imageView1 is moving to center of the screen. Now, imageView2 should align to ALIGN_BOTTOM of imageView1. How to do this? i am using below layout.
<RelativeLayout
android:id="@+id/rlayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/imageView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:adjustViewBounds="true"
android:scaleType="centerCrop"/>
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerInParent="true"
android:layout_alignBottom="@+id/imageView1"
android:src="@drawable/android"
android:visibility="visible" />
</RelativeLayout