Skip to content

Ask for advice on how to set the style in the conditional statement #156

@VahidGarousi

Description

@VahidGarousi

Hi, I hope you are well.
How can I set two different styles for a button in the correct or incorrect condition without overlapping styles?

    if (isChecked) {
                Paris.style(binding.btnPay).apply(R.style.Theme_PrimaryButton)
            } else {
                Paris.style(binding.btnPay).apply(R.style.Theme_SecondaryButton)
            }

The code above has a problem and does not change the whole style. It does not reset in principle and overlaps the styles

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