diff --git a/common/src/main/java/com/yunbao/common/dialog/SkitCheckInWasSuccessfulPopup.java b/common/src/main/java/com/yunbao/common/dialog/SkitCheckInWasSuccessfulPopup.java new file mode 100644 index 000000000..b30192ef9 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/dialog/SkitCheckInWasSuccessfulPopup.java @@ -0,0 +1,32 @@ +package com.yunbao.common.dialog; + +import android.content.Context; + +import androidx.annotation.NonNull; + +import com.lxj.xpopup.core.CenterPopupView; +import com.yunbao.common.R; +import com.yunbao.common.views.weight.ViewClicksAntiShake; + +public class SkitCheckInWasSuccessfulPopup extends CenterPopupView { + public SkitCheckInWasSuccessfulPopup(@NonNull Context context) { + super(context); + } + + @Override + protected int getImplLayoutId() { + return R.layout.skit_check_in_was_successful_popup; + } + + // 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑 + @Override + protected void onCreate() { + super.onCreate(); + ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.icon_slice_368), new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + dismiss(); + } + }); + } +} diff --git a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java index c656fedea..ab4c92838 100644 --- a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java +++ b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java @@ -110,7 +110,8 @@ public interface PDLiveApi { @Field("user_pass") String passWord, @Field("uuid_Device") String uuidDevice, @Field("pushid") String pushid, - @Field("lastlogindevice") String lastlogindevice + @Field("lastlogindevice") String lastlogindevice, + @Field("langue")String langue ); /** diff --git a/common/src/main/java/com/yunbao/common/http/main/MainNetManager.java b/common/src/main/java/com/yunbao/common/http/main/MainNetManager.java index cea6a102a..38731b326 100644 --- a/common/src/main/java/com/yunbao/common/http/main/MainNetManager.java +++ b/common/src/main/java/com/yunbao/common/http/main/MainNetManager.java @@ -13,6 +13,7 @@ import com.yunbao.common.http.API; import com.yunbao.common.http.ResponseData; import com.yunbao.common.http.ResponseModel; import com.yunbao.common.http.base.HttpCallback; +import com.yunbao.common.utils.WordUtil; import java.util.HashMap; import java.util.List; @@ -54,7 +55,7 @@ public class MainNetManager { * @param callback 网络请求回调 */ public void login(String phoneNum, String pwd, String uuid, HttpCallback callback) { - API.get().pdLiveApi(mContext).loginByManager(phoneNum, pwd, uuid, "", "Android") + API.get().pdLiveApi(mContext).loginByManager(phoneNum, pwd, uuid, "", "Android", WordUtil.isNewZh()?"chinese":"english") .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Consumer>() { diff --git a/common/src/main/res/layout/skit_check_in_was_successful_popup.xml b/common/src/main/res/layout/skit_check_in_was_successful_popup.xml new file mode 100644 index 000000000..65ebe1eb3 --- /dev/null +++ b/common/src/main/res/layout/skit_check_in_was_successful_popup.xml @@ -0,0 +1,21 @@ + + + + + + + + \ No newline at end of file diff --git a/common/src/main/res/mipmap-xxhdpi/back_slice_367.png b/common/src/main/res/mipmap-xxhdpi/back_slice_367.png new file mode 100644 index 000000000..f27a67dab Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/back_slice_367.png differ diff --git a/common/src/main/res/mipmap-xxhdpi/icon_slice_368.png b/common/src/main/res/mipmap-xxhdpi/icon_slice_368.png new file mode 100644 index 000000000..a6c0c96a7 Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/icon_slice_368.png differ diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveBuyGuardDialog.java b/live/src/main/java/com/yunbao/live/dialog/LiveBuyGuardDialog.java index c0837b2aa..be3b2fbc1 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveBuyGuardDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveBuyGuardDialog.java @@ -225,20 +225,20 @@ public class LiveBuyGuardDialog extends AbsDialogPopupWindow { MobclickAgent.onEvent(mContext, "star_guardian_people", "星之守护页面观看次数及人数"); bottomPanel.setBackgroundResource(R.drawable.bg_star_guard_bottom_panel); ImgLoader.display(getContext(), R.mipmap.btn_star_guard, btnGuard); - openTheGuard.setText(dataTipModel.isOpen() ? WordUtil.getNewString(R.string.renewal_guardian) + openTheGuard.setText(dataTipModel.isOpen() ? WordUtil.isNewZh()?"續費星之守護":"Renew Star Guardian" : WordUtil.getNewString(R.string.open_the_start_guard)); } else if (position == 1) { MobclickAgent.onEvent(mContext, "king_guardian_people", "王之守护页面观看次数及人数"); bottomPanel.setBackgroundResource(R.drawable.bg_king_guard_bottom_panel); ImgLoader.display(getContext(), R.mipmap.btn_king_guard, btnGuard); - openTheGuard.setText(dataTipModel.isOpen() ? WordUtil.getNewString(R.string.renewal_guardian) + openTheGuard.setText(dataTipModel.isOpen() ? WordUtil.isNewZh()?"續費王之守護":"Renew King Guardian" : WordUtil.getNewString(R.string.open_the_kings_guard)); } else if (position == 2) { MobclickAgent.onEvent(mContext, "god_guardian_people", "神之守护页面观看次数及人数"); bottomPanel.setBackgroundResource(R.drawable.bg_god_guard_bottom_panel); ImgLoader.display(getContext(), R.mipmap.btn_god_guard, btnGuard); - openTheGuard.setText(dataTipModel.isOpen() ? WordUtil.getNewString(R.string.renewal_guardian) + openTheGuard.setText(dataTipModel.isOpen() ? WordUtil.isNewZh()?"續費神之守護":"Renew God Guardian" : WordUtil.getNewString(R.string.open_the_god_guard)); } guardPriceModel = price.get(0); @@ -385,6 +385,7 @@ public class LiveBuyGuardDialog extends AbsDialogPopupWindow { dismiss(); if (dataTipModel.getGuardType() == 3) { new XPopup.Builder(mContext) + .dismissOnTouchOutside(false) // 点击外部是否关闭弹窗,默认为true .asCustom(new DragonSendsMoneyPopup(mContext, mLiveUid)) .show(); } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveGuardDialog.java b/live/src/main/java/com/yunbao/live/dialog/LiveGuardDialog.java index 360c092f5..ecc0a3c8f 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveGuardDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveGuardDialog.java @@ -204,37 +204,37 @@ public class LiveGuardDialog extends AbsDialogPopupWindow { guardianTask.setVisibility(GONE); myGraudGrade.setVisibility(GONE); btnGuardOpen.setText(WordUtil.isNewZh() ? "開通守護" : "Open Guard"); - guard_hint.setText(WordUtil.isNewZh()?"快為您喜歡的主播開通守護吧!":"Turn on the guard for your favorite anchor!"); + guard_hint.setText(WordUtil.isNewZh() ? "快為您喜歡的主播開通守護吧!" : "Turn on the guard for your favorite anchor!"); } else { if (data.getGuardType() == 0) { guardianTask.setVisibility(GONE); myGraudGrade.setVisibility(GONE); btnGuardOpen.setText(WordUtil.isNewZh() ? "開通守護" : "Open Guard"); - guard_hint.setText(WordUtil.isNewZh()?"快為您喜歡的主播開通守護吧!":"Turn on the guard for your favorite anchor!"); + guard_hint.setText(WordUtil.isNewZh() ? "快為您喜歡的主播開通守護吧!" : "Turn on the guard for your favorite anchor!"); } else { guardianTask.setVisibility(VISIBLE); myGraudGrade.setVisibility(VISIBLE); - btnGuardOpen.setText(WordUtil.isNewZh() ? "續費守護" : "Renewal Guard"); + btnGuardOpen.setText(WordUtil.isNewZh() ? "續費守護" : "Renewal"); StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append(WordUtil.isNewZh() ? "您是當前主播的" : "You are the "); switch (data.getGuardType()) { case 1: - stringBuffer.append(WordUtil.isNewZh() ? "星之守護" : "star guardian") - .append(" of the current streamer"); + stringBuffer.append(WordUtil.isNewZh() ? "【星之守護】" : "【star guardian】") + .append(WordUtil.isNewZh() ? " " :" of the current streamer"); guard_hint.setText(stringBuffer.toString()); break; case 2: - stringBuffer.append(WordUtil.isNewZh() ? "王之守護" : "king guardian") - .append(" of the current streamer"); + stringBuffer.append(WordUtil.isNewZh() ? "【王之守護】" : "【king guardian】") + .append(WordUtil.isNewZh() ? " " :" of the current streamer"); guard_hint.setText(stringBuffer.toString()); break; case 3: - stringBuffer.append(WordUtil.isNewZh() ? "神之守護" : "god guardian") - .append(" of the current streamer"); + stringBuffer.append(WordUtil.isNewZh() ? "【神之守護】" : "【god guardian】") + .append(WordUtil.isNewZh() ? " " :" of the current streamer"); guard_hint.setText(stringBuffer.toString()); break; default: - guard_hint.setText(WordUtil.isNewZh()?"快為您喜歡的主播開通守護吧!":"Turn on the guard for your favorite anchor!"); + guard_hint.setText(WordUtil.isNewZh() ? "快為您喜歡的主播開通守護吧!" : "Turn on the guard for your favorite anchor!"); break; } } diff --git a/main/src/main/java/com/yunbao/main/fragment/MainHomeCommunityVideoFragment.java b/main/src/main/java/com/yunbao/main/fragment/MainHomeCommunityVideoFragment.java index 969bf6c31..b475cc779 100644 --- a/main/src/main/java/com/yunbao/main/fragment/MainHomeCommunityVideoFragment.java +++ b/main/src/main/java/com/yunbao/main/fragment/MainHomeCommunityVideoFragment.java @@ -33,6 +33,7 @@ import com.yunbao.common.Constants; import com.yunbao.common.bean.CoolConfig; import com.yunbao.common.bean.NativeCallbackModel; import com.yunbao.common.dialog.CinemaTicketPopupWindow; +import com.yunbao.common.dialog.SkitCheckInWasSuccessfulPopup; import com.yunbao.common.event.JavascriptInterfaceEvent; import com.yunbao.common.fragment.BaseFragment; import com.yunbao.common.http.HttpCallback; @@ -226,6 +227,15 @@ public class MainHomeCommunityVideoFragment extends BaseFragment { System.out.println("code = " + code + ", msg = " + msg + ", info = " + Arrays.toString(info)); if (code == 0) { mWebView.loadUrl(JSONObject.parseObject(info[0]).getString("url")); + String sign_ok = JSONObject.parseObject(info[0]).getString("sign_ok"); + if (TextUtils.equals(sign_ok,"1")){ + new XPopup.Builder(mContext) + .asCustom(new SkitCheckInWasSuccessfulPopup(mContext)) + .show(); + } +// new XPopup.Builder(mContext) +// .asCustom(new SkitCheckInWasSuccessfulPopup(mContext)) +// .show(); } } }); diff --git a/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java b/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java index 0a29ea40c..48ad065a4 100644 --- a/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java +++ b/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java @@ -51,6 +51,7 @@ public class MainHttpUtil { .params("pushid", "") .params("lastlogindevice", "Android") .params("uuid_Device", uuid) + .params("langue", WordUtil.isNewZh()?"chinese":"english") .execute(callback); } diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java index cb1200d20..bf1bde850 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java @@ -8,8 +8,10 @@ import android.widget.HorizontalScrollView; import android.widget.ImageView; import android.widget.TextView; +import com.lxj.xpopup.XPopup; import com.umeng.analytics.MobclickAgent; import com.yunbao.common.activity.AbsActivity; +import com.yunbao.common.dialog.SkitCheckInWasSuccessfulPopup; import com.yunbao.common.event.FloatWarOrderEvent; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.utils.RouteUtil; @@ -59,7 +61,9 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder { // img_trophy.setOnLongClickListener(new View.OnLongClickListener() { // @Override // public boolean onLongClick(View view) { -// +// new XPopup.Builder(mContext) +// .asCustom(new SkitCheckInWasSuccessfulPopup(mContext)) +// .show(); // return true; // } // });