簡體   English   中英

強制EditText向下滾動到某個位置

[英]Force an EditText to scroll down to a certain spot

如何使帶有垂直滾動條的多行EditText下降到某個位置? 我想在Java代碼中執行此操作,並且我希望使用EditText進行操作,但是如果需要,我願意使用ScrollView。

EditText XML:

<EditText
android:id="@+id/theTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:inputType="textAutoCorrect|textMultiLine"
android:scrollbars="vertical"
android:width="0dp" >

您可以嘗試從視圖中使用scrollTo api。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM