Paste your text here.<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent" android:layout_width="fill_parent"
android:orientation="vertical"
>
<ScrollView android:id="@+id/ScrollView01" android:layout_weight="1" android:layout_height="wrap_content" android:layout_width="wrap_content">
<TableLayout android:id="@+id/TableLayout01" android:layout_width="fill_parent" android:layout_weight="1" android:layout_height="fill_parent" android:stretchColumns="0,1">
<TableRow android:id="@+id/TableRow01" android:layout_height="wrap_content" android:fitsSystemWindows="true" android:layout_width="fill_parent">
<CheckBox android:id="@+id/CheckBox01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/flyer_01" android:gravity="bottom"></CheckBox>
<CheckBox android:id="@+id/CheckBox02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/flyer_02" android:gravity="bottom"></CheckBox>
</TableRow>
<TableRow android:id="@+id/TableRow02" android:layout_height="wrap_content" android:fitsSystemWindows="true" android:layout_width="fill_parent">
<CheckBox android:id="@+id/CheckBox03" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/flyer_03" android:gravity="bottom"></CheckBox>
<CheckBox android:id="@+id/CheckBox04" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/flyer_04" android:gravity="bottom"></CheckBox>
</TableRow>
<TableRow android:id="@+id/TableRow02" android:layout_height="wrap_content" android:fitsSystemWindows="true" android:layout_width="fill_parent">
<CheckBox android:id="@+id/CheckBox05" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/flyer_05" android:gravity="bottom"></CheckBox>
<CheckBox android:id="@+id/CheckBox06" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/flyer_06" android:gravity="bottom"></CheckBox>
</TableRow>
</TableLayout></ScrollView><LinearLayout android:id="@+id/LinearLayout01" android:layout_height="wrap_content" android:layout_width="fill_parent"><TextView android:id="@+id/TextView01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Add to:"></TextView>
<Spinner android:id="@+id/Spinner01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1"></Spinner>
<ImageButton android:id="@+id/ImageButton01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/add_to_list" android:onClick="onAddToList"></ImageButton>
</LinearLayout>
</LinearLayout>
Jul 6, 2010
Элементы на одном уровне с ScrollView
Неожиданная проблема с полем прокрутки. Оно перекрывает все элементы на экране. В сети есть несколько решений этой проблемы. Но все оказалось очень просто.
Для того чтобы ScrollView поделилось местом на экране с другими элементами нужно установить ему android:layout_weight="1". Далее привожу пример кода:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment