的邊緣我的下一個糟糕的設計爲Android:佈局困難。保持文本的視圖右側,直到父母
我需要保持More infos
有圖標的黑色文本的右側。如果Item 1 of 1
將是一個更長的字符串,它會將圖標+文本推向右側。我無法弄清楚的問題是,如果左邊的文本太長而無法放在一行中,我希望More infos
被推送到其父文件的右邊緣並停留在那裏,左邊的黑色文本應該跳轉到一條新線。
但是,這不是HTML的行爲就是這樣! :)關於如何實現這一點的任何想法?
我真的想要求設計師改變設計的。
編輯
我所做的它看起來像上面:
<RelativeLayout ...>
<!--TEXT-->
<TextView
android:id="@+id/list_item_form_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/app_spacing_x0_5"
android:layout_marginTop="@dimen/app_spacing_x3"
android:textColor="@color/app_black"
android:textSize="@dimen/app_text_tiny" />
<!--VIEW DETAILS-->
<TextView
android:id="@+id/list_item_view_details_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="50dp"
android:layout_toRightOf="@id/list_item_form_text"
android:layout_alignTop="@id/list_item_form_text"
android:drawableLeft="@drawable/ic_camera"
android:drawablePadding="@dimen/app_spacing_x0_3"
android:text="@string/f_form_front_view_details" />
</RelativeLayout>
你可以分享你已經嘗試過? –
當然。看到編輯...這真的不是一個好方法。 – AndreiBogdan