Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.dev.luuk.fortnite2;
- import android.animation.ObjectAnimator;
- import android.os.Bundle;
- import android.app.Fragment;
- import android.view.LayoutInflater;
- import android.view.View;
- import android.view.ViewGroup;
- import android.view.animation.Animation;
- import android.view.animation.AnimationUtils;
- import android.view.animation.LinearInterpolator;
- import android.view.animation.RotateAnimation;
- import android.widget.ImageView;
- /**
- * A simple {@link Fragment} subclass.
- */
- public class Location1Fragment extends Fragment {
- Animation anim1;
- private ImageView imageView;
- public Location1Fragment() {
- // Required empty public constructor
- }
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- // Inflate the layout for this fragment
- View v = inflater.inflate(R.layout.fragment_location1, container, false);
- imageView = v.findViewById(R.id.circle_id);
- RotateAnimation anim = new RotateAnimation(0f, 350f, 15f, 15f);
- anim.setInterpolator(new LinearInterpolator());
- anim.setRepeatCount(Animation.INFINITE);
- anim.setDuration(700);
- // Start animating the image
- imageView.startAnimation(anim);
- return inflater.inflate(R.layout.fragment_location1, container, false);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement