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
Change this Line to
To
because android:windowsBackground attribute will not be able to show splash at full screen. It's good way u use android:background for splash. Then if you want you can call centercrop in your Splash Activity. Hope this helped!!