[안드로이드/Android/Kotlin] EditText에서 키보드 올리기 및 내리기

SooYeon Yeon·2022년 2월 24일
0

안드로이드/Android

목록 보기
17/25

[안드로이드/Android/Kotlin] EditText에서 키보드 올리기 및 내리기

InputMethodManager 만들기

val inputMethodManager = this.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager

키보드 올리기

inputMethodManager.showSoftInput(binding.etSearchAddress, 0)

키보드 내리기

inputMethodManager.hideSoftInputFromWindow(binding.etSearchAddress.windowToken, 0)

출처: https://jsue.tistory.com/30

0개의 댓글