Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- junit
- Github 등록
- docker에서 mysql 실행
- Android Flavor
- TextView 일부분
- 5회 인증
- AWS
- sourceSet
- Location Permission
- Chat GPT
- 팝업 바깥 레이어
- git
- Linux 패키지 관리자
- mac 패키지 관리자
- git cannot identify version of git executable
- PHP Storm
- 안드로이드 자동으로 포커싱
- XML Opacity
- 챗GPT
- codeigniter
- 다음으로 이동
- Android Studio
- 여러 개
- 챗지피티
- InvalidTestClassError
- MySQL
- nextFocusDown
- Execution failed for task ':test'.
- php
- Github Token
Archives
- Today
- Total
128june
[Android Studio] activity 시작 시 editText 자동 포커싱 막기 본문
반응형
안드로이드 기종마다 다양한 것들이 존재하는데,
이번에 발생한 문제는 S7에서 editText에 자동으로 focus 되는 것이었다.
먼저 해결에 큰 도움을 주신 블로그를 ... itpangpang.xyz/303
TextView, Button 등등 Focus 주기
TextView, Button 등등 Focus 주기 ㆍ 이번에는 TextView나 Button 또는 LinearLayout등 EditText외에도 다른 위젯들에 focus를 주는 방법에 대해 알아보겠습니다. ㆍ 사실 뭐 EditText 외에 다른 View에 Focus..
itpangpang.xyz
해결방법은 다음과 같다.
1. 먼저 포커싱을 줄 항목과 뺄 항목의 setFocusableInTouchMode 설정을 true로 만들어준다. ( 되도록 모두 )
2. 특정 부분에 포커싱을 준다.
3. 로그로 확인해본다.
// 포커싱 줄 항목
((ImageView)findViewById(R.id.imageView44)).setFocusableInTouchMode(true);
// 포커싱 뺄 항목
mEditLogin.setFocusableInTouchMode(true);
mEditPw.setFocusableInTouchMode(true);
// 포커싱 주기
((ImageView)findViewById(R.id.imageView44)).requestFocus();
// 로그로 currentFocus 확인
Log.e("JUNE_focus_test", "focus 테스트 완료 = " + getCurrentFocus());
로그인 화면에서 이메일과 패스워드를 입력하는 부분이 자동으로 포커싱 되어서 문제였는데
기가막힌 해결방안을 찾을 수 있어 위와 같이 빠르게 해결할 수 있었다.
반응형
'Android Studio' 카테고리의 다른 글
[Android Studio] 팝업 바깥 레이어 클릭해도 창이 닫히지 않도록 설정 (0) | 2020.12.22 |
---|---|
[Android Studio] "Caused by: java.lang.IllegalStateException: Only fullscreen opaque activities can request orientation" 오류 해결방안 (0) | 2020.09.15 |
[Android Studio] 소프트 키패드 다음/완료/로그인/키패드 없애기 동작 수행 (0) | 2020.08.06 |
[Android Studio] GridView Item 범위 선택하기 (0) | 2020.07.30 |
[Android Studio] 둥근 도형 만들기 ( Shape Drawable ) (0) | 2020.07.29 |
Comments