Merge remote-tracking branch 'origin/dev_6.6.3'

# Conflicts:
#	common/src/main/java/com/yunbao/common/bean/IMLoginModel.java
#	config.gradle
This commit is contained in:
18401019693
2023-12-06 15:20:39 +08:00
68 changed files with 1551 additions and 72 deletions

View File

@@ -0,0 +1,24 @@
package com.yunbao.common.bean;
public class CoolConfig extends BaseModel {
private int rate;
private String ticketCount="0" ;
public String getTicketCount() {
return ticketCount;
}
public CoolConfig setTicketCount(String ticketCount) {
this.ticketCount = ticketCount;
return this;
}
public int getRate() {
return rate;
}
public CoolConfig setRate(int rate) {
this.rate = rate;
return this;
}
}

View File

@@ -39,6 +39,28 @@ public class EnterRoomNewModel extends BaseModel {
private String sudGameRoomName;
@SerializedName("sud_gameDate")
private SudGameDateModel sudGameDateModel;
@SerializedName("quick_gift_remaining_quantity")
private int quickGiftRemainingQuantity;//剩余的小PD礼物数量
@SerializedName("if_viewing_duration_complete")
private int ifViewingDurationComplete;//通过观看时间获取小PD礼物的次数
public int getQuickGiftRemainingQuantity() {
return quickGiftRemainingQuantity;
}
public EnterRoomNewModel setQuickGiftRemainingQuantity(int quickGiftRemainingQuantity) {
this.quickGiftRemainingQuantity = quickGiftRemainingQuantity;
return this;
}
public int getIfViewingDurationComplete() {
return ifViewingDurationComplete;
}
public EnterRoomNewModel setIfViewingDurationComplete(int ifViewingDurationComplete) {
this.ifViewingDurationComplete = ifViewingDurationComplete;
return this;
}
public SudGameDateModel getSudGameDateModel() {
return sudGameDateModel;

View File

@@ -204,7 +204,7 @@ public class IMLoginModel extends BaseModel {
@SerializedName("votes")
private String votes;
@SerializedName("yuanbao")
private double yuanbao;
private String yuanbao;
@SerializedName("list")
private List<List<ListModel>> list;
@SerializedName("slide")
@@ -825,11 +825,11 @@ public class IMLoginModel extends BaseModel {
return this;
}
public double getYuanbao() {
public String getYuanbao() {
return yuanbao;
}
public IMLoginModel setYuanbao(double yuanbao) {
public IMLoginModel setYuanbao(String yuanbao) {
this.yuanbao = yuanbao;
return this;
}

View File

@@ -0,0 +1,14 @@
package com.yunbao.common.bean;
public class NativeCallbackModel extends BaseModel{
private String uid ;
public String getUid() {
return uid;
}
public NativeCallbackModel setUid(String uid) {
this.uid = uid;
return this;
}
}

View File

@@ -0,0 +1,39 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class QuickGiftSendGiftModel extends BaseModel {
@SerializedName("quick_gift_remaining_quantity")
private int quickGiftRemainingQuantity;//剩余的小PD礼物数量
@SerializedName("if_viewing_duration_complete")
private int ifViewingDurationComplete;//通过观看时间获取小PD礼物的次数
@SerializedName("if_hidden_egg")
private int ifHiddenEgg = 1;//1.未解锁 2.已解锁过奖励 3.当前请求解锁了奖励
public int getIfHiddenEgg() {
return ifHiddenEgg;
}
public QuickGiftSendGiftModel setIfHiddenEgg(int ifHiddenEgg) {
this.ifHiddenEgg = ifHiddenEgg;
return this;
}
public int getQuickGiftRemainingQuantity() {
return quickGiftRemainingQuantity;
}
public QuickGiftSendGiftModel setQuickGiftRemainingQuantity(int quickGiftRemainingQuantity) {
this.quickGiftRemainingQuantity = quickGiftRemainingQuantity;
return this;
}
public int getIfViewingDurationComplete() {
return ifViewingDurationComplete;
}
public QuickGiftSendGiftModel setIfViewingDurationComplete(int ifViewingDurationComplete) {
this.ifViewingDurationComplete = ifViewingDurationComplete;
return this;
}
}

View File

@@ -0,0 +1,101 @@
package com.yunbao.common.dialog;
import android.content.Context;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.NonNull;
import com.lxj.xpopup.core.CenterPopupView;
import com.yunbao.common.R;
import com.yunbao.common.bean.CoolConfig;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import java.math.BigDecimal;
public class CinemaTicketPopupWindow extends CenterPopupView {
private CoolConfig mCoolConfig;
private TextView cinemaTicket, ticketsPlusMinus, quantityNeed;
private int ticket = 1;
private CinemaTicketPopupWindowCallBack mCinemaTicketPopupWindowCallBack;
public CinemaTicketPopupWindow(@NonNull Context context, CoolConfig coolConfig, CinemaTicketPopupWindowCallBack cinemaTicketPopupWindowCallBack) {
super(context);
mCoolConfig = coolConfig;
mCinemaTicketPopupWindowCallBack = cinemaTicketPopupWindowCallBack;
}
@Override
protected int getImplLayoutId() {
return R.layout.cinema_ticket_popup;
}
// 执行初始化操作比如findView设置点击或者任何你弹窗内的业务逻辑
@Override
protected void onCreate() {
super.onCreate();
cinemaTicket = findViewById(R.id.cinema_ticket);
ticketsPlusMinus = findViewById(R.id.tickets_plus_minus);
quantityNeed = findViewById(R.id.quantity_need);
cinemaTicket.setText(new BigDecimal(ticket).add(new BigDecimal(mCoolConfig.getTicketCount())).toString());
ticketsPlusMinus.setText(String.valueOf(ticket));
quantityNeed.setText(new BigDecimal(ticket).multiply(new BigDecimal(mCoolConfig.getRate())).toString());
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.cinema_ticket_close), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
dialog.dismiss();
}
});
findViewById(R.id.sub).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
if (ticket > 1) {
ticket = ticket - 1;
cinemaTicket.setText(new BigDecimal(ticket).add(new BigDecimal(mCoolConfig.getTicketCount())).toString());
ticketsPlusMinus.setText(String.valueOf(ticket));
quantityNeed.setText(new BigDecimal(ticket).multiply(new BigDecimal(mCoolConfig.getRate())).toString());
}
}
});
findViewById(R.id.add).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
ticket = ticket + 1;
cinemaTicket.setText(new BigDecimal(ticket).add(new BigDecimal(mCoolConfig.getTicketCount())).toString());
ticketsPlusMinus.setText(String.valueOf(ticket));
quantityNeed.setText(new BigDecimal(ticket).multiply(new BigDecimal(mCoolConfig.getRate())).toString());
}
});
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.cinema_ticket_exchange), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
LiveNetManager.get(getContext())
.buyTicket(String.valueOf(ticket), new HttpCallback<String>() {
@Override
public void onSuccess(String data) {
if (mCinemaTicketPopupWindowCallBack != null) {
mCinemaTicketPopupWindowCallBack.onCallBack(data);
}
dialog.dismiss();
}
@Override
public void onError(String error) {
ToastUtil.show(error);
}
});
}
});
}
public interface CinemaTicketPopupWindowCallBack {
void onCallBack(String data);
}
}

View File

@@ -1,6 +1,7 @@
package com.yunbao.common.event;
import com.yunbao.common.bean.BaseModel;
import com.yunbao.common.bean.CoolConfig;
import com.yunbao.common.bean.VideoBean;
import java.util.ArrayList;
@@ -23,6 +24,16 @@ public class JavascriptInterfaceEvent extends BaseModel {
private String data;
private String name;
private String image;
private CoolConfig coolConfig;
public CoolConfig getCoolConfig() {
return coolConfig;
}
public JavascriptInterfaceEvent setCoolConfig(CoolConfig coolConfig) {
this.coolConfig = coolConfig;
return this;
}
public String getName() {
return name;

View File

@@ -0,0 +1,67 @@
package com.yunbao.common.event;
import com.yunbao.common.bean.BaseModel;
public class QuickGiftingEvent extends BaseModel {
private int index;
private String svgaName;
private boolean show =false;
private boolean reminder = false;
private String giftRemainingQuantity;
private String hotNum;
public String getHotNum() {
return hotNum;
}
public QuickGiftingEvent setHotNum(String hotNum) {
this.hotNum = hotNum;
return this;
}
public String getGiftRemainingQuantity() {
return giftRemainingQuantity;
}
public QuickGiftingEvent setGiftRemainingQuantity(String giftRemainingQuantity) {
this.giftRemainingQuantity = giftRemainingQuantity;
return this;
}
public boolean isReminder() {
return reminder;
}
public QuickGiftingEvent setReminder(boolean reminder) {
this.reminder = reminder;
return this;
}
public boolean isShow() {
return show;
}
public QuickGiftingEvent setShow(boolean show) {
this.show = show;
return this;
}
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;
}
}

View 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;
}
}

View File

@@ -9,6 +9,7 @@ import com.yunbao.common.bean.BlindBoxInfoModel;
import com.yunbao.common.bean.CheckLiveModel;
import com.yunbao.common.bean.CheckRemainingBalance;
import com.yunbao.common.bean.ContributeModel;
import com.yunbao.common.bean.CoolConfig;
import com.yunbao.common.bean.CreateSudRoomModel;
import com.yunbao.common.bean.CustomSidebarInfoModel;
import com.yunbao.common.bean.DiscountsModel;
@@ -46,6 +47,7 @@ import com.yunbao.common.bean.OpenAdModel;
import com.yunbao.common.bean.PkRankBean;
import com.yunbao.common.bean.PrankGiftBean;
import com.yunbao.common.bean.PrankHttpTurntableBean;
import com.yunbao.common.bean.QuickGiftSendGiftModel;
import com.yunbao.common.bean.RandomPkUserBean;
import com.yunbao.common.bean.RankPkInfoBean;
import com.yunbao.common.bean.RedPacketDetailsBean;
@@ -1061,9 +1063,32 @@ public interface PDLiveApi {
@GET("/api/public/?service=Sudgameserver.deductMoney")
Observable<ResponseModel<Object>> deductMoney(
@Query("room_id") String roomId
);
@GET("/api/public/?service=Sudgameserver.checkCurrency")
Observable<ResponseModel<CheckCurrencyModel>> checkCurrency(
);
@GET("/api/public/?service=Quickgift.sendGift")
Observable<ResponseModel<QuickGiftSendGiftModel>> quickGiftSendGift(
@Query("quick_gift_number") String quickGiftNumber,
@Query("liveuid") String liveUid,
@Query("stream") String stream
);
@GET("/api/public/?service=Quickgift.viewingDurationGetGift")
Observable<ResponseModel<QuickGiftSendGiftModel>> viewingDurationGetGift(
@Query("liveuid") String liveUid
);
@GET("/api/public/?service=cool.config")
Observable<ResponseModel<CoolConfig>> getCoolConfig();
@FormUrlEncoded
@POST("/api/public/?service=cool.buy_ticket")
Observable<ResponseModel<Object>> buyTicket(
@Field("quantity") String quantity
);
}

View File

@@ -11,6 +11,7 @@ import com.yunbao.common.bean.BaseModel;
import com.yunbao.common.bean.BlindBoxInfoModel;
import com.yunbao.common.bean.CheckLiveModel;
import com.yunbao.common.bean.CheckRemainingBalance;
import com.yunbao.common.bean.CoolConfig;
import com.yunbao.common.bean.CreateSudRoomModel;
import com.yunbao.common.bean.CustomSidebarInfoModel;
import com.yunbao.common.bean.DiscountsModel;
@@ -44,6 +45,7 @@ import com.yunbao.common.bean.OpenAdModel;
import com.yunbao.common.bean.PkRankBean;
import com.yunbao.common.bean.PrankGiftBean;
import com.yunbao.common.bean.PrankHttpTurntableBean;
import com.yunbao.common.bean.QuickGiftSendGiftModel;
import com.yunbao.common.bean.RandomPkUserBean;
import com.yunbao.common.bean.RankPkInfoBean;
import com.yunbao.common.bean.RedPacketDetailsBean;
@@ -2317,21 +2319,21 @@ public class LiveNetManager {
}
public void deductMoney(String roomId) {
API.get().pdLiveApi(mContext)
.deductMoney(roomId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<Object>>() {
@Override
public void accept(ResponseModel<Object> objectResponseModel) throws Exception {
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
}
}).isDisposed();
// API.get().pdLiveApi(mContext)
// .deductMoney(roomId)
// .subscribeOn(Schedulers.io())
// .observeOn(AndroidSchedulers.mainThread())
// .subscribe(new Consumer<ResponseModel<Object>>() {
// @Override
// public void accept(ResponseModel<Object> objectResponseModel) throws Exception {
//
// }
// }, new Consumer<Throwable>() {
// @Override
// public void accept(Throwable throwable) throws Exception {
//
// }
// }).isDisposed();
}
public void checkCurrency(HttpCallback<CheckCurrencyModel> callback) {
@@ -2384,6 +2386,102 @@ public class LiveNetManager {
}).isDisposed();
}
public void viewingDurationGetGift(String liveUid, HttpCallback<QuickGiftSendGiftModel> callback) {
API.get().pdLiveApi(mContext)
.viewingDurationGetGift(liveUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<QuickGiftSendGiftModel>>() {
@Override
public void accept(ResponseModel<QuickGiftSendGiftModel> quickGiftSendGiftModelResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(quickGiftSendGiftModelResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void getCoolConfig(HttpCallback<CoolConfig> callback) {
API.get().pdLiveApi(mContext)
.getCoolConfig()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<CoolConfig>>() {
@Override
public void accept(ResponseModel<CoolConfig> coolConfigResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(coolConfigResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void buyTicket(String quantity, HttpCallback<String> callback) {
API.get().pdLiveApi(mContext)
.buyTicket(quantity)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<Object>>() {
@Override
public void accept(ResponseModel<Object> objectResponseModel) throws Exception {
if (callback != null) {
if (objectResponseModel.getData().getCode() == 200) {
callback.onSuccess("1");
} else if (objectResponseModel.getData().getCode() == 500) {
callback.onSuccess("2");
} else {
callback.onError(objectResponseModel.getData().getMsg());
}
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void quickGiftSendGift(String quickGiftNumber, String liveUid, String stream, HttpCallback<QuickGiftSendGiftModel> callback) {
API.get().pdLiveApi(mContext)
.quickGiftSendGift(quickGiftNumber, liveUid, stream)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<QuickGiftSendGiftModel>>() {
@Override
public void accept(ResponseModel<QuickGiftSendGiftModel> quickGiftSendGiftModelResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(quickGiftSendGiftModelResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void getRoomList(String sudGameId, String threshold, String roomHolderType, String liveUid, String currencyType, int page, HttpCallback<List<SudRoomListModel>> callback) {
API.get().pdLiveApi(mContext)
.getRoomList(sudGameId, threshold, roomHolderType, liveUid, currencyType, page)

View File

@@ -60,6 +60,13 @@ public class IMLoginManager extends BaseCacheManager {
public boolean getRedPoint() {
return !TextUtils.isEmpty(getString("RedPoint")) && !TextUtils.equals(getString("RedPoint"), "1");
}
public void setQuickGiftIfFirst() {
put("quick_gift_if_first", "1");
}
public boolean getQuickGiftIfFirst() {
return TextUtils.isEmpty(getString("quick_gift_if_first")) || !TextUtils.equals(getString("quick_gift_if_first"), "1");
}
public void setSudGameMin() {
put("SudGameMin", "0");

View File

@@ -0,0 +1,54 @@
package com.yunbao.common.utils;
import android.app.Activity;
import android.util.Log;
import android.webkit.JavascriptInterface;
import android.webkit.WebView;
import com.momo.mcamera.util.JsonUtil;
import com.yunbao.common.bean.CoolConfig;
import com.yunbao.common.event.JavascriptInterfaceEvent;
public class JavascriptInterfacePlayLetUtils {
private Activity mContext;
private WebView mWebView;
private static JavascriptInterfacePlayLetUtils sInstance;
public static JavascriptInterfacePlayLetUtils getInstance() {
synchronized (JavascriptInterfacePlayLetUtils.class) {
sInstance = new JavascriptInterfacePlayLetUtils();
return sInstance;
}
}
public JavascriptInterfacePlayLetUtils setmContext(Activity mContext, WebView mWebView) {
this.mContext = mContext;
this.mWebView = mWebView;
// webView.evaluateJavascript("javascript:nativeCallback('" + params + "')", new ValueCallback<String>() {
// @Override
// public void onReceiveValue(String value) {
// }
// });
return this;
}
@JavascriptInterface
public void postEvent(String name, String data) {
Log.e("TAG", "postEvent name==" + name);
Log.e("TAG", "postEvent data==" + data);
}
@JavascriptInterface
public void postWeakBalance(String data) {
CoolConfig coolConfig = new JsonUtil().fromJson(data, CoolConfig.class);
Log.e("TAG", "postWeakBalance data==" + data);
Bus.get().post(new JavascriptInterfaceEvent()
.setCoolConfig(coolConfig)
.setMethod("postWeakBalance"));
}
}

View File

@@ -2,11 +2,13 @@ package com.yunbao.common.utils;
import static com.yunbao.common.CommonAppConfig.isGetNewWrap;
import static com.yunbao.common.utils.RouteUtil.PATH_COIN;
import static com.yunbao.common.utils.RouteUtil.PATH_REWARD;
import android.app.Activity;
import android.app.Dialog;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.JavascriptInterface;
@@ -25,6 +27,7 @@ import com.yunbao.common.bean.VideoBean;
import com.yunbao.common.bean.VideoListBean;
import com.yunbao.common.event.JavascriptInterfaceEvent;
import com.yunbao.common.event.LiveRoomChangeEvent;
import com.yunbao.common.event.QuickGiftingEvent;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.HttpClient;
import com.yunbao.common.http.LiveHttpUtil;
@@ -124,10 +127,10 @@ public class JavascriptInterfaceUtils {
url = CommonAppConfig.HOST + url;
if (url.contains("?")) {
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token="
+ CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
+ CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
} else {
url += "?uid=" + CommonAppConfig.getInstance().getUid() + "&token="
+ CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
+ CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
}
if (LiveZhuangBana) {
RouteUtil.forwardLiveZhuangBanActivity(url, false);
@@ -147,10 +150,10 @@ public class JavascriptInterfaceUtils {
url = CommonAppConfig.HOST + url;
if (url.contains("?")) {
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token="
+ CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
+ CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
} else {
url += "?uid=" + CommonAppConfig.getInstance().getUid() + "&token="
+ CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
+ CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
}
if (LiveZhuangBana) {
RouteUtil.forwardLiveZhuangBanActivity(url, title);
@@ -259,11 +262,12 @@ public class JavascriptInterfaceUtils {
/**
* 跳转直播并打开礼物栏选中礼物
*
* @param liveId 直播间id
* @param giftId 礼物id
*/
@JavascriptInterface
public void androidMethodLookToLiveGift(String liveId,String giftId){
public void androidMethodLookToLiveGift(String liveId, String giftId) {
LiveHttpUtil.getLiveInfo(liveId, new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
@@ -300,6 +304,7 @@ public class JavascriptInterfaceUtils {
}
});
}
@JavascriptInterface
public void androidMethodLookToLive(String liveId) {
Bus.get().post(new JavascriptInterfaceEvent()
@@ -598,6 +603,18 @@ public class JavascriptInterfaceUtils {
.setMethod("clickLogOffAccount"));
}
@JavascriptInterface
public void androidClickToTaskPage() {
ARouter.getInstance().build(PATH_REWARD).withString("url",
CommonAppConfig.HOST + "/index.php?g=Appapi&m=task&a=index" + "&uid=" + CommonAppConfig.getInstance().getUid()
+ "&token=" + CommonAppConfig.getInstance().getToken() + "&tabIndex=1"+ "&isZh=" + (WordUtil.isNewZh() ? "1" : "0")).navigation();
}
@JavascriptInterface
public void androidQuickGiftRemainingQuantity(int giftRemainingQuantity) {
Bus.get().post(new QuickGiftingEvent().setGiftRemainingQuantity(String.valueOf(giftRemainingQuantity)));
}
@JavascriptInterface
public void androidFansGroupBuy(String id) {
Bus.get().post(new JavascriptInterfaceEvent()
@@ -644,8 +661,9 @@ public class JavascriptInterfaceUtils {
Bus.get().post(new JavascriptInterfaceEvent()
.setMethod("androidCancelAnchorAttention"));
}
@JavascriptInterface
public void androidLnsufficientBalanceClick(String msg){
public void androidLnsufficientBalanceClick(String msg) {
DialogUitl.showSimpleDialog(mContext, msg, new DialogUitl.SimpleCallback2() {
@Override
public void onCancelClick() {
@@ -659,4 +677,5 @@ public class JavascriptInterfaceUtils {
}
});
}
}

View File

@@ -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 = 10, mMax = 100;
//圆弧(也可以说是圆环)的宽度
private float mArcWidth =7;
//控件的宽度
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.TRANSPARENT);
//大圆的半径
float bigCircleRadius = mWidth / 2;
//小圆的半径
float smallCircleRadius = bigCircleRadius;
//绘制小圆
canvas.drawCircle(bigCircleRadius, bigCircleRadius, smallCircleRadius, mPaint);
mPaint.setColor(Color.parseColor("#FEC51B"));
mRectF.set(mArcWidth, mArcWidth, mWidth - mArcWidth, mWidth - mArcWidth);
//绘制圆弧
canvas.drawArc(mRectF, -90, mCurrent * 360 / mMax, false, mPaint);
setBackgroundColor(Color.TRANSPARENT);
}
}

View 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>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<corners android:bottomLeftRadius="0dp" android:bottomRightRadius="16dp" android:topLeftRadius="16dp" android:topRightRadius="0dp" />
<gradient android:angle="360" android:endColor="#F6F5FF" android:startColor="#D3E3FF" />
</shape>
</item>
</selector>

View File

@@ -0,0 +1,171 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="475dp"
android:layout_marginStart="21dp"
android:layout_marginEnd="21dp"
android:background="@mipmap/background_cinema_ticket"
android:orientation="vertical">
<ImageView
android:id="@+id/cinema_ticket_close"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="end"
android:layout_margin="12dp"
android:src="@mipmap/icon_cinema_ticket_close" />
<ImageView
android:layout_width="222dp"
android:layout_height="25dp"
android:layout_gravity="center"
android:src="@mipmap/icon_cinema_ticket_title" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="15dp">
<TextView
android:id="@+id/cinema_ticket"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0"
android:textColor="#DFEAFF"
android:textSize="15sp" />
<ImageView
android:layout_width="23dp"
android:layout_height="19dp"
android:layout_marginStart="5dp"
android:src="@mipmap/icon_cinema_ticket" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="35dp"
android:gravity="center">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/conversion_quantity"
android:textColor="#FFFFFF"
android:textSize="14sp" />
<LinearLayout
android:layout_width="90dp"
android:layout_height="25dp"
android:background="@mipmap/backgroud_tickets_plus_minus">
<View
android:id="@+id/sub"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<TextView
android:id="@+id/tickets_plus_minus"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="center"
android:singleLine="true"
android:text="0"
android:textColor="#000000"
android:textSize="12dp" />
<View
android:id="@+id/add"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="13dp"
android:gravity="center">
<TextView
android:id="@+id/quantity_need"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/conversion_quantity_need"
android:textColor="#DFEAFF"
android:textSize="12sp" />
<ImageView
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginStart="3dp"
android:src="@mipmap/icon_collectibles2" />
</LinearLayout>
<ImageButton
android:id="@+id/cinema_ticket_exchange"
android:layout_width="140dp"
android:layout_height="55dp"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:background="@mipmap/backgroundn_cinema_ticket_exchange" />
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="7dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="7dp"
android:layout_marginBottom="23dp"
android:background="@drawable/background_cinema_ticket_hint">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingStart="3dp"
android:paddingTop="10dp"
android:paddingBottom="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/conversion_quantity_need_of_use"
android:textColor="#000000"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="11dp"
android:text="@string/conversion_quantity_need_of_use1"
android:textColor="#000000"
android:textSize="13sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="@string/conversion_quantity_need_of_use2"
android:textColor="#000000"
android:textSize="13sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="@string/conversion_quantity_need_of_use3"
android:textColor="#000000"
android:textSize="13sp" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 984 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -1386,5 +1386,12 @@ 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">combo X</string>
<string name="conversion_quantity">Exchange quantity:</string>
<string name="conversion_quantity_need">Need %s</string>
<string name="conversion_quantity_need_of_use">Exchange&amp;Usage Rules:</string>
<string name="conversion_quantity_need_of_use1">·One star coin can be exchanged for one ticket. You can customize the exchange quantity according to your needs. Once the ticket is exchanged, it cannot be revoked. Please confirm in advance;</string>
<string name="conversion_quantity_need_of_use2">·One ticket can be used to watch one episode of a short drama. After successful redemption, you can return to the viewing page and use the ticket to continue watching the movie;</string>
<string name="conversion_quantity_need_of_use3">·Ticket prohibit illegal activities such as offline trading and acquisitions, and PDLIVE will crack down severely on various profit-making trading activities.</string>
</resources>

View File

@@ -1383,4 +1383,11 @@
<string name="room_sill0_100">0-100星幣</string>
<string name="room_sill100_500">100-500星幣</string>
<string name="room_sill500_m">500以上星幣</string>
<string name="combo">連擊×</string>
<string name="conversion_quantity">兌換數量:</string>
<string name="conversion_quantity_need">需要 %s</string>
<string name="conversion_quantity_need_of_use">兌換&amp;使用規則:</string>
<string name="conversion_quantity_need_of_use1">·1星幣兌換1張觀影券您可以根據需求自定義兌換數量觀影券一經兌換不可撤銷請提前確認</string>
<string name="conversion_quantity_need_of_use2">·1張觀影券可觀看一集短劇兌換成功後即可返回觀影頁面使用觀影券繼續觀看影片</string>
<string name="conversion_quantity_need_of_use3">·觀影券禁止線下交易、收購等不正當行為PDLIVE將對各類以盈利為目的的交易行為進行嚴厲 打擊。</string>
</resources>

View File

@@ -1382,4 +1382,11 @@
<string name="room_sill0_100">0-100星幣</string>
<string name="room_sill100_500">100-500星幣</string>
<string name="room_sill500_m">500以上星幣</string>
<string name="combo">連擊×</string>
<string name="conversion_quantity">兌換數量:</string>
<string name="conversion_quantity_need">需要 %s</string>
<string name="conversion_quantity_need_of_use">兌換&amp;使用規則:</string>
<string name="conversion_quantity_need_of_use1">·1星幣兌換1張觀影券您可以根據需求自定義兌換數量觀影券一經兌換不可撤銷請提前確認</string>
<string name="conversion_quantity_need_of_use2">·1張觀影券可觀看一集短劇兌換成功後即可返回觀影頁面使用觀影券繼續觀看影片</string>
<string name="conversion_quantity_need_of_use3">·觀影券禁止線下交易、收購等不正當行為PDLIVE將對各類以盈利為目的的交易行為進行嚴厲 打擊。</string>
</resources>

View File

@@ -1382,5 +1382,12 @@
<string name="room_sill0_100">0-100星幣</string>
<string name="room_sill100_500">100-500星幣</string>
<string name="room_sill500_m">500以上星幣</string>
<string name="combo">連擊×</string>
<string name="conversion_quantity">兌換數量:</string>
<string name="conversion_quantity_need">需要 %s</string>
<string name="conversion_quantity_need_of_use">兌換&amp;使用規則:</string>
<string name="conversion_quantity_need_of_use1">·1星幣兌換1張觀影券您可以根據需求自定義兌換數量觀影券一經兌換不可撤銷請提前確認</string>
<string name="conversion_quantity_need_of_use2">·1張觀影券可觀看一集短劇兌換成功後即可返回觀影頁面使用觀影券繼續觀看影片</string>
<string name="conversion_quantity_need_of_use3">·觀影券禁止線下交易、收購等不正當行為PDLIVE將對各類以盈利為目的的交易行為進行嚴厲打擊。</string>
</resources>

View File

@@ -1389,4 +1389,11 @@ 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">combo X</string>
<string name="conversion_quantity">Exchange quantity:</string>
<string name="conversion_quantity_need">Need %s</string>
<string name="conversion_quantity_need_of_use">Exchange&amp;Usage Rules:</string>
<string name="conversion_quantity_need_of_use1">·One star coin can be exchanged for one ticket. You can customize the exchange quantity according to your needs. Once the ticket is exchanged, it cannot be revoked. Please confirm in advance;</string>
<string name="conversion_quantity_need_of_use2">·One ticket can be used to watch one episode of a short drama. After successful redemption, you can return to the viewing page and use the ticket to continue watching the movie;</string>
<string name="conversion_quantity_need_of_use3">·Ticket prohibit illegal activities such as offline trading and acquisitions, and PDLIVE will crack down severely on various profit-making trading activities.</string>
</resources>