반응형
EditText에 자동으로 포커스가 잡혀 불편한 적이 있을거다.
그때 포커스를 없애고 싶은 editText의 상위 레이아웃에 아래의 코드를 추가해주면 된다.
editText 대신 상위 레이아웃에 포커스를 두는 방법이다.
ex)
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
android:focusable="true"
android:focusableInTouchMode="true"
'소프트웨어 > 안드로이드[Java]' 카테고리의 다른 글
[Android] BottomNavigationView Fragment 적용 (2) | 2021.04.02 |
---|---|
[Android] BottomNavigationView 구현하기 (0) | 2021.04.01 |
[Android] 버튼 커스텀 하기 - Ripple Effect 방법 (0) | 2020.12.29 |
[Android]Thread에서 UI바꾸기 (0) | 2020.12.18 |
[Android]안드로이드 프래그먼트 오류 (1) | 2020.12.09 |