I have a FrameLayout which contains 2 views , the second is something like a Close Button (X)
and i want to position it on the right.
I've tried layout_gravity = " right ", but that didn't work.
This is my layout xml :
<FrameLayout android:layout_width="320dp"
android:layout_height="wrap_content"
android:id="@+id/layoutSmallImg">
<ImageView android:id="@+id/bigImage"
android:layout_width="320dp" android:layout_height="wrap_content"/>
<ImageView android:id="@+id/bigImage"
android:layout_width="320dp" android:layout_height="wrap_content"/>
<ImageButton android:id="@+id/closebutton"
android:background="@android:color/transparent"
android:layout_height="30dp" android:layout_marginTop="10dp"
android:layout_alignParentRight="true"
android:layout_width="30dp" android:paddingLeft="40dp"
android:visibility="gone"
android:src="@drawable/close" />
</FrameLayout>