守護等級的檢查接口,領取接口。相關頁面的請求添加。h5方法新鄭
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
|
||||
public class GuardUpgradePopup extends CenterPopupView {
|
||||
FragmentActivity activity;
|
||||
String mLiveUid;
|
||||
|
||||
public GuardUpgradePopup(@NonNull Context context, String liveUid) {
|
||||
super(context);
|
||||
activity = (FragmentActivity) context;
|
||||
mLiveUid = liveUid;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.guard_upgrade_popup;
|
||||
}
|
||||
|
||||
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.confirm), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -28,11 +28,13 @@ import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.stx.xhb.androidx.XBanner;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yunbao.common.adapter.LiveBuyGuardPrivilegeAdapter;
|
||||
import com.yunbao.common.bean.CheckUpgradesModel;
|
||||
import com.yunbao.common.bean.GuardDataTipModel;
|
||||
import com.yunbao.common.bean.GuardGetGuardOpenInfoModel;
|
||||
import com.yunbao.common.bean.GuardPriceModel;
|
||||
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||
import com.yunbao.common.dialog.GuardBuyTipsDialog;
|
||||
import com.yunbao.common.dialog.GuardUpgradePopup;
|
||||
import com.yunbao.common.dialog.LiveBuyGuardSelectPopup;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
@@ -126,15 +128,15 @@ public class LiveBuyGuardDialog extends AbsDialogPopupWindow {
|
||||
if (guardDataTipModel.getGuardType() == 1) {
|
||||
guardBannerModel.setGradientColors(gradientColorsStart)
|
||||
.setGuardOpen(R.mipmap.icon_bg_star_guard_open)
|
||||
.setGuardImage(WordUtil.isNewZh()?R.mipmap.bg_star_guard:R.mipmap.bg_star_guard_en);
|
||||
.setGuardImage(WordUtil.isNewZh() ? R.mipmap.bg_star_guard : R.mipmap.bg_star_guard_en);
|
||||
} else if (guardDataTipModel.getGuardType() == 2) {
|
||||
guardBannerModel.setGuardOpen(R.mipmap.icon_bg_king_guard_open)
|
||||
.setGradientColors(gradientColorsKing)
|
||||
.setGuardImage(WordUtil.isNewZh()?R.mipmap.bg_king_guard:R.mipmap.bg_king_guard_en);
|
||||
.setGuardImage(WordUtil.isNewZh() ? R.mipmap.bg_king_guard : R.mipmap.bg_king_guard_en);
|
||||
} else {
|
||||
guardBannerModel.setGuardOpen(R.mipmap.icon_god_guard_open)
|
||||
.setGradientColors(gradientColorsGod)
|
||||
.setGuardImage(WordUtil.isNewZh()?R.mipmap.bg_god_guard:R.mipmap.bg_god_guard_en);
|
||||
.setGuardImage(WordUtil.isNewZh() ? R.mipmap.bg_god_guard : R.mipmap.bg_god_guard_en);
|
||||
}
|
||||
buyGuardBannerModels.add(guardBannerModel);
|
||||
}
|
||||
@@ -342,6 +344,21 @@ public class LiveBuyGuardDialog extends AbsDialogPopupWindow {
|
||||
// .show();
|
||||
}
|
||||
});
|
||||
LiveNetManager.get(getContext())
|
||||
.checkUpgrades(mLiveUid, new com.yunbao.common.http.base.HttpCallback<CheckUpgradesModel>() {
|
||||
@Override
|
||||
public void onSuccess(CheckUpgradesModel data) {
|
||||
if (!TextUtils.isEmpty(data.getLevel()))
|
||||
new XPopup.Builder(mContext)
|
||||
.asCustom(new GuardUpgradePopup(mContext, mLiveUid, data))
|
||||
.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
@@ -16,9 +17,11 @@ import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yunbao.common.adapter.RefreshAdapter;
|
||||
import com.yunbao.common.bean.CheckUpgradesModel;
|
||||
import com.yunbao.common.bean.GuardGetGuardUserInfoModel;
|
||||
import com.yunbao.common.custom.CommonRefreshView;
|
||||
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||
import com.yunbao.common.dialog.GuardUpgradePopup;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
@@ -186,6 +189,21 @@ public class LiveGuardDialog extends AbsDialogPopupWindow {
|
||||
btnGuardOpen.setText(WordUtil.isNewZh() ? "開通守護" : "Open Guard");
|
||||
}
|
||||
});
|
||||
LiveNetManager.get(getContext())
|
||||
.checkUpgrades(mLiveUid, new com.yunbao.common.http.base.HttpCallback<CheckUpgradesModel>() {
|
||||
@Override
|
||||
public void onSuccess(CheckUpgradesModel data) {
|
||||
if (!TextUtils.isEmpty(data.getLevel()))
|
||||
new XPopup.Builder(mContext)
|
||||
.asCustom(new GuardUpgradePopup(mContext, mLiveUid, data))
|
||||
.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setAdapterData() {
|
||||
|
||||
@@ -1,148 +0,0 @@
|
||||
<?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"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.flyjingfish.gradienttextviewlib.GradientTextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:letterSpacing="0.1"
|
||||
android:text="@string/congratulations_on_the_promotion"
|
||||
android:textSize="30sp"
|
||||
android:textStyle="bold"
|
||||
app:gradient_angle="45"
|
||||
app:gradient_endColor="@color/white"
|
||||
app:gradient_startColor="@color/white"
|
||||
app:gradient_stroke_endColor="#F86A01"
|
||||
app:gradient_stroke_startColor="#F9CB22"
|
||||
app:gradient_stroke_strokeWidth="5dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/guard_level_has_been_reached"
|
||||
android:textColor="#FFE0BF"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="258dp"
|
||||
android:layout_height="174dp"
|
||||
android:layout_marginTop="52dp"
|
||||
android:src="@mipmap/background_guard_upgrade" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="13dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/tequan_1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:gravity="center"
|
||||
android:text="獎勵名稱"
|
||||
android:textColor="#FF8503"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/tequan_1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:gravity="center"
|
||||
android:text="獎勵名稱"
|
||||
android:textColor="#FF8503"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="13dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/tequan_1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:gravity="center"
|
||||
android:text="獎勵名稱"
|
||||
android:textColor="#FF8503"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginStart="13dp"
|
||||
android:layout_marginEnd="13dp"
|
||||
android:layout_marginBottom="38dp">
|
||||
|
||||
<Button
|
||||
android:layout_width="94dp"
|
||||
android:layout_height="36dp"
|
||||
android:background="@drawable/button_guard_upgrade"
|
||||
android:text="@string/view_grade"
|
||||
android:textColor="#893D0D"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/confirm"
|
||||
android:layout_width="94dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_gravity="end"
|
||||
android:background="@drawable/button_guard_upgrade"
|
||||
android:text="@string/confirm"
|
||||
android:textColor="#893D0D"
|
||||
android:textSize="14sp" />
|
||||
</FrameLayout>
|
||||
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
Reference in New Issue
Block a user