How to use android XML's with libgdx such as selector style, animations -
i made game common android libraries, , made nice animations one:
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:shareinterpolator="false"> <scale android:interpolator="@android:anim/accelerate_decelerate_interpolator" android:fromxscale="1.3" android:toxscale="1.8" android:fromyscale="1.4" android:toyscale="0.9" android:pivotx="50%" android:pivoty="50%" android:fillbefore="true" android:fillafter="false" android:duration="800" /> <set android:interpolator="@android:anim/decelerate_interpolator"> <scale android:fromxscale="1.8" android:toxscale="0.3" android:fromyscale="0.9" android:toyscale="0.2" android:pivotx="50%" android:pivoty="50%" android:startoffset="800" android:duration="600" android:fillbefore="false" /> <rotate android:fromdegrees="0" android:todegrees="-45" android:pivotx="50%" android:pivoty="50%" android:startoffset="800" android:duration="600" /> </set> <scale android:interpolator="@android:anim/decelerate_interpolator" android:fromxscale="0.3" android:toxscale="1.6" android:fromyscale="0.2" android:toyscale="1.4" android:pivotx="50%" android:pivoty="50%" android:startoffset="1400" android:duration="600" android:fillbefore="false" android:fillafter="false" /> <rotate android:fromdegrees="-45" android:todegrees="45" android:pivotx="50%" android:pivoty="50%" android:startoffset="1400" android:duration="600" /> </set>
and made custom buttons styles:
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" > <shape> <gradient android:startcolor="@color/light_blue" android:endcolor="@color/dark_blue" android:angle="270" /> <stroke android:width="3dp" android:color="@color/black" /> <corners android:radius="3dp" /> <padding android:left="10dp" android:top="10dp" android:right="10dp" android:bottom="10dp" /> </shape> </item>
but can't them working on libgdx project because uses android libraries. know there's library called tween i'd rather make styles , animations this.
animation startanimation = animationutils.loadanimation(this, r.anim.start_anim_two); startan.startanimation(startanimation);
any idea of how export them libgdx project?
Comments
Post a Comment