Trying to write a game such that most of the screen gets filled with my GameView (custom view, derived from View)
I then want to have an area at the bottom of the screen for messages etc. In the following I'm just trying to put a button there to illustrate the issue.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<my.GameView
android:id="@+id/gameview"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Action1" />
</LinearLayout>
When this runs the button never shows. If I move the button before the GameView then it works with the button at the top of the screen. As it is above GameView is somehow grabbing all the screen. Tried also giving GameView a layout_weight of 1 with button having 0 (and vice-versa)
Do I have to implement the onMeasure stuff in GameView (which I couldn't quite get my head round yet) or am I missing something?