私はRecyclerViewを表示しようとしていますが、最初にスケルトンビューを読み込み、APIからデータを取得しています。以下の例では、単純な画像ビューとテキストが表示されています。私は私のRecyclerviewを作る方法を知っていただきたいと思いrecyclerview内の画像のプレースホルダを表示
<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コンテンツを表示するためのmikepenz FastAdapter
また、https://stackoverflow.com/a/12342168/371557で説明したようにプログレスバーを使用しようとしました。可視性がVISIBLEに設定されていても、プログレスバーは表示されませんでした。
のようなものを使用することができますか? '' android:src = "@ drawable/placeholder" ' – StuStirling
ピカソで画像を設定する場所をコードで表示することができますか? –
' '' android:src = "@ drawable/placeholder" '' 'は静的に見せます。したがって、私はプログレスバーを表示したいと思った:)他のアイデアは? –