XBanner
XBanner copied to clipboard
切换动画丢失
version:all
question:使用在列表中,滑出界面再滑回来后第一次自动轮播切换动画丢失(view内容直接替换没有动画,不自然),第二次切换恢复transform动画,
模式 app:isClipChildrenMode="true"
adapter中: override fun onViewDetachedFromWindow(holder: KotlinBaseViewHolder) { super.onViewDetachedFromWindow(holder) with(holder.itemView) { xb_banner?.stopAutoPlay() } }
override fun onViewAttachedToWindow(holder: KotlinBaseViewHolder) {
super.onViewAttachedToWindow(holder)
with(holder.itemView) {
xb_banner?.startAutoPlay()
}
}
这点在使用时该怎样解决?
onBindViewHolder中这样写的: override fun onBindViewHolder(holder: KotlinBaseViewHolder, position: Int) { with(holder.itemView) { if (xb_banner?.viewPager?.adapter == null) { xb_banner?.setBannerData(R.layout.item_today_rec, dataList) xb_banner?.viewPager?.overScrollMode = View.OVER_SCROLL_NEVER xb_banner?.setPointsIsVisible(false) xb_banner?.setViewPagerMargin(21) xb_banner?.loadImage { _, item, view, position -> with(view) { ImageLoader.instance.loadWithResize( context, iv_cover, (item as SimpleBannerInfo).xBannerUrl.toString(), ImageLoader.baseSimpleWidth * 4, ImageLoader.baseSimpleHeight * 4 ) } view.setOnClickListener { } } } xb_banner?.startAutoPlay() } }
stopAutoPlay() starAutoplay方法可以不用自己单独去调用,框架已经增加了判断,会根据屏幕状态去判断
切换动画丢失问题有没方法解决
------------------ 原始邮件 ------------------ 发件人: "Mr.XIAO"<[email protected]>; 发送时间: 2019年11月11日(星期一) 下午2:15 收件人: "xiaohaibin/XBanner"<[email protected]>; 抄送: "三年"<[email protected]>; "Author"<[email protected]>; 主题: Re: [xiaohaibin/XBanner] 切换动画丢失 (#143)
stopAutoPlay() starAutoplay方法可以不用自己单独去调用,框架已经增加了判断,会根据屏幕状态去判断
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
动画丢失问题也遇到了,请问解决了吗
莫有解决
------------------ 原始邮件 ------------------ 发件人: "onlywsw"<[email protected]>; 发送时间: 2019年11月27日(星期三) 中午1:39 收件人: "xiaohaibin/XBanner"<[email protected]>; 抄送: "三年"<[email protected]>; "Author"<[email protected]>; 主题: Re: [xiaohaibin/XBanner] 切换动画丢失 (#143)
动画丢失问题也遇到了,请问解决了吗
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.