diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index 83516dd55..3ec9c6cc6 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -4884,7 +4884,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis }) .start(); topBanner2.setAutoPlay(true) - .setPages(mTopBannerList, new TopBannerCustomViewHolder()) + .setPages(mTopBannerList, new TopBannerCustomViewHolder(false)) .setDelayTime(3000) .setBannerStyle(BannerConfig.NOT_INDICATOR) .setOnBannerClickListener(new OnBannerClickListener() { diff --git a/live/src/main/java/com/yunbao/live/views/TopBannerCustomViewHolder.java b/live/src/main/java/com/yunbao/live/views/TopBannerCustomViewHolder.java index 6c8e0bd17..f38d9000c 100644 --- a/live/src/main/java/com/yunbao/live/views/TopBannerCustomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/TopBannerCustomViewHolder.java @@ -20,6 +20,14 @@ import com.yunbao.live.R; public class TopBannerCustomViewHolder implements BannerViewHolder { public static final int TYPE_CALL_ANCHOR = 0;//联系主播 public static final int TYPE_IMAGE = 1; + private boolean isTop=true; + + public TopBannerCustomViewHolder(boolean isTop) { + this.isTop = isTop; + } + + public TopBannerCustomViewHolder() { + } @Override public View createView(Context context, int position, BannerBean data) { @@ -33,7 +41,11 @@ public class TopBannerCustomViewHolder implements BannerViewHolder { wishlistName.setText(data.getWishlistName()); wishlistProgress.setText(String.format("%s/%s", data.getWishlistProgress(), data.getWishlistNum())); } else { - view = LayoutInflater.from(context).inflate(R.layout.view_live_top_banner_call_me, null); + if(isTop) { + view = LayoutInflater.from(context).inflate(R.layout.view_live_top_banner_call_me, null); + }else{ + view = LayoutInflater.from(context).inflate(R.layout.view_live_top_banner_call_me2, null); + } SVGAImageView svga = view.findViewById(R.id.svga); new SVGAParser(context).decodeFromAssets("ic_live_anchor_call_me.svga", new SVGAParser.ParseCompletion() { @Override diff --git a/live/src/main/res/layout/view_live_top_banner_call_me2.xml b/live/src/main/res/layout/view_live_top_banner_call_me2.xml new file mode 100644 index 000000000..c600ae735 --- /dev/null +++ b/live/src/main/res/layout/view_live_top_banner_call_me2.xml @@ -0,0 +1,44 @@ + + + + + + + + + \ No newline at end of file