kristiyanP / colorpicker

A simple color picker library for Android
Apache License 2.0
193 stars 43 forks source link

colorPicker.setFastChooser wrong in MD #36

Open Tybion opened 3 years ago

Tybion commented 3 years ago

For example 2, change .. colorPicker.setFastChooser(new ColorPicker.OnFastChooseColorListener() { .. to .. colorPicker.setOnFastChooseColorListener(new ColorPicker.OnFastChooseColorListener() {

And if you want a Kotlin example ..

        val colorPicker = ColorPicker(this)
        colorPicker.setColors(hexArrrayList)
        colorPicker.setColumns(4)
        colorPicker.setOnFastChooseColorListener(object : ColorPicker.OnFastChooseColorListener {

            override fun setOnFastChooseColorListener(position: Int, color: Int) {
                // put code
            }

            override fun onCancel() {
                // put code
            }
        })
        colorPicker.show()