No ideas? I thought that several of you would be good at this by now.
Do I need to create a custom layout class? Or will one of the existing layouts work? Nathan On Feb 9, 4:46 pm, Nathan <nathan.d.mel...@gmail.com> wrote: > I'm still trying to figure out how best to layer views on top of other > views. I want to do something like the ZoomButtons on top of a custom > view. I tried getting the ZoomButtonsController's parent and then > adding views, but I didn't have enough control and they ended up on > top of the buttons. > > I've gotten close by using a FrameLayout and some gravity on the top > two views. But this has some interesting effects. Since this is > contained with a tab, these two top views appear on top of all four of > the tab pages. I want them on top of one of those pages only. > Apparently, nested FrameLayouts don't mix well. > > What is the proper and expected way to do this? > > Here is more or less my complete layout, in case that helps. > > <?xml version="1.0" encoding="utf-8"?> > <TabHost xmlns:android="http://schemas.android.com/apk/res/android" > android:id="@android:id/tabhost" android:layout_width="fill_parent" > android:layout_height="fill_parent"> > <LinearLayout android:orientation="vertical" > android:layout_width="fill_parent" > android:layout_height="fill_parent"> > <TabWidget android:id="@android:id/tabs" > android:layout_width="fill_parent" > android:layout_height="wrap_content" /> > <FrameLayout android:id="@android:id/tabcontent" > android:layout_width="fill_parent" > android:layout_height="fill_parent"> > <LinearLayout android:id="@+id/map_panel" > android:orientation="vertical" > android:layout_width="fill_parent" > android:layout_height="fill_parent"> > > > <FrameLayout > android:layout_width="fill_parent" > android:layout_height="fill_parent"> > > <MyCustomView > android:id="@+id/view_map" > android:layout_width="fill_parent" > > android:layout_height="fill_parent" /> > <TextView > android:id="@+id/text_cr" > android:layout_width="wrap_content" > > android:layout_height="wrap_content" android:textColor="@color/ > copyright_link" > android:gravity="top|right" > android:text="" > android:textSize="20sp" > > android:layout_gravity="top|right"> > > </TextView> > <SeekBar android:id="@+id/s_bar" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > android:max="20" > android:progress="9" > android:secondaryProgress="14" > android:layout_gravity="bottom"/> > > </FrameLayout> > > </LinearLayout> > <LinearLayout android:id="@+id/view_two" > android:orientation="vertical" > android:background="@drawable/red" > android:layout_width="fill_parent" > android:layout_height="fill_parent" > > > > <MySecondCustomView > android:id="@+id/view_customtwo" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:layout_weight="0.5"/> > > <ListView android:id="@+id/list_facts" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:layout_weight="0.5"/> > </LinearLayout> > > <TextView android:id="@+id/view_three" > android:background="@drawable/green" > android:layout_width="fill_parent" > android:layout_height="fill_parent" > android:text="@string/tab_three"/> > > <TextView android:id="@+id/view_four" > android:background="@drawable/yellow" > android:layout_width="fill_parent" > android:layout_height="fill_parent" > android:text="@string/tab_four"/> > </FrameLayout> > </LinearLayout> > </TabHost> > > Thanks > > Nathan -- 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