実現したいこと
RecyclerViewを使用して、画像を表示させたいです。
発生している問題・エラーメッセージ
android studioのプレビュー時では期待通りの表示になっているのですが、
ビルドすると画像のみ表示されなくなります。
キャプチャ
該当のソースコード
recycler_list.xml
1<?xml version="1.0" encoding="utf-8"?> 2 3<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 4 xmlns:app="http://schemas.android.com/apk/res-auto" 5 xmlns:tools="http://schemas.android.com/tools" 6 android:id="@+id/message_item" 7 android:layout_width="wrap_content" 8 android:layout_height="wrap_content" 9 android:layout_margin="@dimen/small_margin" 10 android:orientation="horizontal" 11 tools:menu="@menu/new_massage"> 12 13 <LinearLayout 14 android:layout_width="wrap_content" 15 android:layout_height="wrap_content" 16 android:orientation="vertical"> 17 18 <ImageView 19 android:id="@+id/imageView3" 20 android:layout_width="wrap_content" 21 android:layout_height="wrap_content" 22 android:layout_margin="@dimen/small_margin" 23 tools:srcCompat="@android:drawable/sym_def_app_icon" /> 24 </LinearLayout> 25 26 <LinearLayout 27 android:layout_width="wrap_content" 28 android:layout_height="wrap_content" 29 android:layout_marginStart="@dimen/small_margin_start" 30 android:layout_weight="1" 31 android:orientation="vertical"> 32 33 <TextView 34 android:id="@+id/message_name" 35 android:layout_width="match_parent" 36 android:layout_height="wrap_content" 37 android:layout_weight="1" 38 android:text="山田太郎" /> 39 40 <TextView 41 android:id="@+id/textView5" 42 android:layout_width="match_parent" 43 android:layout_height="wrap_content" 44 android:layout_weight="1" 45 android:text="テストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテスト" /> 46 </LinearLayout> 47</LinearLayout>
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。