나는이 순서로 레이아웃이 있습니다 : imageview, ratingbar 및 tabhost (사용자 및 정보 검토 포함). 사용자의 탭 호스트 검토를 위해 사용자 정의 listview를 사용하고 있으며 사용자의 모든 리뷰를 성공적으로 표시했습니다. 하지만 내 문제는, 당신은 (ListView 만 표시 1 항목
내가 만들고 싶어이 하나 개의 레이아웃 (목록보기 높이 내가 그것을 이동하면, 모든 데이터를로드 할 수 있습니다, 단 1 개 항목에 대한 내용을 포장입니다) 이미지 아래에 볼 수 있습니다 그것은 내 레이아웃 XML 여기
)
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<!-- HEADER -->
<LinearLayout
android:id="@+id/header"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_centerHorizontal="true"
android:background="#dcdcdc"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:layout_alignParentTop="true">
<ImageView
android:id="@+id/ivplacedetail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:src="@drawable/search"/>
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Name" />
<RatingBar
android:id="@+id/ratingBar1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<!-- FOOTER -->
<LinearLayout
android:id="@+id/footer"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:background="#a9d633">
<Button
android:id="@+id/btnhome"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:text="Home"
android:background="@layout/round_border"/>
<Button
android:id="@+id/btnbookmark"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:text="Bookmark"
android:background="@layout/round_border"/>
<Button
android:id="@+id/btnnearby"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:text="Nearby"
android:background="@layout/round_border"/>
</LinearLayout>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="@+id/footer"
android:layout_below="@+id/header">
<TabHost
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</LinearLayout>
</TabHost>
</ScrollView>
</RelativeLayout>
내 문양을 부모의 높이와 같은 여러 항목을 표시 tview 사용자 정의 레이아웃은 여기
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/imguser"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:src="@drawable/atmicon"
android:scaleType="fitCenter">
</ImageView>
<TextView
android:id="@+id/lbluser"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="3dp"
android:layout_marginBottom="1dp"
android:layout_toRightOf="@+id/imguser"
android:textColor="#4068ec"
android:text="Nama User">
</TextView>
<TextView
android:id="@+id/lblwaktu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/imguser"
android:layout_below="@+id/lbluser"
android:layout_marginLeft="5dp"
android:layout_marginTop="1dp"
android:layout_marginBottom="1dp"
android:text="Waktu Review">
</TextView>
<TextView
android:id="@+id/lblreview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/imguser"
android:layout_below="@+id/lblwaktu"
android:layout_marginLeft="5dp"
android:layout_marginTop="1dp"
android:layout_marginBottom="1dp"
android:text="isi Review">
</TextView>
</RelativeLayout>
내 목록보기 레이아웃은
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ListView
android:id="@+id/lvreview"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</LinearLayout>
누군가 내 레이아웃을 해결하기 위해 나를 도와 줄 수
? 모든
어댑터에 로그인 할 때 값이 10이나 1이됩니다. 루프가 완료되기 전에 어댑터가 채워진 것일 수 있습니다. – Elltz
모든 데이터 (검토)가 이미 표시되어 있지만 문제가 있습니다. 이제 높이가 1 데이터 (리뷰)에 대한 것입니다. – Kaizternn