1、神龙送财金豆确认弹窗增加关闭图标
2、设置弹窗点击外部和返回键不能关闭
This commit is contained in:
parent
4244272d00
commit
81d390f82e
@ -1,6 +1,7 @@
|
|||||||
package com.yunbao.common.dialog;
|
package com.yunbao.common.dialog;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
@ -14,9 +15,10 @@ import com.yunbao.common.utils.WordUtil;
|
|||||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
|
|
||||||
public class DragonRuleConfirmPopup extends CenterPopupView {
|
public class DragonRuleConfirmPopup extends CenterPopupView {
|
||||||
TextView text_1;
|
private TextView text_1;
|
||||||
TextView text_2;
|
private TextView text_2;
|
||||||
TextView text_3;
|
private TextView text_3;
|
||||||
|
private ImageView closed_iv;
|
||||||
private String mLiveUid;
|
private String mLiveUid;
|
||||||
private int mGoldMoney;// 總數
|
private int mGoldMoney;// 總數
|
||||||
private int mMoney;// 輸入的
|
private int mMoney;// 輸入的
|
||||||
@ -44,11 +46,18 @@ public class DragonRuleConfirmPopup extends CenterPopupView {
|
|||||||
text_1 = findViewById(R.id.text_1);
|
text_1 = findViewById(R.id.text_1);
|
||||||
text_2 = findViewById(R.id.text_2);
|
text_2 = findViewById(R.id.text_2);
|
||||||
text_3 = findViewById(R.id.text_3);
|
text_3 = findViewById(R.id.text_3);
|
||||||
|
closed_iv = findViewById(R.id.closed_iv);
|
||||||
|
|
||||||
text_1.setText(String.format(WordUtil.getString(R.string.dialog_jin_dou_1), mMoney));
|
text_1.setText(String.format(WordUtil.getString(R.string.dialog_jin_dou_1), mMoney));
|
||||||
text_2.setText(String.format(WordUtil.getString(R.string.dialog_jin_dou_2), (mMoney/10)));
|
text_2.setText(String.format(WordUtil.getString(R.string.dialog_jin_dou_2), (mMoney/10)));
|
||||||
text_3.setText(String.format(WordUtil.getString(R.string.dialog_jin_dou_3), mGoldMoney-mMoney));
|
text_3.setText(String.format(WordUtil.getString(R.string.dialog_jin_dou_3), mGoldMoney-mMoney));
|
||||||
|
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(closed_iv, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
dismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.btn_confirm), new ViewClicksAntiShake.ViewClicksCallBack() {
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.btn_confirm), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -15,6 +15,16 @@
|
|||||||
android:scaleType="fitXY"
|
android:scaleType="fitXY"
|
||||||
android:src="@mipmap/background_dragon_rule" />
|
android:src="@mipmap/background_dragon_rule" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="26dp"
|
||||||
|
android:layout_height="26dp"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginEnd="5dp"
|
||||||
|
android:id="@+id/closed_iv"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:src="@mipmap/icon_dalog_closed" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
BIN
common/src/main/res/mipmap-xxxhdpi/icon_dalog_closed.webp
Normal file
BIN
common/src/main/res/mipmap-xxxhdpi/icon_dalog_closed.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
@ -71,6 +71,8 @@ public class DragonSendsMoneyPopup extends CenterPopupView {
|
|||||||
if (money >= 1000) {
|
if (money >= 1000) {
|
||||||
// 显示确认弹窗
|
// 显示确认弹窗
|
||||||
new XPopup.Builder(getContext())
|
new XPopup.Builder(getContext())
|
||||||
|
.dismissOnTouchOutside(false)
|
||||||
|
.dismissOnBackPressed(false)
|
||||||
.asCustom(new DragonRuleConfirmPopup(getContext(),goldMoney,money,mLiveUid))
|
.asCustom(new DragonRuleConfirmPopup(getContext(),goldMoney,money,mLiveUid))
|
||||||
.show();
|
.show();
|
||||||
dismiss();
|
dismiss();
|
||||||
|
Loading…
Reference in New Issue
Block a user