嗨兩行,我需要給EditText上限制爲兩行,我用下面的代碼如何限制的EditText在Android的
<EditText
android:layout_toRightOf="@+id/valettext"
android:layout_centerVertical="true"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginRight="70dp"
android:maxLines="2"
android:ellipsize="end"
android:id="@+id/note"/>
,但它不工作,它要到下一行上按下一個按鈕。
如何做到這一點。
在此先感謝。
重複的 http://stackoverflow.com/questions/7092961/edittext-maxlines-not-working-user-can-still-input-more-lines-than-set – MarkB
請檢查我代碼在這裏... http://stackoverflow.com/questions/8911638/set-maximum-number-of-text-lines-for-an-edittext/23310236#23310236 –