Search code examples
androidtablelayoutandroid-tablelayout

How do I achieve this table layout design?


I want to design a table layout which is given in this pages

http://ashadegreener.co.uk/androidK/agenda.php

(Not the menus on the right side & the header with logout button)

Only the full table layout design which is given in the left side. This design is only for 10 inch Tablet not for other resolution.

Any ideas?


Solution

  • I have got the answer

        <TableLayout         
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:stretchColumns="*" 
             android:background="#FF909090">
    
            <TableRow  
                android:layout_margin="0.5dip">
    
                <TextView 
                    android:text="Invoice Number"       
                    android:background="#E7EFE7"        
                    android:layout_margin="0.5dip"          
                    android:padding="15dip"/>
                <TextView 
                    android:id="@+id/tIN" 
                    android:text="9912326989"       
                    android:background="#E7EFE7" 
                    android:layout_margin="0.5dip"          
                    android:padding="15dip" />
    
            </TableRow>
    
       </TableLayout>
    

    I had forgotten to give the layout_margin for the Table row tag.