0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【Android】WindowManagerで出来る使えそうな事【Kotlin】

Posted at

はじめに

前回 WindowManagerに関連した記事を書いて、その時もう少し調べてみようと思t他ので
今回はWindowManagerについて使えそうなものをピックアップして記事に残します!

画面のタッチイベント関連

画面のタッチイベントを受けらない(無効化)

window.addFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE)

画面のタッチイベントを受けらない状態を解除

window.clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE)

setSoftInputModeでソフトキーボードの制御

ソフトキーボードを常に隠す

window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN)

ソフトキーボードを常に表示

window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE)

適切なタイミングで表示

window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE)

適切なタイミングで隠す

window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN)

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?