如何在android上为材质卡绘制不确定进度条
我的布局中有一个材料卡片列表,如下所示,我正在尝试从后端加载数据,加载时我想显示一个进度条。 我已经实现了一个圆形progressbar,但希望实现下图所示的项目加载如何在android上为材质卡绘制不确定进度条,android,android-layout,material-design,progress-bar,android-progressbar,Android,Android Layout,Material Design,Progress Bar,Android Progressbar,我的布局中有一个材料卡片列表,如下所示,我正在尝试从后端加载数据,加载时我想显示一个进度条。 我已经实现了一个圆形progressbar,但希望实现下图所示的项目加载 <?xml version="1.0" encoding="utf-8"?> <com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView 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="wrap_content"
android:layout_margin="6dp"
app:cardCornerRadius="8dp"
app:cardElevation="4dp">
<ImageView
android:id="@+id/image"
android:layout_width="50dp"
android:layout_height="50dp" />
<TextView
android:id="@+id/headingText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/appImage"
android:paddingLeft="16sp"
android:paddingRight="16dp"
android:text="Title"
android:textColor="#000"
android:textSize="18sp"
tools:ignore="RtlHardcoded" />
<TextView
android:id="@+id/subHeaderText"
style="@style/Base.TextAppearance.AppCompat.Subhead"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/headingText"
android:layout_toRightOf="@+id/appImage"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:text="SubTiltle"
android:textColor="#000"
android:textSize="15sp" />
</com.google.android.material.card.MaterialCardView>
我使用了简单的水平和圆形进度条,但不确定如何绘制卡片加载进度条。我发现了这个,但不确定如何在我的案例中使用它
有人能指出如何实现这种加载吗
一般来说,任何布局都可能有这样的加载。鉴于您实际上并没有直接要求提供库,我觉得我对库的建议可以。也许这就是你想要的使用进度条或进度指示器。