战令规则页面弹窗

This commit is contained in:
18401019693 2023-12-14 10:52:44 +08:00
parent 419b5d08b4
commit 65a3a64d7d
6 changed files with 134 additions and 1 deletions

View File

@ -0,0 +1,24 @@
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 RuleOfWarPopupWindow extends CenterPopupView {
public RuleOfWarPopupWindow(@NonNull Context context) {
super(context);
}
@Override
protected int getImplLayoutId() {
return R.layout.rule_of_war_popup;
}
// 执行初始化操作比如findView设置点击或者任何你弹窗内的业务逻辑
@Override
protected void onCreate() {
super.onCreate();
}
}

View File

@ -0,0 +1,102 @@
<?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="wrap_content"
android:layout_marginStart="17dp"
android:layout_marginEnd="17dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="380dp"
android:background="@drawable/background_order_dialog"
android:orientation="vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="15dp"
android:src="@mipmap/icon_order_rule" />
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="14dp"
android:layout_marginEnd="14dp"
android:text="@string/rule_of_war_hint1"
android:textColor="#0D21B2"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="14dp"
android:layout_marginTop="11dp"
android:layout_marginEnd="14dp"
android:text="@string/rule_of_war_hint2"
android:textColor="#0D21B2"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="14dp"
android:layout_marginTop="11dp"
android:layout_marginEnd="14dp"
android:text="@string/rule_of_war_hint3"
android:textColor="#0D21B2"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="14dp"
android:layout_marginTop="11dp"
android:layout_marginEnd="14dp"
android:text="@string/rule_of_war_hint4"
android:textColor="#0D21B2"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="14dp"
android:layout_marginTop="11dp"
android:layout_marginEnd="14dp"
android:text="@string/rule_of_war_hint5"
android:textColor="#0D21B2"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="14dp"
android:layout_marginTop="11dp"
android:layout_marginEnd="14dp"
android:text="@string/rule_of_war_hint6"
android:textColor="#0D21B2"
android:textSize="14sp" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>
<ImageView
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_gravity="center"
android:layout_marginTop="30dp"
android:src="@mipmap/icon_order_rule_close" />
</LinearLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -1398,4 +1398,10 @@ Limited ride And limited avatar frame</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>
<string name="rule_of_war_hint1">1.戰令開啟時,完成戰令任務,提升戰令等級,可 獲得大量等級獎勵。</string>
<string name="rule_of_war_hint2">2.所有用戶免費解鎖普通版,戰令開啟時隨時可進 階為精英版和尊享版,獲得豐厚額外專屬獎勵。</string>
<string name="rule_of_war_hint3">3.三種戰令都會獎勵積分,可在兌換商城中兌換心 儀的寶貝,部分寶貝兌換有戰令等級要求或兌換數 量限制。</string>
<string name="rule_of_war_hint4">4.每日任務0點刷新未完成任務進度不再累計 每季任務將會在新一季戰令開啟時刷新。</string>
<string name="rule_of_war_hint5">5.任務達成時需主動領取經驗,未领取經驗將會在 任務刷新時自动领取。</string>
<string name="rule_of_war_hint6">6.活動最終解釋權歸PDLIVE所有。</string>
</resources>

View File

@ -35,6 +35,7 @@ import com.yunbao.common.Constants;
import com.yunbao.common.HtmlConfig;
import com.yunbao.common.bean.LiveBean;
import com.yunbao.common.dialog.PromotionElitePopupWindow;
import com.yunbao.common.dialog.RuleOfWarPopupWindow;
import com.yunbao.common.event.JavascriptInterfaceEvent;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.LiveHttpUtil;
@ -389,7 +390,7 @@ public class MainHomeCommunityViewHolder extends AbsMainHomeChildViewHolder impl
new XPopup.Builder(mContext)
.enableDrag(false)
.maxWidth(DeviceUtils.getScreenHeight((Activity) mContext) - DpUtil.dp2px(34))
.asCustom(new PromotionElitePopupWindow(mContext))
.asCustom(new RuleOfWarPopupWindow(mContext))
.show();
// LiveNetManager.get(mContext).