I'm creating a ScrollView with a FrameLayout inside. I want to design it so that only the top corners are rounded on the ScrollView. I've created a drawable shape as follows
<shape>
<solid android:color="@color/white"/>
<corners
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"
android:topLeftRadius="16dp"
android:topRightRadius="16dp"/>
<padding android:padding="0dp"/>
</shape>
Run Code Online (Sandbox Code Playgroud)
I've then set the following on the ScrollView
scrollView.setOutlineProvider(ViewOutlineProvider.BACKGROUND);
scrollView.setClipToOutline(true);
Run Code Online (Sandbox Code Playgroud)
When i try scrolling, the elements in my FrameLayout end up protruding through the outline of my scrollview
Excuse the drawing, but what i'm looking to achieve
However …