Я хочу, чтобы ScrollView TableLayout имел ту же высоту, что и экран, но почему-то таблица занимает половину экрана, тогда как ScrollView выполняет весь экран по своему усмотрению.Android TableLayout внутри ScrollView
Я попытался изменить высоту таблицы и строк как wrap_content, но показывая тот же результат. Также не работает также изменение высоты стола как фиксированной высоты (например, 900dp). Даже последняя высота строки не показывает полную рейтинговую шкалу. Кажется, что таблица вынуждена иметь определенную ширину.
Если я удалю ScrollView, он работает нормально.
Может ли кто-нибудь помочь.
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:background="@drawable/border"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".EditEntry" >
<TableLayout
android:id="@+id/tableLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TableRow
android:id="@+id/tr3a"
android:padding="2.5dp"
android:background="@color/col1"
android:gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1" >
<TextView
android:id="@+id/lab_bookname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/bookname" />
<EditText
android:id="@+id/bookname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="@string/definputtext2" />
</TableRow>
<TableRow
android:id="@+id/tr3"
android:padding="2.5dp"
android:background="@color/col2"
android:gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1" >
<TextView
android:id="@+id/lab_printname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/print_name" />
<EditText
android:id="@+id/printname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="@string/definputtext2" />
</TableRow>
......................
......................
......................
</TableLayout>
</ScrollView>
Попробуйте сделать высоту вашего Scrollview к '' fill_parent' андроида: layout_height = "fill_parent" ' – GrIsHu
нет удара, тот же результат – abdfahim
@abdfahim вы исправить проблему? – Karthi