在相对布局中,我使用下面的代码。如果总宽度太高tvProgress
应切断。问题是我不知道如何确定应该切断哪个视图。当前的代码让我们list_lib_episodes_watched_total
切断。我怎样才能确定它tvProgress
被切断了?
...
<TextView
android:id="@+id/tvProgress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/list_lib_et_episodes_watched"
android:layout_toRightOf="@+id/list_lib_cover"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:lines="1"
android:singleLine="true"
android:text="Progress:"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/list_lib_et_episodes_watched"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/list_lib_status_spinner"
android:layout_toRightOf="@+id/tvProgress"
android:hint="0"
android:imeOptions="actionSend"
android:inputType="number"
android:maxEms="4"
android:maxLength="4"
android:text="0" />
<TextView
android:id="@+id/list_lib_episodes_watched_total"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/list_lib_et_episodes_watched"
android:layout_toLeftOf="@+id/list_lib_episodes_watched_increase"
android:layout_toRightOf="@+id/list_lib_et_episodes_watched"
android:lines="1"
android:singleLine="true"
android:text="/0"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#707070" />
<ImageButton
android:id="@+id/list_lib_episodes_watched_increase"
android:layout_width="30dp"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/list_lib_et_episodes_watched"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/list_lib_et_episodes_watched"
android:layout_marginLeft="6dp"
android:layout_marginRight="8dp"
android:adjustViewBounds="true"
android:background="@drawable/btn_transparant"
android:contentDescription="Increase by 1"
android:minWidth="60dp"
android:scaleType="centerInside"
android:src="@drawable/ic_increase" />
...