Skip to content

Change Android button background method #1296

Closed
@bradmartin

Description

@bradmartin

Change the button background styling from

      setBackground()

to

     setBackgroundTintList()


       btn.setBackgroundTintList(android.content.res.ColorStateList.valueOf(tColor.android));

I've done this programatically by creating a new android.widget.Button() and found no issues.

If this is possible without collision in other areas it would give the buttons their material design ripple effect, whereas setBackground removes the ripple effect. Will this open other issues. I didn't want to make a PR without knowing if there would be other issues or conflicts.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions