我有一個佈局,我把i行動態地放在scrollview
內的tablelayout中。除了我不能獲得checkbox
文本到wordwrap(請參閱下面的xml
)之外,所有內容都運行正常。文本也在運行時設置。我已經搜索了互聯網,並且已經做了很多嘗試設置不同的屬性,但沒有運氣。如何wordwrap複選框文本?
這個任務可能實現嗎?
<?xml version="1.0" encoding="utf-8"?>
<TableRow xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="15dip">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<CheckBox
android:id="@+id/bes_checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="" />
<EditText
android:id="@+id/bes_kommentar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/bes_checkbox" />
</RelativeLayout>
</TableRow>
你是什麼意思wordwrap? – 2012-02-20 12:13:14
他意味着他不希望文本內容被切斷。他希望它自動換行到下一行。 – Shoerob 2014-04-14 13:03:32
我認爲如果你將複選框的maxWith屬性設置爲像150dp這樣的常量,它會包裝它的文本。 – 2016-07-13 12:04:38