Как убрать отступы между кнопками в android?

Несколько кнопок последовательно вставлены в LinearLayout. Выставляю параметр: android:layout_margin="0dp"
Но какой-то минимальный отступ между кнопками все равно остается. А я хочу сделать кнопки "слипшимися". Если использовать ImageButton, то отступы исчезают полностью, но с Button такого не происходит.
c77ddadcb93d4dc9b1b6e6c8452220c8.png
<LinearLayout
        android:orientation="vertical"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_below="@+id/linearLayout"
        android:layout_margin="0dp">

        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="25"
            android:id="@+id/button7"
            android:layout_margin="0dp" />

        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="35"
            android:id="@+id/button6"
            android:layout_margin="0dp" />

        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="50"
            android:id="@+id/button8"
            android:layout_margin="0dp" />

        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="80"
            android:id="@+id/button9"
            android:layout_margin="0dp" />

        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="100"
            android:id="@+id/button10"
            android:layout_margin="0dp" />

        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="П1"
            android:id="@+id/button11"
            android:layout_margin="0dp" />
    </LinearLayout>
  • Вопрос задан
  • 1264 просмотра
Решения вопроса 1
@Scotik
Junior Android Developer
Вообщем эта проблема background, по умолчанию в бэкграунде стоят отсутпе, в самом shap'е
тебе надо поменять background, почитай про selector'ы и создай свой

ссылочка
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы