r.miri19
شنبه 06 تیر 1394, 01:25 صبح
من در برنامه ای که دارم می سازم .می خوام یک عکس هر 2 ثانیه یک بار روشن و خاموش بشه.این کد رو دادم تو فایل xml
اما مشکل داره ، یه بار دزست کار می کنه ، یه بار روشن که می شه می مونه و نظم نداره
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:fillAfter="true"
android:interpolator="@android:anim/linear_interpolator" >
<alpha
android:duration="1000"
android:fromAlpha="0.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:repeatCount="infinite"
android:repeatMode="reverse"
android:startOffset="1000"
android:toAlpha="1.0" />
<alpha
android:duration="1000"
android:fromAlpha="1.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:repeatCount="infinite"
android:repeatMode="reverse"
android:startOffset="2000"
android:toAlpha="0.0" />
</set>
اما مشکل داره ، یه بار دزست کار می کنه ، یه بار روشن که می شه می مونه و نظم نداره
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:fillAfter="true"
android:interpolator="@android:anim/linear_interpolator" >
<alpha
android:duration="1000"
android:fromAlpha="0.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:repeatCount="infinite"
android:repeatMode="reverse"
android:startOffset="1000"
android:toAlpha="1.0" />
<alpha
android:duration="1000"
android:fromAlpha="1.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:repeatCount="infinite"
android:repeatMode="reverse"
android:startOffset="2000"
android:toAlpha="0.0" />
</set>