1
일반적으로 ListView를 사용하면 ListView 항목에 이미지와 텍스트를 추가 할 수 있습니다. 사용자 정의 어댑터를 사용하여 어댑터와 setListAdapter (어댑터)를 작성하십시오.ImageView를 ListFragment에 어떻게 추가합니까?
ImageView에서 동일한 목록이 포함 된 조각 앱을 만들고 싶습니다. 나는 예제를 찾았지만 이미지가있는 것을 찾을 수 없었습니다. 누군가 어떻게 나를 볼 수 있도록 예제를 가르쳐 주시겠습니까?
레이아웃 랜드 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