【发布时间】:2018-08-15 09:35:05
【问题描述】:
我有一个默认进度条
对我来说,这是非常大的边界。如何制作这样的进度条(带细边框)?
我有一个简单的布局
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<ProgressBar
android:id="@+id/hello_progress_bar"
android:layout_width="210dp"
android:layout_height="210dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>
【问题讨论】:
-
Jsut 将 android:layout_width 和 android:layout_height 放到 wrap_content 中,这对于 UI 来说是完美的
-
我发布的答案真的对你有帮助,请检查
标签: android android-progressbar