I have problem similar to this linkbut reproducing only in lollipop and above versions.
Also am using the same tutorial for my implementation.
Somehow using the below code, i am able to remove the square shadow using below code:
Button fab = (Button) findViewById(R.id.fab);
//Outline outline = new Outline();
//outline.setOval(0, 0, size, size);
//fab.setOutline(outline);
ViewOutlineProvider viewOutlineProvider = new ViewOutlineProvider() {
@Override
public void getOutline(View view, Outline outline) {
// Or read size directly from the view's width/height
int size = getResources().getDimensionPixelSize(R.dimen.fab_size);
outline.setOval(0, 0, size, size);
}
};
fab.setOutlineProvider(viewOutlineProvider);
But using above code, I am again getting a weird (half circle) shadow on the top of floating action button, like this:
Also the code is removing the shadow n I dont want to remove that.
I had the same problem as you and solved by adding this:
app:borderWidth="0dp"