Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color is not updated when system themewas changed #85

Open
Verona1024 opened this issue May 26, 2021 · 0 comments
Open

Color is not updated when system themewas changed #85

Verona1024 opened this issue May 26, 2021 · 0 comments

Comments

@Verona1024
Copy link

I have

dataList.forEachIndexed { index, data ->
            val layout: ConstraintLayout =
                inflater.inflate(
                    R.layout.progress_item,
                    null,
                    false
                ) as ConstraintLayout

            val leftLine = layout.findViewById<RoundCornerProgressBar>(R.id.left_line)
            leftLine.progressColor = Color.parseColor(data.leftColor)

            val rightLine = layout.findViewById<RoundCornerProgressBar>(R.id.right_line)
            rightLine.progressColor = Color.parseColor(data.rightColor)

            content.addView(layout)
        }

That works perfectly fine. But when system style changed to Day/Night all RoundCornerProgressBar items apply the last color in dataList. Other views in R.layout.progress_item works fine and apply correct color.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant