Skip to content

Commit

Permalink
#6 fix/집터뷰 작성 화면 : 키보드 숨기는 확장 함수 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
HayleyKim0716 committed Aug 18, 2022
1 parent 9ca1466 commit 456110a
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.ftw.hometerview.extension

import android.content.Context
import android.view.inputmethod.InputMethodManager
import androidx.fragment.app.Fragment

fun Fragment.hideKeyboard() {
(context?.getSystemService(Context.INPUT_METHOD_SERVICE) as? InputMethodManager)
?.hideSoftInputFromWindow(view?.windowToken, 0)
}

0 comments on commit 456110a

Please sign in to comment.