두 개의 목록보기가 있습니다. 하나의 목록보기를 다른 목록보기의 연속으로 스크롤해야합니다. 목록 사이에는 텍스트보기가 있어야합니다. 두 목록보기를 사용하고 scrollview 내부 textview icould 두 목록을 스크롤 할 수 없습니다. 내가 scrollview없이 listview를 사용하면 두 listview 볼 수 있지만 스크롤은 계속되지 않습니다.scrollview 안에 두 개의 목록보기
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FAF0BE" >
<Button
android:id="@+id/btnheader"
android:layout_width="fill_parent"
android:layout_height="40dp"
android:background="#A1CAF1"
android:text="DisoderDetail" />
<TextView
android:id="@+id/txtTmtDnam"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/btnheader"
android:layout_marginLeft="@dimen/marginLLeft"
android:layout_marginTop="@dimen/marginTopp"
android:text="jgjggjh"
android:textColor="#000000" />
<TextView
android:id="@+id/txtdisDdtail"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/txtTmtDnam"
android:layout_marginLeft="@dimen/marginLLeft"
android:layout_marginTop="@dimen/marginTopp"
android:text="jgjggjh hjhhhjh jhjhh"
android:textColor="#000000" />
<RelativeLayout
android:id="@+id/Rvlytt2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@+id/lyt2"
android:layout_below="@id/txtdisDdtail"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/marginBottomm"
android:layout_marginTop="@dimen/marginTop"
android:orientation="horizontal" >
<ImageView
android:id="@+id/starimg1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:layout_marginTop="10dp"
android:onClick="star1Clicked"
android:src="@drawable/starunselected"
android:tag="1" />
<ImageView
android:id="@+id/starimg2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:layout_marginTop="10dp"
android:layout_toRightOf="@+id/starimg1"
android:onClick="star2Clicked"
android:src="@drawable/starunselected"
android:tag="2" />
<ImageView
android:id="@+id/starimg3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:layout_marginTop="10dp"
android:layout_toRightOf="@+id/starimg2"
android:onClick="star3Clicked"
android:src="@drawable/starunselected"
android:tag="3" />
<ImageView
android:id="@+id/starimg4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:layout_marginTop="10dp"
android:layout_toRightOf="@+id/starimg3"
android:onClick="star4Clicked"
android:src="@drawable/starunselected"
android:tag="4" />
</RelativeLayout>
<ScrollView
android:id="@+id/Scrlvw"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_below="@id/Rvlytt2" >
<RelativeLayout
android:id="@+id/rvl1"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/txtDcmt"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginTop="@dimen/marginTop"
android:text="comment"
android:textColor="#000000" />
<ListView
android:id="@+id/lstvwDis11"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/txtDcmt" >
</ListView>
</RelativeLayout>
<RelativeLayout
android:id="@+id/rvl2"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@id/rvl1"
>
<TextView
android:id="@+id/txtDrate"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@id/lstvwDis11"
android:layout_marginTop="@dimen/marginTop"
android:text="Rate"
android:textColor="#000000" />
<ListView
android:id="@+id/lstvwDis12"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/txtDrate" >
</ListView>
</RelativeLayout>
</ScrollView>
<RelativeLayout
android:id="@+id/Rvlt22"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<EditText
android:id="@+id/Edtcmmt"
android:layout_width="250dp"
android:layout_height="50dp"
android:layout_marginLeft="5dp"
android:background="#ffffff"
android:hint="Add a comment"
android:textColor="#000000" />
<Button
android:id="@+id/btnpost"
android:layout_width="130dp"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/Edtcmmt"
android:onClick="OnPostbtnclick"
android:text="Post" />
</RelativeLayout>
</RelativeLayout>
'scrollView' 안에'listView'를 넣는 것은 매우 좋지 않습니다. –
은 @shayanpourvatan에 동의합니다. 디자인을 검토해야합니다. –
계속 하시겠습니까? 그리고 스크롤 뷰의 목록보기는 프로그래밍의 좋은 방법이 아닙니다. 높이를 목록보기로 설정하는 대신. – Sush