当前位置: 代码迷 >> Eclipse >> LinearLayout 没法居右
  详细解决方案

LinearLayout 没法居右

热度:702   发布时间:2016-04-23 02:10:47.0
LinearLayout 无法居右
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical"
  >
  <TableLayout
  android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:stretchColumns="0" >
  <TableRow
  android:layout_width="fill_parent"
  android:layout_height="40dip" >
  <LinearLayout
  android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:orientation="vertical" >
  <TextView
  android:id="@+id/chuchai_id"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:visibility="gone" 
  />
  <LinearLayout
  android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:orientation="horizontal" 
  >
  <TextView
  android:id="@+id/chuchai_applicant"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content" 
  android:text="申请人"
  />
  <TextView
android:id="@+id/chuchai_applyDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:text="时间"
/>
  </LinearLayout>

  <LinearLayout
  android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:orientation="horizontal" >

  <TextView
  android:id="@+id/eventreport_status"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:layout_weight="1" />

  <TextView
  android:id="@+id/eventreport_date"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:layout_weight="1" />
  </LinearLayout>
  </LinearLayout>

  <ImageView
  android:layout_width="21dip"
  android:layout_height="20dip"
  android:layout_gravity="center_vertical"
  />
  </TableRow>
  </TableLayout>

</LinearLayout>

------解决方案--------------------
  相关解决方案