Merge remote-tracking branch 'origin/dev_6.6.4_战令' into dev_6.6.4_战令
This commit is contained in:
commit
b10312118b
@ -0,0 +1,27 @@
|
|||||||
|
package com.yunbao.common.dialog;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.lxj.xpopup.core.CenterPopupView;
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 升級精英/尊享戰令
|
||||||
|
*/
|
||||||
|
public class PromotionElitePopupWindow extends CenterPopupView {
|
||||||
|
public PromotionElitePopupWindow(@NonNull Context context) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected int getImplLayoutId() {
|
||||||
|
return R.layout.promotion_elite_popup;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||||
|
@Override
|
||||||
|
protected void onCreate() {
|
||||||
|
super.onCreate();
|
||||||
|
}
|
||||||
|
}
|
22
common/src/main/res/drawable/background_order_dialog.xml
Normal file
22
common/src/main/res/drawable/background_order_dialog.xml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<bitmap
|
||||||
|
android:gravity="fill_vertical|fill_horizontal"
|
||||||
|
android:src="@drawable/background_order_dialog_out_layout" />
|
||||||
|
</item>
|
||||||
|
<item
|
||||||
|
android:bottom="3dp"
|
||||||
|
android:left="3dp"
|
||||||
|
android:right="4dp"
|
||||||
|
android:top="4dp">
|
||||||
|
<shape>
|
||||||
|
<solid android:color="#F5F5FF" />
|
||||||
|
|
||||||
|
<corners android:radius="10dp" />
|
||||||
|
<stroke
|
||||||
|
android:width="3dp"
|
||||||
|
android:color="#657FE4" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
Binary file not shown.
After Width: | Height: | Size: 873 KiB |
55
common/src/main/res/layout/promotion_elite_popup.xml
Normal file
55
common/src/main/res/layout/promotion_elite_popup.xml
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
<?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="219dp"
|
||||||
|
android:layout_marginStart="22dp"
|
||||||
|
android:layout_marginEnd="22dp"
|
||||||
|
android:background="@drawable/background_order_dialog"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="19dp"
|
||||||
|
android:layout_height="19dp"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_marginTop="14dp"
|
||||||
|
android:layout_marginEnd="14dp"
|
||||||
|
android:src="@mipmap/icon_sud_rule_close" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="18dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/upgrade_elite"
|
||||||
|
android:textColor="#0D21B2"
|
||||||
|
android:textSize="23sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="28dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/upgrade_elite2"
|
||||||
|
android:textColor="#0D21B2"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="30dp">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="116dp"
|
||||||
|
android:layout_height="38dp"
|
||||||
|
android:layout_marginStart="34dp"
|
||||||
|
android:background="@mipmap/button_quintessence" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="116dp"
|
||||||
|
android:layout_height="38dp"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_marginEnd="34dp"
|
||||||
|
android:background="@mipmap/button_enjoy" />
|
||||||
|
</FrameLayout>
|
||||||
|
</LinearLayout>
|
BIN
common/src/main/res/mipmap-xxhdpi/button_enjoy.png
Normal file
BIN
common/src/main/res/mipmap-xxhdpi/button_enjoy.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/button_quintessence.png
Normal file
BIN
common/src/main/res/mipmap-xxhdpi/button_quintessence.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 36 KiB |
@ -1396,4 +1396,6 @@ Limited ride And limited avatar frame</string>
|
|||||||
<string name="conversion_quantity_need_of_use1">1.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_use1">1.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">2.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_use2">2.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">3.Ticket prohibit illegal activities such as offline trading and acquisitions, and PDLIVE will crack down severely on various profit-making trading activities.</string>
|
<string name="conversion_quantity_need_of_use3">3.Ticket prohibit illegal activities such as offline trading and acquisitions, and PDLIVE will crack down severely on various profit-making trading activities.</string>
|
||||||
|
<string name="upgrade_elite">升級精英/尊享戰令</string>
|
||||||
|
<string name="upgrade_elite2">可領取海量積分,兌換更多獎勵</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -9,9 +9,9 @@ ext {
|
|||||||
]
|
]
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
//正式、
|
//正式、
|
||||||
serverHost : "https://napi.yaoulive.com",
|
// serverHost : "https://napi.yaoulive.com",
|
||||||
// 测试
|
// 测试
|
||||||
//serverHost : " https://ceshi.yaoulive.com",
|
serverHost : " https://ceshi.yaoulive.com",
|
||||||
|
|
||||||
//百度语音识别
|
//百度语音识别
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ package com.yunbao.main.views;
|
|||||||
import static android.content.Context.CLIPBOARD_SERVICE;
|
import static android.content.Context.CLIPBOARD_SERVICE;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Dialog;
|
|
||||||
import android.content.ClipData;
|
import android.content.ClipData;
|
||||||
import android.content.ClipboardManager;
|
import android.content.ClipboardManager;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@ -31,23 +30,18 @@ import androidx.annotation.RequiresApi;
|
|||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.lxj.xpopup.XPopup;
|
import com.lxj.xpopup.XPopup;
|
||||||
import com.momo.mcamera.util.JsonUtil;
|
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
import com.yunbao.common.HtmlConfig;
|
import com.yunbao.common.HtmlConfig;
|
||||||
import com.yunbao.common.bean.CoolConfig;
|
|
||||||
import com.yunbao.common.bean.LiveBean;
|
import com.yunbao.common.bean.LiveBean;
|
||||||
import com.yunbao.common.bean.NativeCallbackModel;
|
import com.yunbao.common.dialog.PromotionElitePopupWindow;
|
||||||
import com.yunbao.common.dialog.CinemaTicketPopupWindow;
|
|
||||||
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
import com.yunbao.common.http.LiveHttpUtil;
|
import com.yunbao.common.http.LiveHttpUtil;
|
||||||
import com.yunbao.common.http.live.LiveNetManager;
|
|
||||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||||
import com.yunbao.common.manager.IMLoginManager;
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
import com.yunbao.common.utils.Bus;
|
import com.yunbao.common.utils.Bus;
|
||||||
import com.yunbao.common.utils.DeviceUtils;
|
import com.yunbao.common.utils.DeviceUtils;
|
||||||
import com.yunbao.common.utils.DialogUitl;
|
|
||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.DpUtil;
|
||||||
import com.yunbao.common.utils.JavascriptInterfacePlayLetUtils;
|
import com.yunbao.common.utils.JavascriptInterfacePlayLetUtils;
|
||||||
import com.yunbao.common.utils.JavascriptInterfaceUtils;
|
import com.yunbao.common.utils.JavascriptInterfaceUtils;
|
||||||
@ -58,7 +52,6 @@ import com.yunbao.common.utils.ToastUtil;
|
|||||||
import com.yunbao.live.views.LoadingView;
|
import com.yunbao.live.views.LoadingView;
|
||||||
import com.yunbao.main.R;
|
import com.yunbao.main.R;
|
||||||
import com.yunbao.main.activity.MainActivity;
|
import com.yunbao.main.activity.MainActivity;
|
||||||
import com.yunbao.main.activity.MyWalletActivity;
|
|
||||||
import com.yunbao.main.dialog.EncourageDialog;
|
import com.yunbao.main.dialog.EncourageDialog;
|
||||||
import com.yunbao.main.utils.BottomBarUtil;
|
import com.yunbao.main.utils.BottomBarUtil;
|
||||||
import com.yunbao.share.ui.SharePopDialog;
|
import com.yunbao.share.ui.SharePopDialog;
|
||||||
@ -393,59 +386,65 @@ public class MainHomeCommunityViewHolder extends AbsMainHomeChildViewHolder impl
|
|||||||
.setAnchorAvatar(json.getString("avatar"))
|
.setAnchorAvatar(json.getString("avatar"))
|
||||||
.showDialog();
|
.showDialog();
|
||||||
} else if (TextUtils.equals(event.getMethod(), "postWeakBalance")) {
|
} else if (TextUtils.equals(event.getMethod(), "postWeakBalance")) {
|
||||||
LiveNetManager.get(mContext).
|
new XPopup.Builder(mContext)
|
||||||
getCoolConfig(new com.yunbao.common.http.base.HttpCallback<CoolConfig>() {
|
.enableDrag(false)
|
||||||
@Override
|
.maxWidth(DeviceUtils.getScreenHeight((Activity) mContext) - DpUtil.dp2px(34))
|
||||||
public void onSuccess(CoolConfig data) {
|
.asCustom(new PromotionElitePopupWindow(mContext))
|
||||||
new XPopup.Builder(mContext)
|
.show();
|
||||||
.enableDrag(false)
|
|
||||||
.maxWidth(DeviceUtils.getScreenHeight((Activity) mContext) - DpUtil.dp2px(34))
|
|
||||||
.asCustom(new CinemaTicketPopupWindow(mContext, data.setTicketCount(event.getCoolConfig().getTicketCount()), new CinemaTicketPopupWindow.CinemaTicketPopupWindowCallBack() {
|
|
||||||
@Override
|
|
||||||
public void onCallBack(String data) {
|
|
||||||
if (TextUtils.equals(data, "2")) {
|
|
||||||
DialogUitl.showSimpleDialog(mContext, mContext.getString(com.yunbao.live.R.string.live_coin_not_enough), false,
|
|
||||||
new DialogUitl.SimpleCallback2() {
|
|
||||||
@Override
|
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
|
||||||
mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 1));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
// LiveNetManager.get(mContext).
|
||||||
public void onCancelClick() {
|
// getCoolConfig(new com.yunbao.common.http.base.HttpCallback<CoolConfig>() {
|
||||||
|
// @Override
|
||||||
|
// public void onSuccess(CoolConfig data) {
|
||||||
|
// new XPopup.Builder(mContext)
|
||||||
|
// .enableDrag(false)
|
||||||
|
// .maxWidth(DeviceUtils.getScreenHeight((Activity) mContext) - DpUtil.dp2px(34))
|
||||||
|
// .asCustom(new CinemaTicketPopupWindow(mContext, data.setTicketCount(event.getCoolConfig().getTicketCount()), new CinemaTicketPopupWindow.CinemaTicketPopupWindowCallBack() {
|
||||||
|
// @Override
|
||||||
|
// public void onCallBack(String data) {
|
||||||
|
// if (TextUtils.equals(data, "2")) {
|
||||||
|
// DialogUitl.showSimpleDialog(mContext, mContext.getString(com.yunbao.live.R.string.live_coin_not_enough), false,
|
||||||
|
// new DialogUitl.SimpleCallback2() {
|
||||||
|
// @Override
|
||||||
|
// public void onConfirmClick(Dialog dialog, String content) {
|
||||||
|
// mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 1));
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onCancelClick() {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// } else if (TextUtils.equals(data, "1")) {
|
||||||
|
// mWebView.post(new Runnable() {
|
||||||
|
// @Override
|
||||||
|
// public void run() {
|
||||||
|
//
|
||||||
|
// NativeCallbackModel model = new NativeCallbackModel();
|
||||||
|
// model.setUid(String.valueOf(IMLoginManager.get(mContext).getUserInfo().getId()));
|
||||||
|
// String nativeJson = new JsonUtil().toJson(model);
|
||||||
|
// mWebView.evaluateJavascript("javascript:nativeCallback('" + nativeJson + "')", new ValueCallback<String>() {
|
||||||
|
// @Override
|
||||||
|
// public void onReceiveValue(String value) {
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// })).show();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onError (String error){
|
||||||
|
// ToastUtil.show(error);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
} else if (TextUtils.equals(data, "1")) {
|
|
||||||
mWebView.post(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
|
|
||||||
NativeCallbackModel model = new NativeCallbackModel();
|
|
||||||
model.setUid(String.valueOf(IMLoginManager.get(mContext).getUserInfo().getId()));
|
|
||||||
String nativeJson = new JsonUtil().toJson(model);
|
|
||||||
mWebView.evaluateJavascript("javascript:nativeCallback('" + nativeJson + "')", new ValueCallback<String>() {
|
|
||||||
@Override
|
|
||||||
public void onReceiveValue(String value) {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
})).show();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onError(String error) {
|
|
||||||
ToastUtil.show(error);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user