Skip to content

Commit

Permalink
Update alpha and brightness values
Browse files Browse the repository at this point in the history
  • Loading branch information
massivemadness committed Nov 11, 2023
1 parent 7f06620 commit be1d328
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package com.blacksquircle.ui.uikit
import android.app.Dialog
import android.os.Bundle
import androidx.appcompat.app.AlertDialog
import androidx.core.view.doOnPreDraw
import androidx.fragment.app.DialogFragment
import com.blacksquircle.ui.uikit.databinding.DialogColorPickerBinding
import com.skydoves.colorpickerview.flag.BubbleFlag
Expand All @@ -33,9 +34,11 @@ abstract class ColorPickerDialog : DialogFragment() {

override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val binding = DialogColorPickerBinding.inflate(layoutInflater)
binding.colorPicker.setInitialColor(initialColor)
binding.colorPicker.attachAlphaSlider(binding.alphaSlideBar)
binding.colorPicker.attachBrightnessSlider(binding.brightnessSlideBar)
binding.colorPicker.doOnPreDraw {
binding.colorPicker.setInitialColor(initialColor)
}
binding.colorPicker.flagView = BubbleFlag(requireContext()).apply {
flagMode = FlagMode.FADE
}
Expand Down

0 comments on commit be1d328

Please sign in to comment.