Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
mobile_scanner
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Navaron Bracke
2023-10-13 14:31:19 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e0d3b63737e9266e54452d4de4e2d9e33052d33e
e0d3b637
1 parent
18477145
add display listener class
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
android/src/main/kotlin/dev/steenbakker/mobile_scanner/MobileScannerDisplayListener.kt
android/src/main/kotlin/dev/steenbakker/mobile_scanner/MobileScannerDisplayListener.kt
0 → 100644
View file @
e0d3b63
package dev.steenbakker.mobile_scanner
import android.hardware.display.DisplayManager
/**
* This class will listen for display changes
* and executes `onUpdateResolution` when that happens.
*/
class MobileScannerDisplayListener(
private val onUpdateResolution: () -> Unit
) : DisplayManager.DisplayListener {
override fun onDisplayAdded(displayId: Int) {}
override fun onDisplayRemoved(displayId: Int) {}
override fun onDisplayChanged(displayId: Int) {
onUpdateResolution()
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment