المتابعون

الأربعاء، 22 أغسطس 2018

الدوران

1-وضع كود الجافا في onCreate2-وضع صوره في drawable وقم بتسميتها splash3-اضافة ملف anim في res


MainActyivity.java




Animation animation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.hendiwareanimationto); image.startAnimation(animation);

ActyivityMain.xml







<ImageView
       android:id="@+id/AnmeshnDoran"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       app:srcCompat="@drawable/splash" />

anim






<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">

    <alpha
        android:duration="1500"
        android:fromAlpha="0"
        android:toAlpha="1" />

    <rotate
        android:duration="3000"
        android:fromDegrees="0"
        android:pivotX="50%"
        android:pivotY="50%"
        android:startOffset="1500"
        android:toDegrees="360" />
</set>



ليست هناك تعليقات:

إرسال تعليق

اعلان