Hey all, I don't want to waste anyone's time, but (like always) i had a breakthru five minutes after this hit the list. Here is the updated question, that shows the actual root of the problem! ________
I have a layout item (a MapView, in this case) whose height is that of the entire screen, even when the layout_height is set to wrap_content. I would like to put something below this item, and have the MapView be compressed into the remaining space on the top of the screen. I can easily put something above the MapView, and have it compress down, but getting it to compress up seems harder. <?xml version="1.0" encoding="UTF-8"?> <RelativeLayout android:layout_width="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="fill_parent" android:orientation="vertical"> <ImageView android:id="@+id/ImageView01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/height_manager"></ImageView> <org.test.EventViewerMap android:id="@+id/event_map" android:layout_width="fill_parent" android:layout_height="wrap_content" android:clickable="true" android:apiKey="my_key" android:layout_above="@id/ImageView01"/> </RelativeLayout> Thanks for any help! On Jul 31, 1:37 pm, Hamy <hamilt...@gmail.com> wrote: > Hi all, > > I would like to use an <include /> in my XML file to add a layout > below a MapView(or any other greedy layout). I have been trying for a > few hours now, and no luck so far. I was hoping someone could give me > a hand. Here is what my XML looks like now: > > <LinearLayout android:layout_width="fill_parent" > xmlns:android="http://schemas.android.com/apk/res/android" > android:layout_height="fill_parent" > android:orientation="vertical"> > > <!-- A MapView class that loads a google map --> > <org.vuphone.vandyupon.android.viewevents.EventViewerMap > android:id="@+id/event_map" android:layout_width="fill_parent" > android:layout_height="wrap_content" android:clickable="true" > android:apiKey="my_key" /> > > <include layout="@layout/event_details" /> > </LinearLayout> > > Optimally, the include could be any sort of other layout. The goal > here is to have the Google map on the top, and then have the included > layout below it. If I include the content in the layout, such as > replacing the <include /> tag with a <TextView /> then that works > correctly, so I am thinking I am mis-using the include. A trip to > hierarchy viewer shows that the included layout has no height. I have > tried putting the include first, and using a RelativeLayout to > position the map above the included layout, but I could not get that > to work correctly (the included layout took the entire screen space, > even though I explicitly said layout_height='wrap_content' > > Thanks for any help! > > PS - this is a re-post > ofhttp://stackoverflow.com/questions/1214131/using-android-includes-wit... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---