Problem with RelativeLayout - Sorry SOLVED

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Problem with RelativeLayout - Sorry SOLVED

Postby milkround » Sun Jun 28, 2009 8:37 am

Hi,

I am trying to layout a table with fixed Headers (A & B) as an extension to Mark Murphy's GridDemo

A B
C D

where A is a TextView
B & D are GridViews
and C is a ListView

All are the correct size and should fit.
C is defined as being below A

when D is defined as being below B - A,B & C are drawn but D is missing

when D is defined as being to the right of C - all are drawn BUT D overwites (drawn on top of) B
What am I doing wrong??

It is amazing what a bit of TOP PADDING will do - !!!!!!
Are there any better ways??

Steve

my XML for this is below - the

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:id="@+id/title"
android:text="--- Item ---"
android:width="170px"
android:gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<GridView
android:id="@+id/title2"
android:layout_toRightOf="@id/title"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:verticalSpacing="1px"
android:horizontalSpacing="2px"
android:columnWidth="50px"
android:stretchMode="columnWidth"
android:numColumns="7"
android:gravity="center_horizontal"
/>

<ListView
android:id="@+id/list1"
android:layout_width="170px"
android:layout_below="@id/title"
android:layout_height="fill_parent"
android:verticalSpacing="1px"
android:gravity="center"
/>
<GridView
android:id="@+id/grid2"
android:layout_below="@id/title2"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:verticalSpacing="1px"
android:horizontalSpacing="2px"
android:columnWidth="50px"
android:stretchMode="columnWidth"
android:numColumns="7"
android:gravity="center_horizontal"
/>
<TextView
android:id="@+id/selection"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
</RelativeLayout>
milkround
Developer
Developer
 
Posts: 34
Joined: Sat May 02, 2009 2:29 pm
Location: UK & Malta

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 5 guests