Using Glance beta-01
To handle cornerRadius on Android 12-, we cannot use the GlanceModifier.cornerRadius
. So using a custom xml background does the trick, but the Cliping (hiding the content overflowing the radius) only works on the targeted element.
So, is it possible to Clip the content/child of a component when applying a layout with corner Radius on Android S- ?
Example :
Box(modifier = GlanceModifier().background(R.drawable.test)) {
Text("blabla)
}
with test.xml :
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/test" />
<corners android:radius="@dimen/corner_radius_outside" />
</shape>
would render as something like :