I’m creating a radial gradient like:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<gradient
android:startColor="#7faacaFF"
android:endColor="#cfe1edFF"
android:gradientRadius="326"
android:type="radial"/>
</shape>
But in the gradientRadius field using values like sp and dip return an error.
Is there a way to specify the radius and scale for mdpi and scale it automatically in the rest of screen densities, or is necessary to create multiple drawable files?
So what if you do this:
res/drawable/foo.xml
res/values-mdpi/dimens.xml
res/values-hdpi/dimens.xml
What do you think?