1

我想制作如下图所示的布局,但我无法制作与图像中显示的相同的布局。我必须将按钮与所附图像中给出的完全相同。这是我的代码,我是如何制作它的,但我无法准确地获得显示的对齐方式。

我也添加了我的资源(按钮和背景)在此处输入图像描述

在此处输入图像描述

    <Button
        android:id="@+id/button_home_driver"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_marginBottom="60dp"
        android:layout_marginLeft="38dp"
        android:background="@drawable/driverbtn" />

    <Button
        android:id="@+id/buttonPassengerHomeScreen"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_above="@+id/button_home_driver"
        android:layout_marginBottom="10dp"
        android:layout_marginLeft="70dp"
        android:background="@drawable/passengerbtn" />

</RelativeLayout>

我无法沿着倾斜的黑色分隔屏幕对齐按钮。

任何人都请帮助我。(两个按钮都应该从黑色边界开始,如图所示)

在此处输入图像描述

4

0 回答 0