diff options
author | Allan Wang <me@allanwang.ca> | 2019-12-31 11:25:29 -0800 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2019-12-31 11:25:29 -0800 |
commit | 5388aabf0b581a69405125ec0cdaf05ae2455133 (patch) | |
tree | 17e2d344469b4cb7af5750880630ff7da31a32b4 /mediapicker/src/main/kotlin | |
parent | 91da44158d9aab832317a16fc0e63f48f3e5e940 (diff) | |
download | kau-5388aabf0b581a69405125ec0cdaf05ae2455133.tar.gz kau-5388aabf0b581a69405125ec0cdaf05ae2455133.tar.bz2 kau-5388aabf0b581a69405125ec0cdaf05ae2455133.zip |
Add lazy ui
Diffstat (limited to 'mediapicker/src/main/kotlin')
-rw-r--r-- | mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerCore.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerCore.kt b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerCore.kt index a84df8a..e65cab2 100644 --- a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerCore.kt +++ b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerCore.kt @@ -38,6 +38,7 @@ import ca.allanwang.kau.animators.FadeScaleAnimatorAdd import ca.allanwang.kau.animators.KauAnimator import ca.allanwang.kau.internal.KauBaseActivity import ca.allanwang.kau.kotlin.lazyContext +import ca.allanwang.kau.kotlin.lazyUi import ca.allanwang.kau.logging.KL import ca.allanwang.kau.permissions.kauRequestPermissions import ca.allanwang.kau.utils.dimenPixelSize @@ -131,7 +132,7 @@ abstract class MediaPickerCore<T : GenericItem>( /** * Further improve preloading by extending the layout space */ - val extraSpace: Int by lazy { resources.displayMetrics.heightPixels } + val extraSpace: Int by lazyUi { resources.displayMetrics.heightPixels } override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) |