本文介紹了更改光標(biāo)在展開的 EditText 中的開始位置的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!
問題描述
限時送ChatGPT賬號..
我的 TextField 從其正常的單行寬度和高度擴(kuò)展,但是當(dāng)我更改文本字段的高度時,開始在 EditText 中輸入的光標(biāo)始終位于擴(kuò)展文本字段的中心,這就是它開始放置文本的位置也是.
I have TextField that is expanded from its normal single line width and height but the cursor to start typing in the EditText is always in the center of the expanded textfield when I change the height of the textfield and thats where it starts putting text too.
我怎樣才能像往常一樣將光標(biāo)移到左上角,同時仍然保持更大的高度框?
How can I get the cursor to the top left corner like normal while still keeping a bigger height box?
這就是我的盒子的布局
推薦答案
在你的xml中設(shè)置這個
set this in your xml
android:gravity="top"
你也可以試試這個
android:gravity="top | left"
這篇關(guān)于更改光標(biāo)在展開的 EditText 中的開始位置的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!