Как кнопки можно выровнять в андроиде, чтобы они имели правильное расстояние сверху, снизу и между кнопками?Как выровнять кнопки?
Текущий код:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<include
android:id="@+id/ActionBackupBar"
layout="@layout/actionbar_layout"
/>
<Button
android:id="@+id/btnSelectLocation"
style="@style/ButtonText"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginLeft="5sp"
android:layout_marginRight="2sp"
android:layout_marginTop="0sp"
android:text="@string/activitySelectMyLocationButton" />
<Button
android:id="@+id/btnCurrentLocation"
style="@style/ButtonText"
android:text="@string/activitySelectSearchLocationButton"
android:layout_marginBottom="5sp"
android:layout_marginLeft="5sp"
android:layout_marginRight="2sp"
/>
1. Fill_parent устарела, используйте match_parent. 2. Использование sp для полей не имеет смысла. Вместо этого используйте dp. 3. Чего вы хотите достичь? Как вы хотите выровнять эти кнопки? Как на картинке? – Mark