aboutsummaryrefslogtreecommitdiff
path: root/mediapicker/src/main/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'mediapicker/src/main/kotlin')
-rw-r--r--mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerActivityBase.kt5
-rw-r--r--mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerCore.kt5
2 files changed, 5 insertions, 5 deletions
diff --git a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerActivityBase.kt b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerActivityBase.kt
index c7cff55..ad83d8a 100644
--- a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerActivityBase.kt
+++ b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerActivityBase.kt
@@ -110,11 +110,12 @@ abstract class MediaPickerActivityBase(
*/
private fun setToolbarScrollable(scrollable: Boolean) {
val params = kau_toolbar.layoutParams as AppBarLayout.LayoutParams
- if (scrollable)
+ if (scrollable) {
params.scrollFlags = AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS or
AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL
- else
+ } else {
params.scrollFlags = 0
+ }
}
override fun onLoadFinished(loader: Loader<Cursor>, data: Cursor?) {
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 d21b33f..cc6df81 100644
--- a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerCore.kt
+++ b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerCore.kt
@@ -147,9 +147,8 @@ abstract class MediaPickerCore<T : GenericItem>(
recycler.apply {
val manager = object : GridLayoutManager(context, computeColumnCount(context)) {
override fun getExtraLayoutSpace(state: RecyclerView.State?): Int {
- return if (mediaType != MediaType.VIDEO) extraSpace else super.getExtraLayoutSpace(
- state
- )
+ return if (mediaType != MediaType.VIDEO) extraSpace
+ else super.getExtraLayoutSpace(state)
}
}
setItemViewCacheSize(CACHE_SIZE)