Problem with TableLayout

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

Problem with TableLayout

Postby pmskiran » Tue Aug 25, 2009 6:18 am

Hi
Ands,

My problem is width of the TextView in the first TableRow is reflecting on the first Button of the second TableRow in the TableView, I am not able to restict the size of the Button... wht is the reason...

Any help or suggestions...
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3.  
  4.         android:layout_width="fill_parent" android:layout_height="wrap_content"
  5.  
  6.         android:padding="5px" android:stretchColumns="*">
  7.  
  8.         <TableRow android:layout_width="fill_parent" android:gravity="center_horizontal">
  9.  
  10.                 <TextView android:id="@+id/textview1" android:text="textview1"
  11.  
  12.                         android:layout_width="fill_parent"></TextView>
  13.  
  14.         </TableRow>
  15.  
  16.  
  17.  
  18.         <TableRow android:gravity="center_horizontal|center_vertical">
  19.  
  20.                 <Button android:id="@+id/button1" android:layout_width="wrap_content"
  21.  
  22.                         android:layout_height="wrap_content" android:text="P" />
  23.  
  24.                 <Gallery android:id="@+id/gallery" android:background="#55000000"
  25.  
  26.                         android:layout_width="200dp" android:layout_height="200dp"
  27.  
  28.                         android:gravity="center_vertical" android:spacing="100dp" />
  29.  
  30.                 <Button android:id="@+id/button2" android:layout_width="wrap_content"
  31.  
  32.                         android:layout_height="wrap_content" android:layout_alignParentRight="true"
  33.  
  34.                         android:layout_alignTop="@id/button1" android:text=">" />
  35.  
  36.         </TableRow>
  37.  
  38. </TableLayout>
Parsed in 0.004 seconds, using GeSHi 1.0.8.4


Please help me...
Kiran PMS
pmskiran
Junior Developer
Junior Developer
 
Posts: 12
Joined: Fri Jul 31, 2009 10:44 am
Location: India

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 14 guests