show other widgets with MapView

Discussion in 'Application Development' started by usml, Nov 19, 2010.

  1. usml

    usml Active Member
    15

    Dec 28, 2009
    38
    0
    15
    Can't get this to work (simplified layout xml) --
    <LinearLayout>
    <TextView android:text="text1" ... />
    <com.google.android.maps.MapView
    [LEFT] android:layout_width[/LEFT]
    =[SIZE=2][COLOR=#2a00ff]"fill_parent"[/COLOR][/SIZE]
    [COLOR=#2a00ff]
    [/color]
    android:layout_height=[COLOR=#2a00ff]"wrap_content"[/COLOR]
    [COLOR=#2a00ff] ...[/COLOR] />

    <TextView [SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:text="text2" ... />[/COLOR][/SIZE][/COLOR][/SIZE]
    </LinearLayout>

    Only "text1" and the mapview show up, "text2" not displayed. Replaced "LinearLayout" with "RelativeLayout" (with proper "android:layout_xxx" setups), the same problem.

    Even though "text1" get displayed, it appears that it's displayed ON TOP of the map, not side by side. So, it seems that the MapView always take the whole display space.

    Any idea on how to make "text2" shown? Thanks.
     

    Advertisement

  2. mohitjaitly

    mohitjaitly Active Member
    15

    Oct 18, 2010
    34
    0
    15
    India
    try giving value to width like - android:layout_width="200dip" etc breaking the screen width as you want, for the UI elements.
     

Share This Page

Loading...