|
void | onCreate (Bundle savedInstanceState) |
|
Definition at line 13 of file PerfActivity.java.
◆ onCreate()
void org.skia.skottie.PerfActivity.onCreate |
( |
Bundle |
savedInstanceState | ) |
|
|
inlineprotected |
Definition at line 25 of file PerfActivity.java.
25 {
26
27 this.requestWindowFeature(
Window.FEATURE_NO_TITLE);
28
29
30 this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
31 WindowManager.LayoutParams.FLAG_FULLSCREEN);
32
33 super.onCreate(savedInstanceState);
34
35
36
37 Intent intent = getIntent();
38 int renderer = intent.getIntExtra(
"renderer", 0);
39 int file = intent.getIntExtra(
"file", 0);
40 if (file < 0 || file >=
rawAssets.length) {
41 return;
42 }
43 switch (renderer) {
44 case 0:
45
47 break;
48 case 1:
49
51 break;
52 case 2:
53
55 break;
56 default:
57 break;
58 }
59
60 }
void runLottie(int id, boolean useHardware)
◆ runLottie()
void org.skia.skottie.PerfActivity.runLottie |
( |
int |
id, |
|
|
boolean |
useHardware |
|
) |
| |
|
inlinepackage |
Definition at line 69 of file PerfActivity.java.
69 {
70 LottieAnimationView lottie = new LottieAnimationView(this);
71 lottie.setAnimation(id);
72 if (useHardware) {
73 lottie.setRenderMode(RenderMode.HARDWARE);
74 } else {
75 lottie.setRenderMode(RenderMode.SOFTWARE);
76 }
77 lottie.setRepeatMode(LottieDrawable.RESTART);
78 lottie.setRepeatCount(LottieDrawable.INFINITE);
79 lottie.playAnimation();
80 setContentView(lottie);
81 }
◆ runSkottie()
void org.skia.skottie.PerfActivity.runSkottie |
( |
int |
id | ) |
|
|
inlinepackage |
Definition at line 62 of file PerfActivity.java.
62 {
63 SkottieView view = new SkottieView(this);
64 view.setSource(getResources().openRawResource(id));
65 view.start();
66 setContentView(view);
67 }
◆ rawAssets
int org.skia.skottie.PerfActivity.rawAssets[] |
|
package |
Initial value:= {
R.raw.star,
R.raw.movie_loading,
R.raw.uk,
R.raw.white_material_wave_loading,
R.raw.check_animation,
R.raw.confetti,
R.raw.gears,
R.raw.hand_sanitizer,
R.raw.heart_preloader,
R.raw.i_was_scared_after_that_brouhaha,
R.raw.im_thirsty,
R.raw.true_will,
R.raw.workout_monkey_stay_healthy,
R.raw.ripple_loading_animation,
R.raw.signature,
R.raw.asdasd,
R.raw.celebration,
R.raw.check
}
Definition at line 15 of file PerfActivity.java.
15 {
16 R.raw.star,
R.raw.movie_loading,
R.raw.uk,
R.raw.white_material_wave_loading,
17 R.raw.check_animation,
R.raw.confetti,
R.raw.gears,
18 R.raw.hand_sanitizer,
R.raw.heart_preloader,
R.raw.i_was_scared_after_that_brouhaha,
19 R.raw.im_thirsty,
R.raw.true_will,
R.raw.workout_monkey_stay_healthy,
20 R.raw.ripple_loading_animation,
R.raw.signature,
R.raw.asdasd,
R.raw.celebration,
21 R.raw.check
22 };
The documentation for this class was generated from the following file:
- third_party/skia/platform_tools/android/apps/skottie/src/main/java/org/skia/skottie/PerfActivity.java