Android - 控件android:ems屬性


Android - 控件android:ems屬性
http://blog.csdn.net/caroline_wendy/article/details/41684255?utm_source=tuicool&utm_medium=referral

 

控件android:ems屬性

xml中 android:ems屬性,作為EditText 默認生成的屬性,其含義是需要編輯的 字符串長度
設置為10時,最多編輯 10個em,一個em單位是 兩個inch,但是隨着自動調整,在Android中 em代表‘M’的數量
但是 EditText的屬性,只有在 android:layout_width=“wrap_content”時,才會顯示;
如果是 android:layout_width=“match_parent”時,則不會有變化。
 
 

<EditText
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<!-- 當前控件處於焦點狀態 -->
<requestFocus />
</EditText>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM