久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如何在EditText中將光標(biāo)定位在右側(cè)

How do I position the cursor on the right in EditText(如何在EditText中將光標(biāo)定位在右側(cè))
本文介紹了如何在EditText中將光標(biāo)定位在右側(cè)的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

限時(shí)送ChatGPT賬號(hào)..

我的應(yīng)用程序使用 RTL 語(yǔ)言(從右到左).

My application uses RTL language (right to left).

當(dāng) EditText 字段獲得焦點(diǎn)時(shí),光標(biāo)出現(xiàn)在左側(cè),只有當(dāng)用戶開(kāi)始鍵入時(shí),光標(biāo)(和 RTL 文本)才會(huì)向右移動(dòng).當(dāng)用戶點(diǎn)擊回車(chē)"開(kāi)始換行時(shí),光標(biāo)再次向左移動(dòng).

When the EditText field gets focus, the cursor appears on the left and only when the user starts to type, the cursor (and the RTL text) moves right. When the user clicks "enter" to start a new line, the cursor moves to the left again.

當(dāng)我使用 android:gravity="right" 時(shí),光標(biāo)正常(在右側(cè)),但當(dāng)用戶開(kāi)始鍵入時(shí),文本總是移動(dòng)到另一側(cè)(RTL 文本移動(dòng)左).

When I use android:gravity="right", the cursor is OK (on the right) but as the user starts to type the text always moves to the the other side (RTL text moves left).

任何想法如何將文本向右對(duì)齊并保持文本方向?

Any ideas how I can align text to the right AND keep the text direction?

推薦答案

它對(duì)我有用

      <EditText
            android:id="@+id/editText1"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:ellipsize="end"
            android:gravity="right" />

橢圓尺寸很重要

解決你的問(wèn)題

這篇關(guān)于如何在EditText中將光標(biāo)定位在右側(cè)的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Cut, copy, paste in android(在android中剪切、復(fù)制、粘貼)
android EditText blends into background(android EditText 融入背景)
Change Line Color of EditText - Android(更改 EditText 的線條顏色 - Android)
EditText showing numbers with 2 decimals at all times(EditText 始終顯示帶 2 位小數(shù)的數(shù)字)
Changing where cursor starts in an expanded EditText(更改光標(biāo)在展開(kāi)的 EditText 中的開(kāi)始位置)
EditText, adjustPan, ScrollView issue in android(android中的EditText,adjustPan,ScrollView問(wèn)題)
主站蜘蛛池模板: 一区二区三区四区电影视频在线观看 | 黄网站在线播放 | 欧美一二三 | 国产性网 | 国产精品网址 | av黄色片 | 手机av在线 | 91在线一区| 国产精品久久九九 | 超碰精品在线 | 成人国产精品免费观看视频 | 亚洲 中文 欧美 日韩 在线观看 | 亚洲免费视频在线观看 | 免费看啪啪网站 | 精品国产91久久久久久 | 午夜精品视频一区 | 国产乱码精品1区2区3区 | 国产高清一区二区 | 在线精品观看 | 亚洲伦理自拍 | 毛片a | 亚洲一区二区电影网 | 国产精品污www一区二区三区 | 久草成人 | av免费在线播放 | 人成在线| 国产精品一区二区久久精品爱微奶 | 亚洲欧美日韩精品久久亚洲区 | 日韩在线视频免费观看 | 99久久免费观看 | 色婷婷精品国产一区二区三区 | 精国产品一区二区三区四季综 | 免费黄色在线观看 | 少妇一区在线观看 | 国产专区在线 | 久热电影| 日韩欧美在线视频观看 | 久久午夜精品福利一区二区 | 欧美日韩精品久久久免费观看 | 精品一区二区三区在线观看 | 在线观看视频一区 |