question

Havos avatar image
Havos asked

Problem using setColorFilter to change the background color

Hi, I have the following code: public class HavosButton extends Button { private static final PorterDuffColorFilter greenFilter = new PorterDuffColorFilter(Color.GREEN, PorterDuff.Mode.MULTIPLY); public HavosButton(Context context, AttributeSet attrs) { super(context, attrs); getBackground().setColorFilter(greenFilter); } } The idea is to set the background of the button to green, rather than the usual gray. This code works perfectly on other android devices (non Amazon), but it does not have any affect on a Kindle Fire HD. Any ideas? Thanks in advance, David
fire tablet
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Anshul@Amazon avatar image
Anshul@Amazon answered
Thank you for your post. We are unable to reproduce the issue. The given code works fine for us. (except that we commented out the AttributeSet parameter as we don't know what you have passed-in) If you are still facing the issue, then please raise a ContactUs ( https://developer.amazon.com/help/contactus.html) with your complete code and one of our Support Engineer should be able to help you.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sebbingo avatar image
sebbingo answered
We are having the same issue. What was the solution?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Sebbingo, Thank you for the post. Actually, I am unable to reproduce the issue. I have defined the class named "HavosButton" and added below lines in my layout and it's working as expected. I checked in Kindle 2nd Gen and HD. Could you please check which version of Kindle you are using and let us know the version no?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.