I'm interested how to easy rotate position between two layouts (RelativeLayout
). I have two RelativeLayout
and I want to rotate their position when I click on first.
I'm trying to create dynamic position on console, so user can rotate what he want to be on which position.
I have created my own method for this, but I want to know is there any better and simpler solution. In that method I control where is which content of box and I rotate content with animation.
Edit: This is how to look like main_activity:
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/first"
android:layout_width="fill_parent"
android:layout_height="50dp"></RelativeLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<RelativeLayout
android:id="@+id/seconde"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:layout_weight="1"></RelativeLayout>
<RelativeLayout
android:id="@+id/third"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:layout_weight="1"></RelativeLayout>
</LinearLayout>
</LinearLayout>