问题描述
我的布局中有一个物料卡列表,如下所示,我正在尝试从后端加载数据,而加载时我想显示一个进度条。 我已经实现了圆形进度条,但希望实现对商品的加载,如下图所示。
<?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>
我使用了水平和圆形的简单进度条,但不确定如何绘制卡加载进度条,我发现了这个https://github.com/zhanghai/MaterialProgressBar,但不确定如何在我的情况下使用它。
有人可以指出如何实现这种加载吗?
通常,任何布局都可能具有这种加载。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)