From 5388aabf0b581a69405125ec0cdaf05ae2455133 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Tue, 31 Dec 2019 11:25:29 -0800 Subject: Add lazy ui --- .../src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerCore.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mediapicker/src/main') 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( /** * 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) -- cgit v1.2.3