Issue
Currently I have the following drawable (splash.xml
) definition:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@color/grey_300"/>
<item>
<bitmap
android:gravity="center"
android:src="@mipmap/ic_launcher"/>
</item>
</layer-list>
I'm using that for a splash screen by defining an activity as follows:
<activity
android:name=".SplashActivity"
android:label="@string/app_name"
android:theme="@style/SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
That style comes from styles.xml
:
<style name="SplashTheme" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowBackground">@drawable/splash</item>
</style>
, I was wondering if I could some how animate the logo centered on screen (maybe rotating it). What would be the best way to reach it? I already tried to play a bit with animated-rotate
inside item
element but no success until now.
Solution
Maybe this will help:
I noticed you used this guide. However, someone asked him in comments if he can add animation to his splash screen, his answer was:
It's not possible to do an animation with the splash screen pattern that I've listed above. The animation would only be available when the app has already loaded.
Outside of this, you can animate a layer list. Just apply it as the background on some view and animate that view.
Answered By - DAVIDBALAS1
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.