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>