question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Chip] Transparent background not works.

See original GitHub issue

Hello! I faced with issue, I can’t make chip view background transparent.

<com.google.android.material.chip.Chip style="@style/R12.White" android:layout_width="wrap_content" android:layout_height="wrap_content" app:chipBackgroundColor="@color/red" app:chipIcon="@drawable/ic_gallery" app:chipStrokeColor="@color/red" app:chipStrokeWidth="2dp" app:iconStartPadding="6dp" app:textEndPadding="6dp" tools:text="23" /> If I set red text - everything works. Screenshot 2019-05-16 at 17 24 59 but if I set app:chipBackgroundColor="@color/transparent" I have this Screenshot 2019-05-16 at 17 24 33 I use 1.1.0-alpha06 version

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

29reactions
leticiarossicommented, May 16, 2019

Hello, chips have a surface layer underneath their background (meaning they are opaque) of value colorSurface, which is by default white in the MaterialComponents theme. So when you set the background color to transparent it reveals that white surface layer. Chips also have a chipSurfaceColor attribute that you can set to change that surface color.

2reactions
liompeicommented, Sep 18, 2020

chipSurfaceColor is only exposed through a xml property, can you also add one for the Java/Kotlin?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android chip transparent background not working when ...
Any help. Hello, chips have a surface layer underneath their background (meaning they are opaque) of value colorSurface, which is by default ...
Read more >
How to make chip background transparent in android?
You can set it programmatically through the setChipBackgroundColorResource API: copyLinkChip.setChipBackgroundColorResource(android.R.color.
Read more >
Change Composition Background Color in After Effects
Learn why changing the Background Color option in the Composition Settings does not work for exporting video. Also learn the correct way to ......
Read more >
Transparent images PNG files in Keynote - Apple Community
I tried to drag a PNG image file into my KeyNote presentation but the white background still there and not transparent. I thought...
Read more >
Transparent background - HTML/CSS to Image API
Works with PNG's only ... Transparency is only supported by the PNG file format. By default, all images are rendered as PNG's. If...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found