How can I get my own status bar below a Map fragment in Android -


i'm trying google map occupy screen, want own full width status bar @ bottom of screen underneath map. this, i'm trying use linearlayout, textview status bar. status bar never appears. xml is

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android"     android:id="@+id/activity_main"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:orientation="vertical">      <fragment         android:id="@+id/map"         android:layout_width="match_parent"         android:layout_height="wrap_content"         class="com.google.android.gms.maps.mapfragment" />                   <textview          android:id="@+id/main_status_bar"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_gravity="bottom"         android:padding = "4sp"         android:gravity="left|center_vertical"         android:text="statusbar"         />  </linearlayout> 

what doing wrong?

ps: i'm mildly concerned there are 2 choices android:layout_height, namely "wrap_content" , "match_parent". doesn't seem allow specification of status bar size needs (i.e. android:layout_height="wrap_content"), , map taking rest, because me using android:layout_height="match_parent" logically implies there's no room else. however, using

android:layout_height="wrap_content"

for both doesn't seem work.

what doing wrong?

if had guess, wrap_content isn't working mapfragment. beyond that, layout doesn't specify apparently want, anyway.

i'm mildly concerned there are 2 choices android:layout_height, namely "wrap_content" , "match_parent".

there infinite number of choices android:layout_height, can take dimension, , there infinite number of positive integers.

this doesn't seem allow specification of status bar size needs (i.e. android:layout_height="wrap_content"), , map taking rest

set android:layout_height of fragment 0dp, , set android:layout_weight="1". tells android allocate 0 pixels intrinsic height, give leftover pixels (since bar's weight 0 default). cause mapfragment take on space not consumed bottom bar.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -