Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android table layout rowspan

I want to build the following layout but it is not working.

alt text http://toms-toy.de/rowspan.gif

<LinearLayout android:orientation="horizontal"...>
  <ImageView ...></ImageView>
        <TableLayout ...>
                        <TableRow..>
                              <ImageView ...></ImageView>
                              <ImageView ...></ImageView>
                              <ImageView ...></ImageView>
                        </TableRow>
                         <TableRow..>
                              <ImageView ...></ImageView>
                              <ImageView ...></ImageView>
                              <ImageView ...></ImageView>
                        </TableRow>
       </TableLayout>
  <ImageView ...></ImageView>
</LinearLayout>
like image 488
d-man Avatar asked Feb 03 '10 05:02

d-man


1 Answers

I put this together really fast, try this:

alt text

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent">
    <ImageView android:layout_width="50dip" android:layout_height="100dip" android:background="#cc0000"/>
    <TableLayout android:layout_width="wrap_content" android:layout_height="wrap_content">
        <TableRow>
            <ImageView android:layout_width="50dip" android:layout_height="50dip" android:background="#aaaa00"/>
            <ImageView android:layout_width="50dip" android:layout_height="50dip" android:background="#00aa00"/>
            <ImageView android:layout_width="50dip" android:layout_height="50dip" android:background="#aaaa00"/>
        </TableRow>
        <TableRow>
            <ImageView android:layout_width="50dip" android:layout_height="50dip" android:background="#00aa00"/>
            <ImageView android:layout_width="50dip" android:layout_height="50dip" android:background="#aaaa00"/>
            <ImageView android:layout_width="50dip" android:layout_height="50dip" android:background="#00aa00"/>
        </TableRow>
    </TableLayout>
    <ImageView android:layout_width="50dip" android:layout_height="100dip" android:background="#cc0000"/>
</LinearLayout>
like image 67
jeffh Avatar answered Oct 14 '22 19:10

jeffh