1
通常、ListViewを使用すると、画像やテキストをListViewアイテムに追加するのが簡単です。カスタムアダプタを使用してアダプタとsetListAdapter(アダプタ)を作成します。ImageViewをListFragmentにどのように追加しますか?
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>
おかげで@aneal、私は自分のために物事が複雑すぎる作っていますね。私はlistviewを使うのと同じアプローチをとってくれました。 – Byron