I got a good answer on my previous question about resizing my vector splash screen image, but I wonder to know is it possible without using Java/Kotlin code for two reasons: 1) I am new to Android and I am not sure where to add the code, 2) I am not sure if the code does not slow down splash screen loading.
My idea is that I probably add an integer value as described here, but make it different depending on DPI (or screen size), it is possible?
And then I probably refer it from my splash screen as @myval
:
<?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="#FF07862c"/> -->
<gradient
android:type="radial"
android:startColor="#086824"
android:endColor="#098a2f"
android:gradientRadius="@myval"
android:centerX="0.5"
android:centerY="0.5"/>
</shape>
</item>
<!-- <item android:drawable="@drawable/background0" android:gravity="center"/> -->
<item android:drawable="@drawable/logo"
android:width="@myval"
android:height="@myval"
android:gravity="center"/>
</layer-list>