Как показать кнопку наполовину на одном макете и наполовину на другом макете в Android?
Я хочу разработать макет, как на картинке ниже:
Я пытался сделать это, используя относительную компоновку, но я не нашел решения. Он должен быть в одинаковом положении для всех экранов устройства. Как мне этого добиться ??? Я попробовал этот код:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<RelativeLayout
android:id="@+id/relative_layout_top"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/obaz" >
</RelativeLayout>
<RelativeLayout
android:id="@+id/relative_layout_bottom"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/relative_layout_top"
android:background="@drawable/obaz2" >
<Button
android:id="@+id/bt_atoz"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginTop="-20dp"
android:background="@drawable/button_active" />
</RelativeLayout>
</RelativeLayout>
Любое предложение будет оценено.