Skip to content

Set Color methods, why where they removed ? #1

@LucianoRufo

Description

@LucianoRufo

Hello,

First and foremost, very good work, I really liked the buttons and they fit perfectly a project I'm developing, so thank you.

But as I see through the library versions you removed the methods which set the color of the neon button and its text, so I had to make my own custom class and adapt these methods which you already had in other versions.

Just took the last version and added these methods and they seem to work.

override fun setTextColor(color: Int) {
        super.setTextColor(color)
        textPaint.color = textColors.getColorForState(IntArray(android.R.attr.state_enabled), textColors.defaultColor)
        textPaint.setShadowLayer(20f, 0f, 0f, textColors.defaultColor)
        invalidate()
 }
fun setNeonColor(color: Int) {
        borderPaint.color = color
        shadowPaint.color = color
        fillPaint.color = color
        fillPaint.alpha = 20
        invalidate()
}

I don't understand if you removed them for something in particular or if you didn't intend this and it is an issue.

Yours sincerely,
Luciano Rufo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions