我已经定义了一个这样的视图翻转器:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_marginRight="5dp"
xmlns:android="http://schemas.android.com/apk/res/android">
<TextView android:id="@+id/Heading001" android:gravity="center"
android:layout_width="105dp" android:layout_height="40dp"
android:layout_marginLeft="10dp" android:layout_marginRight="20dp"
android:layout_marginTop="5dp" android:text="XXX" android:textSize="25sp"
android:background="@drawable/rectanglefield" android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView android:id="@+id/tvLongName" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_alignParentBottom="false"
android:layout_alignParentTop="true" android:layout_marginTop="0dp"
android:gravity="center" android:layout_toRightOf="@+id/Heading001"
android:text="XXX" android:textAppearance="?android:attr/textAppearanceMedium"
android:typeface="normal" />
<TextView android:id="@+id/tvUsage" android:layout_below="@+id/tvLongName"
android:layout_toRightOf="@id/Heading001" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:layout_marginRight="5dp"
android:textColor="#ff0000" android:text="R"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView android:id="@+id/tvCardinality"
android:layout_height="wrap_content" android:layout_width="50dp"
android:layout_alignParentRight="false" android:layout_below="@+id/tvLongName"
android:layout_toRightOf="@+id/tvUsage" android:layout_marginRight="5dp"
android:text="(0..1)" android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView android:id="@+id/tvDatatype" android:gravity="center_vertical"
android:layout_width="wrap_content" android:layout_height="40dp"
android:layout_marginLeft="10dp" android:layout_marginRight="15dp"
android:layout_marginTop="5dp" android:layout_alignParentRight="true"
android:text="XX" android:textColor="#000000" android:background="@drawable/rectanglewhite"
android:textSize="25dp" android:textAppearance="?android:attr/textAppearanceMedium" />
<ViewFlipper android:id="@+id/viewFlipper1"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:layout_alignRight="@+id/Heading001" android:layout_weight="1"
android:layout_marginRight="50dp">
<include android:id="@+id/flipperView02" android:layout_width="wrap_content"
layout="@layout/detail_item_view02" />
<include android:id="@+id/flipperView01" android:layout_width="wrap_content"
layout="@layout/detail_item_view01" />
</ViewFlipper>
</RelativeLayout>
FlipperView01 视图的定义如下:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android">
<TextView android:id="@+id/tvNotes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="55dp"
android:text="abcdef ef abcdef abcdef "
android:textAppearance="?android:attr/textAppearanceMedium"/>
</LinearLayout>
我遇到的问题是我希望“flipperView01”中的 TextView 是对话框的全宽,目前它不是只是非常窄
我该如何解决?