Im здание это приложение, просто хочу, чтобы распределить эти кнопки одинаково на экране, это код i`m с помощью:Android Layout Вес не работает
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<Button
android:id="@+id/tera_mt_serv"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:onClick="teraServerBt"
android:background="@color/gblue"
android:textColor="#fff"
android:text="@string/tera_server_st_mt_ab"
android:textAlignment="center"
android:textAllCaps="true"
android:layout_weight="1"
tools:ignore="ButtonStyle" />
<Button
android:id="@+id/tera_ff_serv"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@color/gblue"
android:textColor="#fff"
android:text="@string/tera_server_st_ff_ab"
android:textAlignment="center"
android:textAllCaps="true"
android:layout_weight="1"
tools:ignore="ButtonStyle" />
<Button
android:id="@+id/tera_ch_serv"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@color/gblue"
android:textColor="#fff"
android:onClick="teraServerBt"
android:text="@string/tera_server_st_ch_ab"
android:textAlignment="center"
android:textAllCaps="true"
android:layout_weight="1"
tools:ignore="ButtonStyle" />
<Button
android:id="@+id/tera_av_serv"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@color/gblue"
android:textColor="#fff"
android:text="@string/tera_server_st_av_ab"
android:textAlignment="center"
android:textAllCaps="true"
android:layout_weight="1"
tools:ignore="ButtonStyle" />
<Button
android:id="@+id/tera_tr_serv"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@color/gblue"
android:textColor="#fff"
android:text="@string/tera_server_st_tr_ab"
android:textAlignment="center"
android:textAllCaps="true"
android:layout_weight="1"
tools:ignore="ButtonStyle" />
Но я все еще получаю это результат, даже когда я проверить это на моем телефоне:
Im новое на это так, это должно быть что-то простое, что я не могу видеть. В любом случае, заблаговременно за любую помощь!
Кажется, ваша точка зрения не занимая всю ширину. Использовать ширину match_parent для корневого представления – Rahul