switch to RelativeLayout, putting lock checkbox at top and play game

button in the middle with everything else scrolling in between.  This
particular application of RelativeLayout works on 1.5 (in emulator).
This commit is contained in:
Andy2 2010-11-07 15:13:39 -08:00
parent aff3c9a931
commit 83ae8d316c

View file

@ -14,23 +14,38 @@
limitations under the License.
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/screen"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<!-- only one direct child possible -->
<LinearLayout android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
>
<CheckBox android:id="@+id/game_locked_check"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/game_locked"
android:visibility="gone"
android:layout_alignParentTop="true"
/>
<!-- This guy's at the bottom of the screen! -->
<Button android:id="@+id/play_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/play"
android:layout_alignParentBottom="true"
/>
<ScrollView android:id="@+id/screen"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_below="@id/game_locked_check"
android:layout_above="@id/play_button"
>
<!-- only one direct child possible -->
<LinearLayout android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<!-- players -->
<TextView style="@style/config_separator"
@ -198,12 +213,9 @@
android:entries="@array/phony_names"
/>
<Button android:id="@+id/play_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/play"
/>
</LinearLayout>
</ScrollView>
</ScrollView>
</RelativeLayout>