This commit is contained in:
wushaocheng
2022-10-26 10:23:38 +08:00
parent 5d5b0771b8
commit 3c7f0f27bc
5 changed files with 30 additions and 7 deletions

View File

@@ -327,13 +327,13 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
UserInfo userInfo = UserModel.get().getCacheLoginUserInfo(); UserInfo userInfo = UserModel.get().getCacheLoginUserInfo();
if (userInfo != null) { if (userInfo != null) {
handleLinkedJump(this); handleLinkedJump(this);
if (userInfo.isShowLimitCharge() && // if (userInfo.isShowLimitCharge() &&
PmDialogShowMrg.get().isHasShow() && // PmDialogShowMrg.get().isHasShow() &&
DemoCache.readNewUserChargeGift() == 1) { // DemoCache.readNewUserChargeGift() == 1) {
StatisticManager.Instance().onEvent(StatisticsProtocol.EVENT_NUGIFT_POP_SHOW, getString(R.string.enjoy_the_popup_exposure)); // StatisticManager.Instance().onEvent(StatisticsProtocol.EVENT_NUGIFT_POP_SHOW, getString(R.string.enjoy_the_popup_exposure));
NewUserChargeGiftDialog.start(context); // NewUserChargeGiftDialog.start(context);
DemoCache.saveNewUserChargeGift(2); // DemoCache.saveNewUserChargeGift(2);
} // }
// checkShowAnchorCardView(); // checkShowAnchorCardView();
} }
} }

View File

@@ -73,6 +73,8 @@ public class ChargeActivity extends BaseMvpActivity<IChargeView, ChargePresenter
TextView mIvCharge; TextView mIvCharge;
@BindView(R.id.tv_protocol) @BindView(R.id.tv_protocol)
CheckBox mTvProtocol; CheckBox mTvProtocol;
@BindView(R.id.tv_protocol_hint)
TextView mTvProHint;
private ChargeAdapter mChargeAdapter; private ChargeAdapter mChargeAdapter;
private final int BINDCODE_GOLD = 200; private final int BINDCODE_GOLD = 200;
@@ -127,9 +129,11 @@ public class ChargeActivity extends BaseMvpActivity<IChargeView, ChargePresenter
mTvProtocol.setOnCheckedChangeListener((buttonView, isChecked) -> { mTvProtocol.setOnCheckedChangeListener((buttonView, isChecked) -> {
if (isChecked) { if (isChecked) {
mTvProHint.setVisibility(View.GONE);
DemoCache.saveBoolean(NEED_CHECKED_CHARGE_PROTOCOL, true); DemoCache.saveBoolean(NEED_CHECKED_CHARGE_PROTOCOL, true);
} }
}); });
} }
@Override @Override
@@ -290,6 +294,10 @@ public class ChargeActivity extends BaseMvpActivity<IChargeView, ChargePresenter
mChargePosition = position; mChargePosition = position;
}); });
mIvCharge.setOnClickListener(view -> { mIvCharge.setOnClickListener(view -> {
if (!mTvProtocol.isChecked()) {
mTvProHint.setVisibility(View.VISIBLE);
return;
}
if (mChargePosition != -1) { if (mChargePosition != -1) {
ChargeBean bean = mChargeAdapter.getItem(mChargePosition); ChargeBean bean = mChargeAdapter.getItem(mChargePosition);
if (bean != null && bean.getSkuDetails() != null) { if (bean != null && bean.getSkuDetails() != null) {

View File

@@ -111,6 +111,19 @@
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent" /> app:layout_constraintBottom_toBottomOf="parent" />
<TextView
android:id="@+id/tv_protocol_hint"
android:layout_width="180dp"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:layout_gravity="center_horizontal"
android:background="@drawable/bg_login_protocol_hint"
android:gravity="center"
android:paddingBottom="6dp"
android:text="@string/charge_agree_with_the_protocol"
android:textColor="@color/white"
android:textSize="@dimen/sp_10"
android:visibility="gone"/>
<CheckBox <CheckBox
android:id="@+id/tv_protocol" android:id="@+id/tv_protocol"
android:layout_width="wrap_content" android:layout_width="wrap_content"

View File

@@ -21,6 +21,7 @@
<string name="login_google">Google登錄</string> <string name="login_google">Google登錄</string>
<string name="login_select_other_login_type">選擇其他方式登錄</string> <string name="login_select_other_login_type">選擇其他方式登錄</string>
<string name="login_agree_with_the_protocol">同意隱私政策和用戶協議後,才可以註冊登錄哦~</string> <string name="login_agree_with_the_protocol">同意隱私政策和用戶協議後,才可以註冊登錄哦~</string>
<string name="charge_agree_with_the_protocol">請勾選同意《用戶充值協議》</string>
<string name="hint_login_account">手機號</string> <string name="hint_login_account">手機號</string>
<string name="hint_login_account_2">請輸入您的手機號/兔兔ID</string> <string name="hint_login_account_2">請輸入您的手機號/兔兔ID</string>
<string name="hint_login_password">請輸入您的密碼</string> <string name="hint_login_password">請輸入您的密碼</string>

View File

@@ -196,6 +196,7 @@
android:paddingEnd="0dp"> android:paddingEnd="0dp">
<ImageView <ImageView
android:visibility="gone"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"