Skip to content

Commit

Permalink
Address the problems with the default theming in the Custom Action Pi…
Browse files Browse the repository at this point in the history
…cker
  • Loading branch information
arthur3486 committed Apr 4, 2020
1 parent 8d6293a commit 4de5164
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
Binary file modified app/release/app-release.apk
Binary file not shown.
2 changes: 1 addition & 1 deletion app/release/output.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":14,"versionName":"1.1.2","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":15,"versionName":"1.1.3","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package com.arthurivanets.bottomsheets.sheets2.dsl
import android.app.Activity
import android.content.Context
import androidx.fragment.app.Fragment
import androidx.recyclerview.widget.RecyclerView
import com.arthurivanets.bottomsheets.BottomSheet
import com.arthurivanets.bottomsheets.sheets2.Action
import com.arthurivanets.bottomsheets.sheets2.ActionPickerBottomSheet
Expand Down Expand Up @@ -69,7 +70,24 @@ class CustomActionPickerConfigBuilder internal constructor(


override fun createItemThemeApplier() : ItemThemeApplier {
return itemThemeApplier
return CustomItemThemeApplier(dividerColor, itemThemeApplier)
}


}


private class CustomItemThemeApplier(
private val dividerColor : Int,
private val itemThemeApplier : ItemThemeApplier
) : ItemThemeApplier {


override fun invoke(item : Item<*>, viewHolder : RecyclerView.ViewHolder) {
when (viewHolder) {
is DividerItem.ViewHolder -> viewHolder.setColor(dividerColor)
else -> itemThemeApplier(item, viewHolder)
}
}


Expand Down
4 changes: 2 additions & 2 deletions common/constants.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ project.ext {
releaseRepoName = "maven"
releaseUserOrg = "arthurlabs"
releaseGroupId = "com.arthurivanets.bottomsheet"
releaseVersion = "1.1.3"
releaseVersionCode = 15
releaseVersion = "1.1.4"
releaseVersionCode = 16
releaseWebsite = "https://github.com/arthur3486/bottomsheet"
releaseLicense = ["Apache-2.0"]

Expand Down

0 comments on commit 4de5164

Please sign in to comment.