6

Using a background color for a view with some alpha (e.g. #99fe0038) and some elevation on API 21 reveals two circles: one for the view itself and another inside:

Elevation and background color are set via code:

view.setElevation(getResources().getDimensionPixelSize(R.dimen.fab_elevation_lollipop));
view.setBackgroundColor(Color.parseColor("#99fe0038"));

Without setting elevation or with using an opaque color everything looks like expected.

Is it an Android bug or have I missed something here?

1

1 Answer 1

0

Removing shadow effect worked for me.

FAB.setShadow(false);        
FAB.setBackgroundColor(getResources().getColor(R.color.fab_transparent));
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.