|
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 37 of file PerfActivity.java.
37 {
38
39 this.requestWindowFeature(Window.FEATURE_NO_TITLE);
40
41
42 this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
43 WindowManager.LayoutParams.FLAG_FULLSCREEN);
44
45 super.onCreate(savedInstanceState);
46
47
48
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) {
53 return;
54 }
56 case 0:
57
59 break;
60 case 1:
61
63 break;
64 case 2:
65
67 break;
68 default:
69 break;
70 }
71
72 }
void runLottie(int id, boolean useHardware)
◆ runLottie()
void org.skia.skottie.PerfActivity.runLottie |
( |
int |
id, |
|
|
boolean |
useHardware |
|
) |
| |
|
inlinepackage |
Definition at line 81 of file PerfActivity.java.
81 {
82 LottieAnimationView lottie = new LottieAnimationView(this);
83 lottie.setAnimation(id);
84 if (useHardware) {
85 lottie.setRenderMode(RenderMode.HARDWARE);
86 } else {
87 lottie.setRenderMode(RenderMode.SOFTWARE);
88 }
89 lottie.setRepeatMode(LottieDrawable.RESTART);
90 lottie.setRepeatCount(LottieDrawable.INFINITE);
91 lottie.playAnimation();
92 setContentView(lottie);
93 }
◆ runSkottie()
void org.skia.skottie.PerfActivity.runSkottie |
( |
int |
id | ) |
|
|
inlinepackage |
Definition at line 74 of file PerfActivity.java.
74 {
75 SkottieView view = new SkottieView(this);
76 view.setSource(getResources().openRawResource(id));
77 view.start();
78 setContentView(view);
79 }
◆ rawAssets
int [] org.skia.skottie.PerfActivity.rawAssets |
|
package |
Initial value:= {
R.raw.white_material_wave_loading,
R.raw.i_was_scared_after_that_brouhaha,
R.raw.workout_monkey_stay_healthy,
R.raw.ripple_loading_animation,
R.raw.check
}
Definition at line 15 of file PerfActivity.java.
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