Advertisement
Guest User

Untitled

a guest
Apr 25th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.39 KB | None | 0 0
  1. package com.dev.luuk.fortnite2;
  2.  
  3.  
  4. import android.animation.ObjectAnimator;
  5. import android.os.Bundle;
  6. import android.app.Fragment;
  7. import android.view.LayoutInflater;
  8. import android.view.View;
  9. import android.view.ViewGroup;
  10. import android.view.animation.Animation;
  11. import android.view.animation.AnimationUtils;
  12. import android.view.animation.LinearInterpolator;
  13. import android.view.animation.RotateAnimation;
  14. import android.widget.ImageView;
  15.  
  16.  
  17. /**
  18.  * A simple {@link Fragment} subclass.
  19.  */
  20. public class Location1Fragment extends Fragment {
  21.     Animation anim1;
  22.     private ImageView imageView;
  23.     public Location1Fragment() {
  24.         // Required empty public constructor
  25.     }
  26.  
  27.  
  28.     @Override
  29.     public View onCreateView(LayoutInflater inflater, ViewGroup container,
  30.                              Bundle savedInstanceState) {
  31.         // Inflate the layout for this fragment
  32.         View v = inflater.inflate(R.layout.fragment_location1, container, false);
  33.  
  34.         imageView = v.findViewById(R.id.circle_id);
  35.         RotateAnimation anim = new RotateAnimation(0f, 350f, 15f, 15f);
  36.         anim.setInterpolator(new LinearInterpolator());
  37.         anim.setRepeatCount(Animation.INFINITE);
  38.         anim.setDuration(700);
  39.  
  40. // Start animating the image
  41.         imageView.startAnimation(anim);
  42.         return inflater.inflate(R.layout.fragment_location1, container, false);
  43.     }
  44.  
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement