all.
I want to make splashscreen:
<style name="SplashTheme" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowBackground">@drawable/background_splash</item>
</style>
drawable/background_splash:
<?xml version="1.0" encoding="utf-8"?>
<item
android:drawable="@color/main_theme"/>
<item android:bottom="16dp">
<bitmap
android:gravity="center|fill_horizontal"
android:src="@drawable/splash_logo"
/>
</item>
<item android:bottom="16dp">
<bitmap
android:gravity="bottom"
android:src="@drawable/logo"/>
</item>
But I have no ability to make bitmap with android:src="@drawable/splash_logo" resize as centerCrop scale in ImageView( I need my bitmap fill all width) For now it's size as size in resource in pixels. If i make it much larger it will be larger the screen. I tried scale drawable and no sense.
Do you have any suggestions?
I was able to achieve filling screen, but keep in mind, it will be a bit stretched on 18:9 screens
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="@drawable/splash_2_x2"
android:top="0dp"
android:bottom="0dp"
android:left="0dp"
android:right="0dp"/>
</layer-list>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With