layout - Android view fills screen using linerlayout -


Trying to write a game, like most screens fill up with my gameview (custom view, view-generated)

I want to create an area at the bottom of the screen for the message etc. In the following I am trying to put a button to clarify this issue.

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android" Android: Orientation = "Vertical" Android: layout_width = "fill_parent" Android: layout_height = "fill_parent" & gt; & Lt; My.GameView Android: id = "@ + id / gameview" Android: layout_width = "fill_parent" android: layout_height = "wrap_content" /> & Lt; Button Android: layout_width = "fill_parent" Android: layout_height = "wrap_content" android: text = "action 1" /> & Lt; / LinearLayout & gt;  

The button never shows when it moves. If I move the button before GameView then it works with the button at the top of the screen. As it is above the GameView grabbing all the screens in any way. I have given LayoutView of GameView 1 with a button with 0 (and vice versa) to implement unlimited stuff on Game Weave (which I have not yet taken a round of my head) or I am. I'm missing something?

With LinearLayout, give weight to the layout of just 1 in GameView, Add to this should work

Even if it still does not work, use 0px for GameView layout_hete like:

  & lt; My.GameView Android: id = "@ + id / Gameview" android: layout_width = "fill_parent" android: layout_height = "0px" Android: layout_weight = "1" />  

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -