开发者

Custom Splash Screen - Android

开发者 https://www.devze.com 2023-04-08 15:04 出处:网络
Currently my android application shows a black screen with a loading wheel as it processes the user\'s request i:e as it gets content from the server. I would like to modify this screen to include an

Currently my android application shows a black screen with a loading wheel as it processes the user's request i:e as it gets content from the server. I would like to modify this screen to include an icon (image) that fades in and out continuously instead of the lo开发者_C百科ading wheel. Is there any possible way to do it?


Yes, you'll use an Alpha Animation

See here

and here

and lastly here for a good tutorial on Animations with some nice code.

In order to "chain" your animations so that one starts after the other you'll use an Animation listener and start the other one from the onAnimationEnd method callback. Don't forget to put an if statement in there that checks to see if your stuff is done loading otherwise you'll end up with infinite recursion of your fade in and fade out.

0

精彩评论

暂无评论...
验证码 换一张
取 消