Tencent / vap

VAP是企鹅电竞开发,用于播放特效动画的实现方案。具有高压缩率、硬件解码等优点。同时支持 iOS,Android,Web 平台。
Other
3.84k stars 515 forks source link

android recyclerview 刷新动画结束 #339

Open leviluo opened 1 year ago

leviluo commented 1 year ago

android代码如下:

playerViewH.setLoop(Int.MAX_VALUE) playerViewH.setScaleType(ScaleType.CENTER_CROP) var cornerId:String? = null get() = field set(value) { field = value if (!util.isEmpty(value)){ Log.e("head1234",value ?: "") value?.let{ val apkFilePath = AppApplication.instance.applicationContext.getExternalFilesDir("apk")!! .getAbsolutePath() var filePath = apkFilePath + File.separator + "${this.cornerId}.mp4" if (!File(filePath).exists()) { val name = "${this.cornerId}.mp4" FileUtil.CopyAsset( this.context, name, filePath ) } playerViewH.startPlay(File(filePath)) } }else{ playerViewH.stopPlay() } }

问题: 上面是recyclerView 中的一个自定义view,recyclerView刷新,动画就消失了,再次刷新动画又正常,刷新又消失,如此反复

rejigtian commented 10 months ago

recycleView里面使用会有问题,可以参考#311