일부 콘텐츠가 포함 된 목록보기를 갖고 싶습니다. 그리고 그 아래에, 당신이 listview의 buttom으로 스크롤 할 때, 새로운 헤더 뷰가 표시되고 새로운리스트 뷰가 표시 될 것입니다. 가능합니까?목록보기 목록보기 android
// 편집 두 목록보기에는 differet 레이아웃 xml이 있어야합니다.
두 번째 listview를 첫 번째 footview에 넣으려고했습니다. 그러나 두 번째 목록보기는 작을 것입니다.
은 여기 내 레이아웃
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:id="@+id/header"
android:background="@drawable/app_topbar" android:layout_width="fill_parent"
android:orientation="horizontal" android:layout_height="wrap_content"
android:layout_alignParentTop="true">
<TextView android:text="@string/headline_notused"
android:gravity="center" android:textSize="24sp" android:textStyle="bold"
android:textColor="@color/txtcolor" android:layout_width="fill_parent"
android:layout_height="fill_parent"></TextView>
</LinearLayout>
<ProgressBar android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_below="@+id/header"
android:visibility="gone" style="?android:attr/progressBarStyleHorizontal"
android:id="@+id/progressbarHorizontal" />
<ListView android:id="@+id/notUsedList" android:divider="@android:color/transparent"
android:dividerHeight="5dip" android:layout_height="wrap_content"
android:layout_marginBottom="5dip" android:layout_width="fill_parent"
android:layout_weight="1"
android:layout_below="@+id/progressbarHorizontal"></ListView>
<LinearLayout android:orientation="vertical"
android:layout_below="@+id/notUsedList" android:background="@drawable/app_background"
android:layout_marginBottom="55dip" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout android:id="@+id/myUsedHeader"
android:background="@drawable/app_topbar" android:layout_marginTop="10dip"
android:layout_width="fill_parent" android:orientation="horizontal"
android:layout_height="wrap_content" android:layout_alignParentTop="true">
<TextView android:text="@string/headline_used" android:gravity="center"
android:textSize="24sp" android:textStyle="bold" android:textColor="@color/txtcolor"
android:layout_width="fill_parent" android:layout_height="fill_parent"></TextView>
</LinearLayout>
<ListView android:id="@+id/usedList"
android:divider="@android:color/transparent" android:dividerHeight="5dip"
android:layout_height="fill_parent" android:layout_width="fill_parent"></ListView>
</LinearLayout>
</RelativeLayout>
어댑터를 초기화 할 때 목록 및 목록 항목의 레이아웃을 설정합니다. 나는 그 문제를 이해하지 못한다 ... 첫 번째 목록은 두 번째 항목과 아무 상관이 없다. – rf43
귀하의 의견을 이해하지 못합니다 : 귀하의 목록보기를 새로운 것으로 바꾸거나 다른 행 레이아웃의 일부 항목을 추가하여 이전의 목록보기를 더 길게 만드시겠습니까? –
행 레이아웃이 다른 일부 항목을 추가하여 이전 목록 뷰를 더 오랫동안 만들 수 있습니다. 또한 새 머리글을 추가해야합니다. 이해하기 어려운 경우 죄송합니다. – Casper