Stay organized with collections
Save and categorize content based on your preferences.
BrightnessListener
interface BrightnessListener
Listener for display brightness changes.
Summary
Public methods |
abstract Unit |
Called when the display's brightness has changed.
|
Public methods
onBrightnessChanged
abstract fun onBrightnessChanged(brightness: Float): Unit
Called when the display's brightness has changed.
Parameters |
brightness |
Float: the new brightness of the display. Value of 0.0 indicates the minimum supported brightness and value of 1.0 indicates the maximum supported brightness. Value is between 0.0f and 1.0f inclusive |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-03-13 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-13 UTC."],[],[],null,["# VirtualDisplayConfig.BrightnessListener\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nBrightnessListener\n==================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/hardware/display/VirtualDisplayConfig.BrightnessListener \"View this page in Java\") \n\n```\ninterface BrightnessListener\n```\n\n|-----------------------------------------------------------------------|\n| [android.hardware.display.VirtualDisplayConfig.BrightnessListener](#) |\n\nListener for display brightness changes.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onBrightnessChanged](#onBrightnessChanged(kotlin.Float))`(`brightness:` `[Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`)` Called when the display's brightness has changed. |\n\nPublic methods\n--------------\n\n### onBrightnessChanged\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onBrightnessChanged(brightness: Float): Unit\n```\n\nCalled when the display's brightness has changed.\n\n| Parameters ||\n|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `brightness` | [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html): the new brightness of the display. Value of `0.0` indicates the minimum supported brightness and value of `1.0` indicates the maximum supported brightness. Value is between 0.0f and 1.0f inclusive |"]]