3
ListView를 포함하는 TableLayout을 만들었습니다. dp로 설정하여 listView의 크기를 정의합니다. 내 문제는 작은 화면으로 모바일에 응용 프로그램을 업로드하면 listView가 화면에서 크게 (길게) 표시됩니다. ScrollView를 사용하고 그 안에 listView를 갖고 싶지 않습니다. listview의 크기를 설정하는 다른 방법이 있습니까? 사용하는 모바일에 따라 다르며 동일하지 않습니까? 목록보기의Android에서 ListView의 크기를 설정하는 방법은 무엇입니까?
사진 : http://tinypic.com/view.php?pic=2qwhoxd&s=6
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/bakgrunden"
android:orientation="vertical"
android:gravity="center|top"
android:stretchColumns="1"
android:weightSum="1.0" >
<TableRow>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</TableRow>
<TableRow
android:paddingLeft="22dp"
android:paddingRight="25dp"
android:paddingTop="15dp" >
<ListView
android:id="@+id/latest_list"
style="@style/CustomListView"
android:layout_width="wrap_content"
android:layout_height="390dp" <------- THE PROBLEM! The list gets to long for a
android:gravity="left"/> small-screen mobile.
</TableRow>
</TableLayout>