EditText 레이아웃 속성
입력창을 한줄쓰기만 가능하고, enter를 막기 위해 EditText에 아래와 같은 속성을 사용하였습니다.
<EditText android:id="@+id/join_activity_et_password" android:layout_width="fill_parent" android:layout_height="fill_parent" android:textSize="18sp" android:singleLine="true" android:lines="1"/> |
위의 속성들 중 singline 속성은 한줄쓰기가 가능하게 합니다.
lines 속성의 값을 1로 하면 enter를 눌렀을 경우 다음 EditText로 이동합니다.
더 이상 이동할 EditText가 없을 경우 키보드는 자동으로 사라집니다.
'Android > Samples & Tips' 카테고리의 다른 글
[Android] Vibrator - 바이브레이터, 진동 (0) | 2011.03.22 |
---|---|
[Android] FLAG_SHOW_WHEN_LOCKED : LOCK 위로 액티비티 띄우기 (0) | 2011.03.22 |
[Android] 바탕화면에서 투명액티비티 띄우기 - 반투명 액티비티 만들기 (10) | 2011.02.25 |
[Android] 나인패치 draw9patch.bat 실행이 안될 때 (0) | 2011.02.03 |
[Android Error] TASK 에러 - Activity가 아닌곳에서 startActivity 사용 (1) | 2011.01.06 |