SVGAPlayer update

This commit is contained in:
huangjian
2021-11-05 14:14:56 +08:00
parent 92c17766a8
commit 1f144f825e
8 changed files with 14 additions and 14 deletions

View File

@@ -225,7 +225,7 @@ dependencies {
api "com.jzxiang.pickerview:TimePickerDialog:1.0.1"
api "com.github.zyyoona7:EasyPopup:1.0.2"
api "com.github.donkingliang:LabelsView:1.6.5"
api "com.github.yyued:SVGAPlayer-Android:2.5.3"
api "com.github.yyued:SVGAPlayer-Android:2.6.1"
implementation "com.orhanobut:logger:2.2.0"
api "com.ms-square:expandableTextView:0.1.4"
api "com.jakewharton:butterknife:10.1.0"

View File

@@ -121,7 +121,7 @@ public class SvgaCacheManager {
public void onError() {
emitter.onError(new Throwable("svga error"));
}
});
},null);
}).subscribeOn(Schedulers.io());
}

View File

@@ -201,7 +201,7 @@ public class GiftEffectView extends RelativeLayout implements SVGACallback {
public void onError() {
}
});
},null);
}

View File

@@ -385,10 +385,10 @@ public class GiftV2View extends FrameLayout implements GiftEffectView.GiftEffect
}
};
if (TextUtils.isEmpty(svgaUrl)) {
SVGAParser.Companion.shareParser().decodeFromAssets(path, parseCompletion);
SVGAParser.Companion.shareParser().decodeFromAssets(path, parseCompletion,null);
} else {
try {
SVGAParser.Companion.shareParser().decodeFromURL(new URL(svgaUrl), parseCompletion);
SVGAParser.Companion.shareParser().decodeFromURL(new URL(svgaUrl), parseCompletion,null);
} catch (MalformedURLException e) {
e.printStackTrace();
}
@@ -718,7 +718,7 @@ public class GiftV2View extends FrameLayout implements GiftEffectView.GiftEffect
} else {
System.out.println(TAG + ", 用io");
URL url = new URL(animation);
mSVGAParser.decodeFromURL(url, parseCompletion);
mSVGAParser.decodeFromURL(url, parseCompletion,null);
}
} catch (Exception e) {
e.printStackTrace();

View File

@@ -161,7 +161,7 @@ public class GiftView extends RelativeLayout implements SVGACallback {
public void onError() {
isSvgaAnimate = false;
}
});
},null);
}

View File

@@ -423,7 +423,7 @@ public class RoomEffectView extends FrameLayout {
public void onError() {
}
});
},null);
}
/**
@@ -529,7 +529,7 @@ public class RoomEffectView extends FrameLayout {
public void onError() {
}
});
},null);
}
@@ -596,7 +596,7 @@ public class RoomEffectView extends FrameLayout {
public void onError() {
}
});
},null);
binding.roomLevelUpSvga.setOnClickListener(v ->
AVRoomActivity.start(mContext, roomUid));
} catch (MalformedURLException e) {
@@ -654,7 +654,7 @@ public class RoomEffectView extends FrameLayout {
public void onError() {
emitter.onError(new Throwable("svga解析失败"));
}
})))
},null)))
.flatMap(info -> Observable.intervalRange(1, info.getSvgaSecond(), 1, 1, TimeUnit.SECONDS))
.observeOn(AndroidSchedulers.mainThread())
.doAfterTerminate(() -> binding.flSvgaDating.setVisibility(View.GONE))
@@ -750,7 +750,7 @@ public class RoomEffectView extends FrameLayout {
isSvgaPlaying = false;
binding.roomCarSvga.setVisibility(View.GONE);
}
});
},null);
} catch (MalformedURLException e) {
e.printStackTrace();
isSvgaPlaying = false;

View File

@@ -544,7 +544,7 @@ public class HomeFragmentAdapter extends BaseMultiItemQuickAdapter<HomeItem, Bas
public void onError() {
ImageLoadUtils.loadImage(mContext, badge, ivTabLabel);
}
});
},null);
} catch (MalformedURLException e) {
e.printStackTrace();
}

View File

@@ -88,7 +88,7 @@
android:id="@+id/svga_dating"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerInside"
android:scaleType="fitCenter"
app:autoPlay="true"
app:loopCount="1" />