aboutsummaryrefslogtreecommitdiff
path: root/colorpicker
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2018-09-09 11:59:24 -0400
committerGitHub <noreply@github.com>2018-09-09 11:59:24 -0400
commitd540934915da26ab2cec4c897e973be35e0bfe24 (patch)
tree6f114d080c168381266a0d5d3a40b685e28b8e9a /colorpicker
parent718a51ed00a0a5c3dc7a655e617308e82da65d1a (diff)
downloadkau-d540934915da26ab2cec4c897e973be35e0bfe24.tar.gz
kau-d540934915da26ab2cec4c897e973be35e0bfe24.tar.bz2
kau-d540934915da26ab2cec4c897e973be35e0bfe24.zip
Clean up kotterknife (#161)
* Remove bindview implementations internally * Remove more bindView calls * Make config private in ElasticRecyclerActivity * Fix recyclerview * Update adapter * Improve swipe destroy and add direction to swipe finish
Diffstat (limited to 'colorpicker')
-rw-r--r--colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerView.kt45
1 files changed, 27 insertions, 18 deletions
diff --git a/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerView.kt b/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerView.kt
index dfb0773..b9cea99 100644
--- a/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerView.kt
+++ b/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerView.kt
@@ -56,30 +56,39 @@ internal class ColorPickerView @JvmOverloads constructor(
}
}
- private val gridView: FillGridView by bindView(R.id.md_grid)
- private val customFrame: LinearLayout by bindView(R.id.md_colorChooserCustomFrame)
- private val customColorIndicator: View by bindView(R.id.md_colorIndicator)
- private val hexInput: EditText by bindView(R.id.md_hexInput)
- private val alphaLabel: TextView by bindView(R.id.md_colorALabel)
- private val alphaSeekbar: SeekBar by bindView(R.id.md_colorA)
- private val alphaValue: TextView by bindView(R.id.md_colorAValue)
- private val redSeekbar: SeekBar by bindView(R.id.md_colorR)
- private val redValue: TextView by bindView(R.id.md_colorRValue)
- private val greenSeekbar: SeekBar by bindView(R.id.md_colorG)
- private val greenValue: TextView by bindView(R.id.md_colorGValue)
- private val blueSeekbar: SeekBar by bindView(R.id.md_colorB)
- private val blueValue: TextView by bindView(R.id.md_colorBValue)
+ private val gridView: FillGridView
+ private val customFrame: LinearLayout
+ private val customColorIndicator: View
+ private val hexInput: EditText
+ private val alphaLabel: TextView
+ private val alphaSeekbar: SeekBar
+ private val alphaValue: TextView
+ private val redSeekbar: SeekBar
+ private val redValue: TextView
+ private val greenSeekbar: SeekBar
+ private val greenValue: TextView
+ private val blueSeekbar: SeekBar
+ private val blueValue: TextView
private var customHexTextWatcher: TextWatcher? = null
private var customRgbListener: SeekBar.OnSeekBarChangeListener? = null
init {
- init()
- }
-
- @SuppressLint("PrivateResource")
- private fun init() {
+ //noinspection PrivateResource
View.inflate(context, R.layout.md_dialog_colorchooser, this)
+ gridView = findViewById(R.id.md_grid)
+ customFrame = findViewById(R.id.md_colorChooserCustomFrame)
+ customColorIndicator = findViewById(R.id.md_colorIndicator)
+ hexInput = findViewById(R.id.md_hexInput)
+ alphaLabel = findViewById(R.id.md_colorALabel)
+ alphaSeekbar = findViewById(R.id.md_colorA)
+ alphaValue = findViewById(R.id.md_colorAValue)
+ redSeekbar = findViewById(R.id.md_colorR)
+ redValue = findViewById(R.id.md_colorRValue)
+ greenSeekbar = findViewById(R.id.md_colorG)
+ greenValue = findViewById(R.id.md_colorGValue)
+ blueSeekbar = findViewById(R.id.md_colorB)
+ blueValue = findViewById(R.id.md_colorBValue)
}
fun bind(builder: ColorContract, dialog: MaterialDialog) {