내가이 버튼 레이아웃중복 버튼
내가 <RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:lay="10dp">
<View android:id="@+id/strut"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_centerHorizontal="true"/>
<Button
android:id="@+id/button4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@id/strut"
android:layout_alignParentLeft="true"
android:background="@drawable/notificacion_desactivado" />
<Button
android:id="@+id/button6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/strut"
android:layout_alignParentRight="true"
android:background="@drawable/alarma_desactivada" />
<Button
android:id="@+id/button5"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_marginBottom="dp"
android:background="@drawable/icono_notificacion_suelto" />
</RelativeLayout>
했다
를 만들려면 지금은 이런 일이 : 을하지만 중앙을 만드는 방법을 알고하지 않습니다 버튼을 사용하여 상대 레이아웃을 겹치게하고 여백과 여백을 사용했지만 버튼을 레이아웃 위에 배치 할 수는 없습니다.
과도한 수준의 중첩. 하나의 RelativeLayout으로 충분합니다. –
그냥 중앙 더미보기 (0px 너비와 높이)를 설정하십시오. 하나의 버튼을 왼쪽으로 설정하고 다른 하나는 오른쪽으로 설정하십시오. 그리고 마지막으로 센터에 또 하나. 끝난. –
예, 그게 해결책이었습니다. – El0din