java - android animated menu background -
i developing android app @ moment. have main menu. pretty plain - 4 buttons in it. want background of menu animated live wallpaper f.e.
in fact want use static background image , slide 1-2 other images horizontal through it. did research , found out live wallpapers came api 2.1. , fit needs app should downcompatible api - when view animations, renderscript as. came api 3.1 , tutorials build on that.
so right im missing advice start of. apreciate every kind of help!
as adviced tried tween animations - pretty followed tutorial http://mobile.tutsplus.com/tutorials/android/android-sdk-creating-a-simple-tween-animation/
and in emulation device working charme .. when run on native api 2.1 device no animation shown .. havent considered ?
first of kudos class stacker gave me advice go tween animations - fit needs thx that! - unfortunately animation wasnt shown on api 2.1 devices.
following tuturial set tween animation "clouds_pass.xml" -
<set xmlns:android="http://schemas.android.com/apk/res/android" android:shareinterpolator="false" android:duration="80000" android:interpolator="@android:anim/linear_interpolator" android:fillafter="true" > <translate android:fromxdelta="155%p" android:toxdelta="-100%p" android:repeatcount="infinite" />
as activity calling tween -
@override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); imageview clouds = (imageview)findviewbyid(r.id.clouds); animation cloudspass = animationutils.loadanimation(this,r.anim.clouds_pass); clouds.startanimation(cloudspass); }
im not defintly sure might reason .. removing android:duration tag "clouds_pass.xml" , setting duration
cloudspass.setduration(80000);
after loading animation fixed - , working intended down api 2.0 devices.