小礼物逻辑第一次上传
This commit is contained in:
parent
56ae033523
commit
7b1f3ddd79
@ -0,0 +1,26 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class QuickGiftingEvent extends BaseModel {
|
||||
private int index;
|
||||
private String svgaName;
|
||||
|
||||
public int getIndex() {
|
||||
return index;
|
||||
}
|
||||
|
||||
public QuickGiftingEvent setIndex(int index) {
|
||||
this.index = index;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSvgaName() {
|
||||
return svgaName;
|
||||
}
|
||||
|
||||
public QuickGiftingEvent setSvgaName(String svgaName) {
|
||||
this.svgaName = svgaName;
|
||||
return this;
|
||||
}
|
||||
}
|
15
common/src/main/java/com/yunbao/common/event/SlideEvent.java
Normal file
15
common/src/main/java/com/yunbao/common/event/SlideEvent.java
Normal file
@ -0,0 +1,15 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class SlideEvent extends BaseModel {
|
||||
private boolean isSlide;
|
||||
|
||||
public boolean isSlide() {
|
||||
return isSlide;
|
||||
}
|
||||
public SlideEvent setSlide(boolean slide) {
|
||||
isSlide = slide;
|
||||
return this;
|
||||
}
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
package com.yunbao.common.views.weight;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.RectF;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
|
||||
public class CircleProgress2 extends View {
|
||||
private Paint mPaint;
|
||||
private RectF mRectF;
|
||||
private int mCurrent = 1, mMax = 100;
|
||||
//圆弧(也可以说是圆环)的宽度
|
||||
private float mArcWidth =8;
|
||||
//控件的宽度
|
||||
private float mWidth;
|
||||
|
||||
public CircleProgress2(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public CircleProgress2(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public CircleProgress2(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
mPaint = new Paint();
|
||||
mPaint.setAntiAlias(true);
|
||||
mRectF = new RectF();
|
||||
}
|
||||
|
||||
public void setCurrent(int mCurrent) {
|
||||
this.mCurrent = mCurrent;
|
||||
invalidate();
|
||||
}
|
||||
|
||||
public void setMax(int mMax) {
|
||||
this.mMax = mMax;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
//getMeasuredWidth获取的是view的原始大小,也就是xml中配置或者代码中设置的大小
|
||||
//getWidth获取的是view最终显示的大小,这个大小不一定等于原始大小
|
||||
mWidth = getMeasuredWidth();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
super.onDraw(canvas);
|
||||
mPaint.setStyle(Paint.Style.STROKE);
|
||||
//设置圆弧的宽度(圆环的宽度)
|
||||
mPaint.setStrokeWidth(mArcWidth);
|
||||
mPaint.setColor(Color.parseColor("#FEC51B"));
|
||||
//大圆的半径
|
||||
float bigCircleRadius = mWidth / 2;
|
||||
//小圆的半径
|
||||
float smallCircleRadius = bigCircleRadius - mArcWidth;
|
||||
//绘制小圆
|
||||
canvas.drawCircle(bigCircleRadius, bigCircleRadius, smallCircleRadius, mPaint);
|
||||
mPaint.setColor(Color.parseColor("#46433F"));
|
||||
mRectF.set(mArcWidth, mArcWidth, mWidth - mArcWidth, mWidth - mArcWidth);
|
||||
//绘制圆弧
|
||||
canvas.drawArc(mRectF, -90, mCurrent * 360 / mMax, false, mPaint);
|
||||
setBackgroundColor(Color.TRANSPARENT);
|
||||
}
|
||||
|
||||
}
|
5
common/src/main/res/drawable/backgroud_panda_time.xml
Normal file
5
common/src/main/res/drawable/backgroud_panda_time.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#9946433F" />
|
||||
<corners android:radius="200dp" />
|
||||
</shape>
|
BIN
common/src/main/res/mipmap-xxhdpi/icon_combo.png
Normal file
BIN
common/src/main/res/mipmap-xxhdpi/icon_combo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
@ -1389,4 +1389,5 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="room_sill0_100">0-100 coins</string>
|
||||
<string name="room_sill100_500">100-500 coins</string>
|
||||
<string name="room_sill500_m">Above 500 coins</string>
|
||||
<string name="combo">連擊×</string>
|
||||
</resources>
|
||||
|
@ -9,9 +9,9 @@ ext {
|
||||
]
|
||||
manifestPlaceholders = [
|
||||
//正式、
|
||||
serverHost : "https://napi.yaoulive.com",
|
||||
// serverHost : "https://napi.yaoulive.com",
|
||||
// 测试
|
||||
// serverHost : " https://ceshi.yaoulive.com",
|
||||
serverHost : " https://ceshi.yaoulive.com",
|
||||
|
||||
|
||||
|
||||
|
BIN
live/src/main/assets/littlepanda1.svga
Normal file
BIN
live/src/main/assets/littlepanda1.svga
Normal file
Binary file not shown.
BIN
live/src/main/assets/littlepanda10.svga
Normal file
BIN
live/src/main/assets/littlepanda10.svga
Normal file
Binary file not shown.
BIN
live/src/main/assets/littlepanda11.svga
Normal file
BIN
live/src/main/assets/littlepanda11.svga
Normal file
Binary file not shown.
BIN
live/src/main/assets/littlepanda12.svga
Normal file
BIN
live/src/main/assets/littlepanda12.svga
Normal file
Binary file not shown.
BIN
live/src/main/assets/littlepanda13.svga
Normal file
BIN
live/src/main/assets/littlepanda13.svga
Normal file
Binary file not shown.
BIN
live/src/main/assets/littlepanda14.svga
Normal file
BIN
live/src/main/assets/littlepanda14.svga
Normal file
Binary file not shown.
BIN
live/src/main/assets/littlepanda15.svga
Normal file
BIN
live/src/main/assets/littlepanda15.svga
Normal file
Binary file not shown.
BIN
live/src/main/assets/littlepanda16.svga
Normal file
BIN
live/src/main/assets/littlepanda16.svga
Normal file
Binary file not shown.
BIN
live/src/main/assets/littlepanda17.svga
Normal file
BIN
live/src/main/assets/littlepanda17.svga
Normal file
Binary file not shown.
BIN
live/src/main/assets/littlepanda18.svga
Normal file
BIN
live/src/main/assets/littlepanda18.svga
Normal file
Binary file not shown.
BIN
live/src/main/assets/littlepanda19.svga
Normal file
BIN
live/src/main/assets/littlepanda19.svga
Normal file
Binary file not shown.
BIN
live/src/main/assets/littlepanda2.svga
Normal file
BIN
live/src/main/assets/littlepanda2.svga
Normal file
Binary file not shown.
BIN
live/src/main/assets/littlepanda3.svga
Normal file
BIN
live/src/main/assets/littlepanda3.svga
Normal file
Binary file not shown.
BIN
live/src/main/assets/littlepanda4.svga
Normal file
BIN
live/src/main/assets/littlepanda4.svga
Normal file
Binary file not shown.
BIN
live/src/main/assets/littlepanda5.svga
Normal file
BIN
live/src/main/assets/littlepanda5.svga
Normal file
Binary file not shown.
BIN
live/src/main/assets/littlepanda6.svga
Normal file
BIN
live/src/main/assets/littlepanda6.svga
Normal file
Binary file not shown.
BIN
live/src/main/assets/littlepanda7.svga
Normal file
BIN
live/src/main/assets/littlepanda7.svga
Normal file
Binary file not shown.
BIN
live/src/main/assets/littlepanda8.svga
Normal file
BIN
live/src/main/assets/littlepanda8.svga
Normal file
Binary file not shown.
BIN
live/src/main/assets/littlepanda9.svga
Normal file
BIN
live/src/main/assets/littlepanda9.svga
Normal file
Binary file not shown.
BIN
live/src/main/assets/littlepanda_craft.svga
Normal file
BIN
live/src/main/assets/littlepanda_craft.svga
Normal file
Binary file not shown.
@ -71,7 +71,9 @@ import com.yunbao.common.event.LiveOpenSudRoomEvent;
|
||||
import com.yunbao.common.event.LiveRoomChangeEvent;
|
||||
import com.yunbao.common.event.LiveSudGamePopupShowOrHideEvent;
|
||||
import com.yunbao.common.event.NewRoleCustomDrawerPopupEvent;
|
||||
import com.yunbao.common.event.QuickGiftingEvent;
|
||||
import com.yunbao.common.event.ShowHideEvent;
|
||||
import com.yunbao.common.event.SlideEvent;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.CommonHttpConsts;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
@ -1729,14 +1731,13 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
.dismissOnTouchOutside(false)
|
||||
.dismissOnBackPressed(false)
|
||||
.asCustom(liveSudGamePopupXPopup).show();
|
||||
}else {
|
||||
} else {
|
||||
if (liveSudGamePopupXPopup != null) {
|
||||
liveSudGamePopupXPopup.dialog.show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case 1:
|
||||
@ -1765,6 +1766,19 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode .MAIN)
|
||||
public void onSlideEvent(SlideEvent event) {
|
||||
verticalViewPager.setEnableScroll(event.isSlide());
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onQuickGiftingEvent(QuickGiftingEvent event) {
|
||||
if (manager != null) {
|
||||
|
||||
manager.onQuickGifting(event.getIndex(), event.getSvgaName());
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onNewRoleCustomDrawerPopupEvent(NewRoleCustomDrawerPopupEvent event) {
|
||||
//是否关闭弹窗
|
||||
|
@ -31,6 +31,7 @@ import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.NewPeopleInfo;
|
||||
import com.yunbao.common.dialog.LiveNewRolePopup;
|
||||
import com.yunbao.common.event.MessageIMEvent;
|
||||
import com.yunbao.common.event.QuickGiftingEvent;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.API;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
@ -58,7 +59,10 @@ import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
@ -86,10 +90,12 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
private ImageView mRole;//特权
|
||||
private ImageView mPlay;//玩
|
||||
private ImageView mCheat;//整蛊
|
||||
private ImageView pd_pao, combo;
|
||||
|
||||
public LiveAudienceViewHolder(Context context, ViewGroup parentView) {
|
||||
super(context, parentView);
|
||||
this.context = (Activity) context;
|
||||
initLittlePanda();
|
||||
}
|
||||
|
||||
|
||||
@ -118,6 +124,9 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
mPlay = (ImageView) findViewById(R.id.live_play);
|
||||
stationHornBanner = findViewById(R.id.station_horn_banner);
|
||||
mNewPeopleRedDot = findViewById(R.id.live_new_people_red_dot);
|
||||
pd_pao = (ImageView) findViewById(R.id.pd_pao);
|
||||
combo = (ImageView) findViewById(R.id.combo);
|
||||
combo.setVisibility(View.GONE);
|
||||
liveNewPeople.setOnClickListener(this);
|
||||
mRole.setOnClickListener(this);
|
||||
mCheat.setOnClickListener(this);
|
||||
@ -261,6 +270,104 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
return true;
|
||||
});
|
||||
mProcessResultUtil = new ProcessResultUtil((FragmentActivity) mContext);
|
||||
|
||||
pd_pao.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
quickGiftingIndex = 1;
|
||||
combo.setVisibility(View.VISIBLE);
|
||||
removeRunnable = true;
|
||||
lianSongHandler.postDelayed(lianSongRunnable, 1000);
|
||||
Random random = new Random();
|
||||
int randomNumber = random.nextInt(shortSvgas.size());
|
||||
String randomName = shortSvgas.get(randomNumber);
|
||||
Bus.get().post(new QuickGiftingEvent().setIndex(quickGiftingIndex).setSvgaName(randomName));
|
||||
}
|
||||
});
|
||||
combo.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
quickGiftingIndex = quickGiftingIndex + 1;
|
||||
removeRunnable = true;
|
||||
lianSongHandler.postDelayed(lianSongRunnable, 1000);
|
||||
Random random = new Random();
|
||||
if (quickGiftingIndex<11){
|
||||
int randomNumber = random.nextInt(shortSvgas.size());
|
||||
String randomName = shortSvgas.get(randomNumber);
|
||||
Bus.get().post(new QuickGiftingEvent().setIndex(quickGiftingIndex).setSvgaName(randomName));
|
||||
}else {
|
||||
int randomNumber = random.nextInt(highSvgas.size());
|
||||
String randomName = highSvgas.get(randomNumber);
|
||||
if (quickGiftingIndex>=88){
|
||||
|
||||
Bus.get().post(new QuickGiftingEvent().setIndex(quickGiftingIndex).setSvgaName("littlepanda_craft.svga"));
|
||||
}else {
|
||||
Bus.get().post(new QuickGiftingEvent().setIndex(quickGiftingIndex).setSvgaName(randomName));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void resetView() {
|
||||
pd_pao.setVisibility(View.VISIBLE);
|
||||
combo.setVisibility(View.GONE);
|
||||
lianSongHandler.removeCallbacks(lianSongRunnable);
|
||||
}
|
||||
private boolean removeRunnable = false;
|
||||
private int mLianCountDownCount;//连送倒计时的数字
|
||||
private Handler lianSongHandler = new Handler();
|
||||
private Runnable lianSongRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (removeRunnable) {
|
||||
lianSongHandler.removeCallbacks(lianSongRunnable);
|
||||
mLianCountDownCount = 5;
|
||||
lianSongHandler.postDelayed(lianSongRunnable, 1000);
|
||||
removeRunnable = false;
|
||||
Log.e("QuickGiftingEvent", removeRunnable + " " + mLianCountDownCount);
|
||||
} else {
|
||||
mLianCountDownCount--;
|
||||
if (mLianCountDownCount == 0) {
|
||||
pd_pao.setVisibility(View.VISIBLE);
|
||||
combo.setVisibility(View.GONE);
|
||||
lianSongHandler.removeCallbacks(lianSongRunnable);
|
||||
} else {
|
||||
lianSongHandler.postDelayed(lianSongRunnable, 1000);
|
||||
}
|
||||
Log.e("QuickGiftingEvent", removeRunnable + " " + mLianCountDownCount);
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
private List<String> highSvgas = new ArrayList<>();
|
||||
private List<String> shortSvgas = new ArrayList<>();
|
||||
private int quickGiftingIndex = 1;
|
||||
|
||||
private void initLittlePanda() {
|
||||
highSvgas = new ArrayList<>();
|
||||
shortSvgas = new ArrayList<>();
|
||||
highSvgas.add("littlepanda1.svga");
|
||||
highSvgas.add("littlepanda2.svga");
|
||||
highSvgas.add("littlepanda3.svga");
|
||||
highSvgas.add("littlepanda4.svga");
|
||||
highSvgas.add("littlepanda5.svga");
|
||||
highSvgas.add("littlepanda6.svga");
|
||||
highSvgas.add("littlepanda7.svga");
|
||||
highSvgas.add("littlepanda8.svga");
|
||||
highSvgas.add("littlepanda9.svga");
|
||||
highSvgas.add("littlepanda10.svga");
|
||||
shortSvgas.add("littlepanda11.svga");
|
||||
shortSvgas.add("littlepanda12.svga");
|
||||
shortSvgas.add("littlepanda13.svga");
|
||||
shortSvgas.add("littlepanda14.svga");
|
||||
shortSvgas.add("littlepanda15.svga");
|
||||
shortSvgas.add("littlepanda16.svga");
|
||||
shortSvgas.add("littlepanda17.svga");
|
||||
shortSvgas.add("littlepanda18.svga");
|
||||
shortSvgas.add("littlepanda19.svga");
|
||||
}
|
||||
|
||||
private float downY = 0;
|
||||
|
@ -56,6 +56,7 @@ import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.ms.banner.Banner;
|
||||
import com.ms.banner.BannerConfig;
|
||||
import com.ms.banner.listener.OnBannerClickListener;
|
||||
import com.opensource.svgaplayer.SVGACallback;
|
||||
import com.opensource.svgaplayer.SVGADrawable;
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.opensource.svgaplayer.SVGAParser;
|
||||
@ -99,9 +100,9 @@ import com.yunbao.common.bean.XydCompleteModel;
|
||||
import com.yunbao.common.event.AllServerNotifyEvent;
|
||||
import com.yunbao.common.event.AnchorInfoEvent;
|
||||
import com.yunbao.common.event.CustomFullServiceNotifyEvent;
|
||||
import com.yunbao.common.event.HideShowEvent;
|
||||
import com.yunbao.common.event.LiveRoomChangeEvent;
|
||||
import com.yunbao.common.event.LiveSudGamePopupShowOrHideEvent;
|
||||
import com.yunbao.common.event.SlideEvent;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.API;
|
||||
import com.yunbao.common.http.CommonHttpConsts;
|
||||
@ -131,7 +132,6 @@ import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.utils.formatBigNum;
|
||||
import com.yunbao.common.views.AbsViewHolder;
|
||||
import com.yunbao.common.views.LiveSudGamePopup;
|
||||
import com.yunbao.common.views.weight.ClipPathCircleImage;
|
||||
import com.yunbao.common.views.weight.FullServiceNotificationView;
|
||||
import com.yunbao.common.views.weight.NobleNoticeView;
|
||||
@ -384,6 +384,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
private String mAnchorName;//主播名字
|
||||
private boolean isHinde = false;
|
||||
private boolean isFans = false;
|
||||
private FrameLayout pa_pao_layout;
|
||||
private LinearLayout combo_layout;
|
||||
private TextView combo_number;
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onUpdata(String str) {
|
||||
@ -703,6 +706,74 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
}
|
||||
|
||||
HashMap<String, SVGAImageView> svgaImageViewHashMap = new HashMap<>();
|
||||
|
||||
public void onQuickGifting(int index, String svgaName) {
|
||||
pa_pao_layout.setVisibility(View.VISIBLE);
|
||||
combo_layout.setVisibility(View.VISIBLE);
|
||||
combo_number.setText(String.valueOf(index));
|
||||
SVGAImageView svgaImageView = new SVGAImageView(mContext);
|
||||
String tag = svgaName+System.currentTimeMillis();
|
||||
svgaImageViewHashMap.put(tag, svgaImageView);
|
||||
|
||||
Bus.get().post(new SlideEvent().setSlide(!(svgaImageViewHashMap.size() > 0)));
|
||||
svgaImageView.setLoops(1);
|
||||
svgaImageView.setTag(tag);
|
||||
pa_pao_layout.addView(svgaImageView);
|
||||
Log.e("QuickGiftingEvent", "pa_pao_layout:getChildCount:" + pa_pao_layout.getChildCount());
|
||||
Log.e("QuickGiftingEvent", "index:" + index + " svgaName:" + svgaName);
|
||||
svgaImageView.setCallback(new SVGACallback() {
|
||||
@Override
|
||||
public void onPause() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinished() {
|
||||
if (svgaImageViewHashMap.size() != 0) {
|
||||
svgaImageView.clear();
|
||||
pa_pao_layout.removeView(svgaImageView);
|
||||
Log.e("QuickGiftingEvent", "svgaImageView.getTag:" + svgaImageView.getTag());
|
||||
svgaImageViewHashMap.remove(svgaName);
|
||||
Log.e("QuickGiftingEvent", "svgaImageViewHashMap:" + svgaImageViewHashMap.toString());
|
||||
Log.e("QuickGiftingEvent", "pa_pao_layout:getChildCount:" + pa_pao_layout.getChildCount());
|
||||
if (pa_pao_layout.getChildCount() == 0) {
|
||||
pa_pao_layout.setVisibility(View.GONE);
|
||||
combo_layout.setVisibility(View.GONE);
|
||||
Bus.get().post(new SlideEvent().setSlide(true));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRepeat() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStep(int i, double v) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
new SVGAParser(mContext).decodeFromAssets(svgaName, new SVGAParser.ParseCompletion() {
|
||||
@Override
|
||||
public void onComplete(@NonNull SVGAVideoEntity svgaVideoEntity) {
|
||||
SVGADrawable drawable = new SVGADrawable(svgaVideoEntity);
|
||||
svgaImageView.setImageDrawable(drawable);
|
||||
|
||||
svgaImageView.startAnimation();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
|
||||
}
|
||||
}, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取下一秒钟的时间
|
||||
*/
|
||||
@ -1473,7 +1544,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
|
||||
new LoadDian9TuUtil().loadDian9TuAssets2(mContext, wishListLayout2, "rectangle_new.png", 1);
|
||||
|
||||
pa_pao_layout = (FrameLayout) findViewById(R.id.pa_pao_layout);
|
||||
combo_layout = (LinearLayout) findViewById(R.id.combo_layout);
|
||||
combo_number = (TextView) findViewById(R.id.combo_number);
|
||||
pa_pao_layout.setVisibility(View.GONE);
|
||||
combo_layout.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
private FrameLayout redPacket;
|
||||
@ -1730,8 +1805,12 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
* 重置数据
|
||||
*/
|
||||
public void resetView() {
|
||||
svgaImageViewHashMap.clear();
|
||||
pa_pao_layout.removeAllViews();
|
||||
timeHandler.removeCallbacks(timeRunnable);
|
||||
anchorTimeHandler.removeCallbacks(anchorTimeRunnable);
|
||||
pa_pao_layout.setVisibility(View.GONE);
|
||||
combo_layout.setVisibility(View.GONE);
|
||||
resetViewGone();
|
||||
visibility = false;
|
||||
pkUidTmp = "";
|
||||
@ -3987,6 +4066,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
}
|
||||
|
||||
public void clearData() {
|
||||
svgaImageViewHashMap.clear();
|
||||
pa_pao_layout.removeAllViews();
|
||||
timeHandler.removeCallbacks(timeRunnable);
|
||||
anchorTimeHandler.removeCallbacks(anchorTimeRunnable);
|
||||
LiveHttpUtil.cancel(LiveHttpConsts.GET_USER_LIST);
|
||||
|
@ -56,6 +56,7 @@ import com.yunbao.common.event.LiveFloatEvent;
|
||||
import com.yunbao.common.event.LiveGiftDialogEvent;
|
||||
import com.yunbao.common.event.LiveRoomChangeEvent;
|
||||
import com.yunbao.common.event.LiveSudGamePopupShowOrHideEvent;
|
||||
import com.yunbao.common.event.QuickGiftingEvent;
|
||||
import com.yunbao.common.event.SendBlindGiftEvent;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.CommonHttpConsts;
|
||||
@ -223,6 +224,12 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
}
|
||||
}
|
||||
|
||||
public void onQuickGifting(int index,String svgaName) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.onQuickGifting(index,svgaName);
|
||||
}
|
||||
}
|
||||
|
||||
public PortraitLiveManager(Activity context, Intent intent) {
|
||||
this.mContext = context;
|
||||
this.mIntent = intent;
|
||||
@ -386,6 +393,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
}
|
||||
});
|
||||
mLiveRoomViewHolder.resetView();
|
||||
mLiveAudienceViewHolder.resetView();
|
||||
enterRoomModel.clear();
|
||||
enterRoomLeaveHandler.removeCallbacks(enterRoomLeaveRunnable);
|
||||
mLiveRoomViewHolder.setAvatar(data.getAvatar());
|
||||
@ -932,7 +940,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
* 申请连麦但是主播还未同意的状态
|
||||
*/
|
||||
public void micIngTypeOne(LiveBean bean, int liveType, int liveTypeVal) {
|
||||
DialogUitl.showSimpleDialog(mContext, null, WordUtil.isNewZh()?"您已申請,退出將取消語音連麥申請!":"You have applied, logout will cancel the voice connection application!", false, new DialogUitl.SimpleCallback3() {
|
||||
DialogUitl.showSimpleDialog(mContext, null, WordUtil.isNewZh() ? "您已申請,退出將取消語音連麥申請!" : "You have applied, logout will cancel the voice connection application!", false, new DialogUitl.SimpleCallback3() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog) {
|
||||
MicStatusManager.getInstance().clear();
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
@ -345,11 +345,11 @@
|
||||
<!--整蛊-->
|
||||
<ImageView
|
||||
android:id="@+id/live_cheat"
|
||||
android:visibility="gone"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@mipmap/icon_prank" />
|
||||
android:src="@mipmap/icon_prank"
|
||||
android:visibility="gone" />
|
||||
<!--玩-->
|
||||
<ImageView
|
||||
android:id="@+id/live_play"
|
||||
@ -384,31 +384,68 @@
|
||||
android:background="@drawable/background_ff5075"
|
||||
android:visibility="invisible" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginEnd="8dp">
|
||||
|
||||
<com.yunbao.common.views.weight.CircleProgress2
|
||||
android:id="@+id/circleProgress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pd_pao"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_pd_pao" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/backgroud_panda_time"
|
||||
android:gravity="center"
|
||||
android:text="120S"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/combo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/icon_combo" />
|
||||
</RelativeLayout>
|
||||
|
||||
<!--礼物-->
|
||||
<ImageView
|
||||
android:id="@+id/gift_image"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@drawable/background_gift"
|
||||
/>
|
||||
android:background="@drawable/background_gift" />
|
||||
<!--特权-->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp">
|
||||
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/live_privilege"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@mipmap/icon_privilege"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:src="@mipmap/icon_privilege" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/privilege_red_point"
|
||||
android:layout_width="10dp"
|
||||
@ -433,10 +470,6 @@
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100dp"
|
||||
|
@ -2484,13 +2484,13 @@
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@drawable/background_live_sud_hint"
|
||||
android:gravity="center"
|
||||
android:layout_marginStart="21dp"
|
||||
android:layout_marginEnd="42dp"
|
||||
android:background="@drawable/background_live_sud_hint"
|
||||
android:gravity="center"
|
||||
android:paddingStart="21dp"
|
||||
android:visibility="gone"
|
||||
android:paddingEnd="15dp">
|
||||
android:paddingEnd="15dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<com.yunbao.common.views.weight.MarqueeTextView
|
||||
android:id="@+id/sud_text_name"
|
||||
@ -2501,8 +2501,36 @@
|
||||
android:singleLine="true"
|
||||
android:text="主播創建了【游戲名】房間,快來與主播同玩~"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/pa_pao_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="384dp"
|
||||
android:layout_alignParentBottom="true" />
|
||||
<LinearLayout
|
||||
android:id="@+id/combo_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginStart="220dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/combo"
|
||||
android:textColor="#FFDD25"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/combo_number"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="1"
|
||||
android:textColor="#FFDD25"
|
||||
android:textSize="58sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
Loading…
Reference in New Issue
Block a user