SVGAPlayer update
This commit is contained in:
@@ -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"
|
||||
|
@@ -121,7 +121,7 @@ public class SvgaCacheManager {
|
||||
public void onError() {
|
||||
emitter.onError(new Throwable("svga error"));
|
||||
}
|
||||
});
|
||||
},null);
|
||||
}).subscribeOn(Schedulers.io());
|
||||
}
|
||||
|
||||
|
@@ -201,7 +201,7 @@ public class GiftEffectView extends RelativeLayout implements SVGACallback {
|
||||
public void onError() {
|
||||
|
||||
}
|
||||
});
|
||||
},null);
|
||||
|
||||
}
|
||||
|
||||
|
@@ -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();
|
||||
|
@@ -161,7 +161,7 @@ public class GiftView extends RelativeLayout implements SVGACallback {
|
||||
public void onError() {
|
||||
isSvgaAnimate = false;
|
||||
}
|
||||
});
|
||||
},null);
|
||||
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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();
|
||||
}
|
||||
|
@@ -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" />
|
||||
|
||||
|
Reference in New Issue
Block a user