LoginSignup
3
2

More than 1 year has passed since last update.

Android 画面光度を最大に設定する方法

Posted at

今回は画面光度を最大に設定する方法を書いていこうと思います。

バーコードなどを表示するアプリでは、画面が暗いと読み取れなかったりするので、その場合に使用したりすると思います。

画面光度を最大に設定

MainActivity.kt
val layoutParams = window.attributes
layoutParams.screenBrightness = WindowManager.LayoutParams.BRIGHTNESS_OVERRIDE_FULL
window.attributes = layoutParams

これだけです!
簡単ですね!

あまり使用頻度は少ないものなので、これを見て実装できるように、記録として残しておこうと思います!

3
2
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
3
2