Why does this layout seems to inverse what I put as attributes?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="600dp"
android:layout_height="600dp" >
<LinearLayout
android:id="@+id/top_left"
android:layout_width="400dp"
android:layout_height="200dp"
android:layout_alignParentTop="true"
>
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/green”
/>
</LinearLayout>
<LinearLayout
android:layout_width="200dp"
android:layout_height="400dp"
android:layout_alignRight="@id/top_left"
>
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/red"
/>
</LinearLayout>
</RelativeLayout>
I was expecting that it would be something like:
_____400_________200__
| | |
200 top_left | |400
|______________| |
| |
| |
| |
|______|
But I get: