2011-09-17 10 views
0
<?xml version="1.0" encoding="utf-8"?> 

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" 
    android:orientation="vertical" android:background="@drawable/background" 
    android:layout_width="fill_parent" android:layout_height="fill_parent" 
    android:layout_gravity="center"> 

    <LinearLayout android:layout_width="fill_parent" 
     android:layout_height="fill_parent" android:orientation="horizontal" 
     android:layout_marginBottom="50dp"> 

     <TableLayout android:layout_width="fill_parent" 
      android:layout_height="wrap_content" android:layout_marginTop="15dp"> 

      <TextView android:gravity="center" style="@style/entsweep_h_Font" 
       android:text="numbers" android:id="@+id/entsweep_head_tv"> 
      </TextView> 

      <TableRow android:layout_width="fill_parent" 
       android:layout_height="wrap_content" android:gravity="center" 
       android:layout_marginTop="10dp"> 

       <TextView android:layout_width="75dp" android:gravity="center" 
        android:layout_height="wrap_content" android:text="20" android:id="@+id/ent_submit" 
        style="@style/entsweep_Button" android:layout_marginRight="10dp"> 
       </TextView> 

       <TextView android:layout_width="75dp" android:gravity="center" 
        android:layout_height="wrap_content" android:text="50" android:id="@+id/ent_submit" 
        style="@style/entsweep_Button" android:layout_marginRight="10dp"> 
       </TextView> 

       <TextView android:layout_width="75dp" android:gravity="center" 
        android:layout_height="wrap_content" android:text="100" 
        android:id="@+id/ent_submit" style="@style/entsweep_Button"> 
       </TextView> 

      </TableRow> 

      <TableRow android:layout_width="fill_parent" 
       android:layout_height="wrap_content" android:gravity="center" 
       android:layout_gravity="center"> 

       <TextView android:gravity="center" 
        android:text="yet." 
        android:layout_height="wrap_content" android:layout_width="wrap_content" 
        android:id="@+id/ent_submit"> 
       </TextView> 

      </TableRow> 

     </TableLayout> 

    </LinearLayout> 

</RelativeLayout> 

내 문제는 3 개의 버튼이 다르게 펼쳐져 있다는 것입니다. 나는 첫 번째 버튼 아래의 textview 때문에 뻗어 있지만 버튼을 만들 수있는 방법이 있는지 궁금 해서요 같은 너비에 머물 여전히 textview 존재합니다.android tablelayout

답변

0

모든 textviews에 xml 속성 android:layout_weight="1"을 사용하십시오.

관련 문제