Flutter Engine
The Flutter Engine
Public Member Functions | Protected Member Functions | List of all members
org.skia.skottie.DemoActivity Class Reference
Inheritance diagram for org.skia.skottie.DemoActivity:

Public Member Functions

void onClick (View view)
 

Protected Member Functions

void onCreate (Bundle savedInstanceState)
 

Detailed Description

Definition at line 12 of file DemoActivity.java.

Member Function Documentation

◆ onClick()

void org.skia.skottie.DemoActivity.onClick ( View  view)
inline

Definition at line 35 of file DemoActivity.java.

35 {
36 switch(view.getId()) {
37 case R.id.play:
38 for (SkottieView s : skotties) {
39 if (playing) {
40 s.pause();
41 } else {
42 s.play();
43 }
44 }
45 playing = !playing;
46 break;
47 case R.id.reset:
48 for (SkottieView s : skotties) {
49 s.seek(0f);
50 }
51 break;
52 }
53 }
struct MyStruct s
#define R(r)

◆ onCreate()

void org.skia.skottie.DemoActivity.onCreate ( Bundle  savedInstanceState)
inlineprotected

Definition at line 17 of file DemoActivity.java.

17 {
18 super.onCreate(savedInstanceState);
19 setContentView(R.layout.demo_layout);
20
21 LinearLayout skottieContainer = findViewById(R.id.skottie_container);
22 for (int i = 0; i < skottieContainer.getChildCount(); i++) {
23 SkottieView s = (SkottieView)skottieContainer.getChildAt(i);
24 skotties.add(s);
25 s.play();
26 }
27
28 Button play = findViewById(R.id.play);
29 play.setOnClickListener(this);
30 Button reset = findViewById(R.id.reset);
31 reset.setOnClickListener(this);
32 }
m reset()

The documentation for this class was generated from the following file: