Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Commit

Permalink
feat: Set parser class variables for demo.
Browse files Browse the repository at this point in the history
  • Loading branch information
errnull committed Sep 6, 2019
1 parent ef1f232 commit ae36dc3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@

public class AnimationFromAssetsActivity extends Activity {

SVGAImageView animationView = null;
int currentIndex = 0;
SVGAImageView animationView = null;
SVGAParser parser = new SVGAParser(this);

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
Expand All @@ -37,7 +38,6 @@ public void onClick(View view) {
}

private void loadAnimation() {
SVGAParser parser = new SVGAParser(this);
parser.decodeFromAssets(this.randomSample(), new SVGAParser.ParseCompletion() {
@Override
public void onComplete(@NotNull SVGAVideoEntity videoItem) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
public class AnimationFromClickActivity extends Activity {

SVGAImageView animationView = null;
SVGAParser parser = new SVGAParser(this);

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
Expand All @@ -40,7 +41,6 @@ public void onClick(@NotNull String clickKey) {
}

private void loadAnimation() {
SVGAParser parser = new SVGAParser(this);
parser.decodeFromAssets("test2.svga",new SVGAParser.ParseCompletion() {
@Override
public void onComplete(@NotNull SVGAVideoEntity videoItem) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
public class AnimationFromNetworkActivity extends Activity {

SVGAImageView animationView = null;
SVGAParser parser = new SVGAParser(this);

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
Expand All @@ -28,7 +29,6 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
}

private void loadAnimation() {
SVGAParser parser = new SVGAParser(this);
try { // new URL needs try catch.
parser.decodeFromURL(new URL("https://github.com/yyued/SVGA-Samples/blob/master/posche.svga?raw=true"), new SVGAParser.ParseCompletion() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
public class AnimationWithDynamicImageActivity extends Activity {

SVGAImageView animationView = null;
SVGAParser parser = new SVGAParser(this);

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
Expand All @@ -30,7 +31,6 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
}

private void loadAnimation() {
SVGAParser parser = new SVGAParser(this);
try { // new URL needs try catch.
parser.decodeFromURL(new URL("https://github.com/yyued/SVGA-Samples/blob/master/kingset.svga?raw=true"), new SVGAParser.ParseCompletion() {
@Override
Expand Down

0 comments on commit ae36dc3

Please sign in to comment.