我需要一個EditText來填充窗口的高度。 我使用這個:Android - EditText多行強制填充高度
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true" >
<EditText
android:id="@+id/text_editor"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:background="#ff0000"
android:gravity="top|left"
android:inputType="textMultiLine"
android:textColor="@android:color/white" />
</ScrollView>
但我得到的是一個行EditText上,這將是較長,滾動一次,我寫上多輸入返回按鈕的東西。 我知道我可以設置行號,但在這種情況下,它應該在不同的設備上工作,每個設備(我猜)都有不同的行數。
我該如何強迫它在高度上填充設備?
任何提示?
在沒有滾動視圖的情況下使用確實有幫助。 –