Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

circular roation continous in android

<animated-rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_rounded_loading"
android:duration="1000"
android:interpolator="@android:anim/linear_interpolator"
android:pivotX="50%"
android:pivotY="50%"
android:repeatCount="infinite" />


@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {

    // Accessing the layout components to be displayed.
    rootView = inflater.inflate(R.layout.fragment_loading, container, false);
    ivLoading= (ImageView) rootView.findViewById(R.id.ivLoading);

    RotateAnimation rotateAnimation = new RotateAnimation(
            0,//float: Rotation offset to apply at the start of the animation.
            360,//float: Rotation offset to apply at the end of the animation.
            Animation.RELATIVE_TO_SELF,//int: Specifies how pivotXValue should be interpreted
            0.5f,//float: The X coordinate of the point about which the object is being rotated
            Animation.RELATIVE_TO_SELF,//int: Specifies how pivotYValue should be interpreted
            0.5f//float: The Y coordinate of the point about which the object is being rotated
    );
    rotateAnimation.setDuration(1500);//How long this animation should last.
    rotateAnimation.setRepeatCount(Animation.INFINITE);//Sets how many times the animation should be repeated.
    rotateAnimation.setInterpolator(new LinearInterpolator());//Sets the acceleration curve for this animation.
    ivLoading.startAnimation(rotateAnimation);

    return rootView;
}
Comment

PREVIOUS NEXT
Code Example
Java :: bytecode into source code 
Java :: get material of block bukkit 
Java :: how to increase a variable once java 
Java :: make a string bean spring xml 
Java :: python to java convert online 
Java :: maximise the rides with the given tokens java 
Java :: generate infinity steam java 
Java :: java.lang.IllegalMonitorStateException: object not locked by thread before wait() 
Java :: java enum name() 
Java :: aws s3 client in java 
Java :: java delete instance of class 
Java :: convert kotlin to java online editor 
Java :: amstrong 
Java :: quick way to get charAt 
Java :: java binary search tree 
Java :: polymorphism vs overriding in java 
Java :: swapping techniques using java 
Java :: android list to string 
Java :: Get the number of weeks between two dates 
Java :: java to c++ converter 
Java :: arraylist remove value in java 
Java :: javafx initialize 
Java :: public class extends implements java 
Java :: como limpar a tela do consola no java 
Sql :: sql server reseed single table 
Sql :: sql server 2016 reseed identity 
Sql :: update sql server from another table 
Sql :: list all triggers in sql server 
Sql :: wilayah indonesia database 
Sql :: SQLSTATE[HY000] [1049] Unknown database 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =