1package org.skia.skottie;
7import android.view.WindowManager;
9import com.airbnb.lottie.LottieAnimationView;
10import com.airbnb.lottie.LottieDrawable;
11import com.airbnb.lottie.RenderMode;
19 R.raw.white_material_wave_loading,
20 R.raw.check_animation,
24 R.raw.heart_preloader,
25 R.raw.i_was_scared_after_that_brouhaha,
28 R.raw.workout_monkey_stay_healthy,
29 R.raw.ripple_loading_animation,
37 protected void onCreate(Bundle savedInstanceState) {
39 this.requestWindowFeature(Window.FEATURE_NO_TITLE);
42 this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
43 WindowManager.LayoutParams.FLAG_FULLSCREEN);
45 super.onCreate(savedInstanceState);
49 Intent intent = getIntent();
50 int renderer = intent.getIntExtra(
"renderer", 0);
51 int file = intent.getIntExtra(
"file", 0);
52 if (file < 0 || file >=
rawAssets.length) {
76 view.
setSource(getResources().openRawResource(
id));
82 LottieAnimationView lottie =
new LottieAnimationView(
this);
83 lottie.setAnimation(
id);
85 lottie.setRenderMode(RenderMode.HARDWARE);
87 lottie.setRenderMode(RenderMode.SOFTWARE);
89 lottie.setRepeatMode(LottieDrawable.RESTART);
90 lottie.setRepeatCount(LottieDrawable.INFINITE);
91 lottie.playAnimation();
92 setContentView(lottie);
void onCreate(Bundle savedInstanceState)
void runLottie(int id, boolean useHardware)
void setSource(InputStream inputStream)