[英]How to add padding to hint (label) of material design Outlined text field
我認為TextView
的提示不可能出現在中間,取決於您的語言本地化,只有左邊或右邊。
編輯:話雖如此,為什么不嘗試添加前面/后面的空格(空格字符),以便破解 TextView 內的提示的TextView
?
例如,如果您希望文本左對齊,請將以下內容添加到 XML
android:gravity="start"
android:hint=" This is my hint"
否則,您希望您的文本向右對齊
android:gravity="end"
android:hint="This is my hint "
注意:我添加了三個空格只是為了強調提示中的空格,但是您可以使用適合您的數量,ofc。
您可以在TextInputEditText
的開始/左側添加填充
android:paddingStart="30dp"
android:paddingLeft="30dp"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.