Hi All, I am having a problem with layouts. I am sure I have just missed something stupid but if someone could point me in the right direction I would really appreciate it.
I have build a navigation system which works very well for my application, I have a scrolling "tabBar" which is a set of buttons inside a horizontal scrollView. When one of the buttons is hit I load a new Layout into the frameView. So the idea is I have a LinearLayout which contains a FrameLayout and a horozontalScrollView. Pretty simple, and worked fine while I gave the frameLayout a specific size. Now I want to support multiple device sizes I am having all sorts of issues. I used patch9s to sort out the graphics but if I pop a layout like this: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:background="@android:color/black" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <ListView android:id= "@android:id/android:list" android:layout_width="fill_parent" android:layout_height="fill_parent"/> </LinearLayout> Into my frame and I loose some of the rows ie they are there but are outside of the scrollable area. In iOS I would alter the contentSize but I can find no way of doing that. My "Tab controller" adds the views like this private FrameLayout frame; private LocalActivityManager manager; ....... frame = (FrameLayout) findViewById(R.id.tab_content_frame); if(manager == null) { manager = getLocalActivityManager(); } Intent preloader = new Intent(this,SSDEventsActivity.class); View childView = manager.startActivity(preloader.getAction(), preloader.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)).getDecorView(); frame.removeAllViews(); frame.addView(childView); Here is the layout in question: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="bottom" > <FrameLayout android:id="@+id/tab_content_frame" android:orientation="vertical" android:layout_height="fill_parent" <= if I set this it to a number it all works but looks awful on all but the one size. android:layout_width="fill_parent" android:layout_marginTop="0dip"> </FrameLayout> <HorizontalScrollView android:id="@+id/tab_button_scroller" android:orientation="vertical" android:layout_height="60dip" android:layout_width="fill_parent" android:fillViewport="true" android:layout_marginBottom="0dip" android:background="@color/black"> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_height="wrap_content" android:layout_width="wrap_content"> <ImageButton android:contentDescription="@string/tab_description_events" android:layout_marginTop="5dip" android:id="@+id/tab_button_zero" android:layout_width="50dip" android:layout_height="50dip" android:layout_marginLeft="10dip" android:layout_gravity="center" android:text="@string/tab_title_events"> </ImageButton> <ImageButton android:contentDescription="@string/tab_description_buses" android:layout_marginTop="5dip" android:id="@+id/tab_button_one" android:layout_width="50dip" android:layout_height="50dip" android:layout_marginLeft="80dip" android:layout_gravity="center" android:text="@string/tab_title_buses"> </ImageButton> <ImageButton android:contentDescription="@string/tab_description_map" android:layout_marginTop="5dip" android:id="@+id/tab_button_two" android:layout_width="50dip" android:layout_height="50dip" android:layout_marginLeft="150dip" android:layout_gravity="center" android:text="@string/tab_title_map"> </ImageButton> <ImageButton android:contentDescription="@string/tab_description_help" android:layout_marginTop="5dip" android:id="@+id/tab_button_three" android:layout_width="50dip" android:layout_height="50dip" android:layout_marginLeft="220dip" android:layout_gravity="center" android:text="@string/tab_title_help"> </ImageButton> <ImageButton android:contentDescription="@string/tab_description_info" android:layout_marginTop="5dip" android:id="@+id/tab_button_four" android:layout_width="50dip" android:layout_height="50dip" android:layout_marginLeft="290dip" android:layout_gravity="center" android:text="@string/tab_title_info"> </ImageButton> </RelativeLayout> </HorizontalScrollView> </LinearLayout> -- 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