通常、ListViewを使用して、画像とテキストをListViewアイテムに追加するのは簡単です。カスタムアダプタを使用して、アダプタとsetListAdapter(アダプタ)を作成します。
ImageViewと同じリストを含むFragmentアプリを作成したいと思います。例を検索しましたが、画像のあるものは見つかりませんでした。誰かが私に例を教えてくれませんか?それがどのように行われるかを見ることができますか?
それはレイアウトランドXMLで行われますか?たとえば、次のxmlを使用してそれをどのように宣言しますか。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent" android:layout_height="match_parent">
<fragment class="com.demo.android.FragmentLayout$ArticleFragment"
android:id="@+id/article" android:layout_weight="1"
android:layout_width="0px" android:layout_height="match_parent" />
<FrameLayout android:id="@+id/details" android:layout_weight="1"
android:layout_width="0px" android:layout_height="match_parent"
android:background="?android:attr/detailsElementBackground" />
</LinearLayout>