I'm applying rounded corner on a Shell TabBar like in Xamarin Forms Shell TabBar Rounded Corner.
My question: is it possible to put the view (background color) behind instead of above (default black color)?
I'm applying rounded corner on a Shell TabBar like in Xamarin Forms Shell TabBar Rounded Corner.
My question: is it possible to put the view (background color) behind instead of above (default black color)?
You can define the drawable background as follow:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="#ffffff" />
</shape>
</item>
<item>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#f00" />
<corners android:topLeftRadius="20dp" android:topRightRadius="20dp" />
</shape>
</item>
</layer-list>
In addition, you can set the Elevation property to 0 in order to prevent the shadow:
bottomView.SetBackgroundResource(Resource.Drawable.bottombackground);
bottomView.Elevation = 0;
You can set the
BackgroundColor
of the Parent to either the currentContentPage
BackgroundColor
or to itContent
(probably a Layout)BackgroundColor
.Note
Since it is a follow-up question I just put the relevant code specific for this question, the full code could be found in https://stackoverflow.com/a/65784730