Circular ProgressBar нежелательное расстояние - PullRequest
0 голосов
/ 19 июня 2019

В моем макете есть ProgressBar с

android:layout_width="30dp"
android:layout_height="30dp"

Нет margins или paddings установлено.
Но ProgressBar не занимает всю ограничивающую рамку, вокруг круга присутствует странный промежуток.

enter image description here

Как я могу ProgressButton соответствовать указанным размерам?

1 Ответ

0 голосов
/ 19 июня 2019

enter image description here

вы можете использовать android:clipChildren="false", чтобы переполнить родительский

    <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:clipChildren="false">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_margin="50dp"
        android:background="@color/colorPrimary"
        android:gravity="center_horizontal"
        android:orientation="vertical">

        <ProgressBar
            android:layout_width="390dp"
            android:layout_height="match_parent"
            android:layout_gravity="center_horizontal"
            android:layout_marginLeft="55dp"
            android:layout_marginRight="50dp" />
    </LinearLayout>


</RelativeLayout>
...