升級精英/尊享戰令弹窗
This commit is contained in:
parent
b146f93029
commit
419b5d08b4
@ -6,10 +6,10 @@
|
||||
android:src="@drawable/background_order_dialog_out_layout" />
|
||||
</item>
|
||||
<item
|
||||
android:bottom="5dp"
|
||||
android:left="5dp"
|
||||
android:right="5dp"
|
||||
android:top="5dp">
|
||||
android:bottom="3dp"
|
||||
android:left="3dp"
|
||||
android:right="4dp"
|
||||
android:top="4dp">
|
||||
<shape>
|
||||
<solid android:color="#F5F5FF" />
|
||||
|
||||
|
@ -7,4 +7,49 @@
|
||||
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_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="upgrade_elite">升級精英/尊享戰令</string>
|
||||
<string name="upgrade_elite2">可領取海量積分,兌換更多獎勵</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",
|
||||
|
||||
//百度语音识别
|
||||
|
||||
|
@ -3,7 +3,6 @@ package com.yunbao.main.views;
|
||||
import static android.content.Context.CLIPBOARD_SERVICE;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
@ -31,23 +30,18 @@ import androidx.annotation.RequiresApi;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.momo.mcamera.util.JsonUtil;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.HtmlConfig;
|
||||
import com.yunbao.common.bean.CoolConfig;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.bean.NativeCallbackModel;
|
||||
import com.yunbao.common.dialog.CinemaTicketPopupWindow;
|
||||
import com.yunbao.common.dialog.PromotionElitePopupWindow;
|
||||
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DeviceUtils;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.JavascriptInterfacePlayLetUtils;
|
||||
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.main.R;
|
||||
import com.yunbao.main.activity.MainActivity;
|
||||
import com.yunbao.main.activity.MyWalletActivity;
|
||||
import com.yunbao.main.dialog.EncourageDialog;
|
||||
import com.yunbao.main.utils.BottomBarUtil;
|
||||
import com.yunbao.share.ui.SharePopDialog;
|
||||
@ -393,59 +386,65 @@ public class MainHomeCommunityViewHolder extends AbsMainHomeChildViewHolder impl
|
||||
.setAnchorAvatar(json.getString("avatar"))
|
||||
.showDialog();
|
||||
} else if (TextUtils.equals(event.getMethod(), "postWeakBalance")) {
|
||||
LiveNetManager.get(mContext).
|
||||
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));
|
||||
}
|
||||
new XPopup.Builder(mContext)
|
||||
.enableDrag(false)
|
||||
.maxWidth(DeviceUtils.getScreenHeight((Activity) mContext) - DpUtil.dp2px(34))
|
||||
.asCustom(new PromotionElitePopupWindow(mContext))
|
||||
.show();
|
||||
|
||||
@Override
|
||||
public void onCancelClick() {
|
||||
// LiveNetManager.get(mContext).
|
||||
// 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