Jak wyświetlić połowę przycisku na jednym układzie i połowę na innym układzie w systemie Android?
Chcę zaprojektować układ podobny do poniższego obrazka:
Próbowałem to zrobić za pomocą układu względnego, ale nie wymyśliłem rozwiązania. Powinien być w tej samej pozycji dla ekranu wszystkich urządzeń. Jak to osiągnąć ??? Próbowałem tego kodu:
<?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>
Wszelkie sugestie zostaną docenione.