rak*_*yap 2 android android-recyclerview
我试图显示一个RecyclerView,它最初在从API获取数据之前加载骨架视图.在下面的示例中,正在显示简单的图像视图和文本.
<android.support.v7.widget.CardView
    android:id="@+id/cv_store_offer_display"
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">
        <ImageView
            android:id="@+id/img"
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:scaleType="fitXY"/>
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">
            <TextView
                android:id="@+id/txt"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Foo FOO"/>
        </LinearLayout>
    </LinearLayout>
</android.support.v7.widget.CardView>
我想知道如何在我的Recyclerview加载图像/文本之前显示视图.我正在使用Picasso来加载图像.mikepenz FastAdapter用于显示RecyclerView内容.
我还尝试使用/sf/answers/863951791/中提到的进度条.但即使可见性设置为可见,也从未显示进度条.
你可以用类似的东西
picasso.load(url)
    .placeholder( R.drawable.place_holder )
    .into(imageView);
| 归档时间: | 
 | 
| 查看次数: | 2701 次 | 
| 最近记录: |