android- multiple alpha set in xml can't work -
i trying make alpha animation this:
<alpha android:duration="300" android:fromalpha="0.0" android:toalpha="0.9"/> <alpha android:duration="300" android:fromalpha="0.9" android:startoffset="300" android:toalpha="0.6" /> <alpha android:duration="300" android:fromalpha="0.6" android:startoffset="600" android:toalpha="0.9" /> <alpha android:duration="300" android:fromalpha="0.9" android:startoffset="900" android:toalpha="1" android:fillafter="true"/>
but imageview not opaque set toalpha = 1 in end. because can set once in xml?
this worked me:
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" android:fillenabled="true" android:fillafter="true"> <alpha android:duration="300" android:fromalpha="0.0" android:toalpha="0.9" /> <alpha android:duration="300" android:fromalpha="0.9" android:startoffset="300" android:toalpha="0.6" /> <alpha android:duration="300" android:fromalpha="0.6" android:startoffset="600" android:toalpha="0.9" /> <alpha android:duration="300" android:fromalpha="0.9" android:startoffset="900" android:toalpha="2.0" /> </set>
Comments
Post a Comment