I'm quite new to Android I have a very handy layout that does not work yet: & Lt; Button Android: layout_width = "fill_parent" Android: layout_height = "wrap_content" android: text = "startup service" / & gt; & Lt; / LinearLayout & gt;
Now my problem is that the piece spans the entire available height in an activity, I want it to be able to see the button below, but I do not really know that How to layout this thing.
I tried to use the RelayLealout, but I ended up with the buttons shown above the section that looks ugly What am I doing wrong? Height is set and everything works as expected.
Android: android: layout_width = "fill_parent" Android: layout_height = "Fill_parent" xmlns: android = "http://schemas.android.com/apk/res/android" Android: id = "@ + ID / Relative Layout" & gt; & Lt; Piece Android: layout_width = "fill_parent" Android: layout_height = "match_parent" android: name = "pl.nscr.playwatch.MainActivity $ WatchListFragment" android: id = "@ + id / Watchlist" Android: layout_above = "@ + id / BtnStartService "/> & Lt; Button Android: Layout_width = "Fill_parent" Android: Layout_height = "Wrap_content" Android: layout_alignParentBottom = "true" android: id = "@ id / btnStartService" android: text = "serve" / & gt; & Lt; / RelativeLayout & gt;
following
- Add android: orientation = "vertical"
of lt specialty and; LinearLayout & gt; - Adding layout_weight = "1" to
for attribute & lt; Piece / & gt;
Comments
Post a Comment