移除一些了没有使用了的页面

This commit is contained in:
huangjian
2021-07-22 14:26:37 +08:00
parent ce4a1f6c0c
commit 197874a2f4
29 changed files with 30 additions and 3422 deletions

View File

@@ -621,10 +621,7 @@
android:name=".audio.AudioRecordActivity"
android:label="录音"
android:screenOrientation="portrait" />
<activity
android:name=".ui.widget.RedPacketDialog"
android:screenOrientation="portrait"
android:theme="@style/dialogactivity" />
<activity
android:name=".ui.pay.ChargeActivity"
android:label="充值"
@@ -641,10 +638,6 @@
android:name=".home.activity.HomeMoreRoomActivity"
android:label="房间"
android:screenOrientation="portrait" />
<activity
android:name=".ui.wallet.WalletActivity"
android:label="我的钱包"
android:screenOrientation="portrait" />
<activity
android:name=".ui.wallet.ExchangeGoldActivity"
android:label="兑换钻石"
@@ -676,9 +669,6 @@
<activity
android:name=".ui.user.AboutActivity"
android:screenOrientation="portrait" />
<activity
android:name=".ui.login.BinderPhoneActivity"
android:screenOrientation="portrait" />
<activity
android:name=".ui.user.ShowPhotoActivity"
android:screenOrientation="portrait" />
@@ -706,9 +696,6 @@
<activity
android:name=".bills.activities.RedBagBillsActivity"
android:screenOrientation="portrait" />
<activity
android:name=".ui.wallet.RedPacketWithdrawActivity"
android:screenOrientation="portrait" />
<activity
android:name=".bills.activities.BillGiftExpendActivity"
android:label="礼物支出"
@@ -905,18 +892,6 @@
android:name=".ui.user.decorationsend.DecorationSendActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name=".ui.wallet.WalletGoldActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name=".ui.wallet.JewelActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name=".ui.wallet.RedBagActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name=".avroom.activity.RoomRankListActivity"
android:screenOrientation="portrait" />

View File

@@ -105,7 +105,6 @@ import com.yizhuan.erban.ui.widget.LevelUpDialog;
import com.yizhuan.erban.ui.widget.LivingIconView;
import com.yizhuan.erban.ui.widget.MainTabLayout;
import com.yizhuan.erban.ui.widget.RecallDialog;
import com.yizhuan.erban.ui.widget.RedPacketDialog;
import com.yizhuan.erban.utils.CleanLeakUtils;
import com.yizhuan.erban.utils.PushMessageHandler;
import com.yizhuan.xchat_android_core.Constants;
@@ -708,14 +707,6 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
mMainTabLayout.setMsgNum(unreadCount);
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onReceiveNewPacket(final RedPacketInfoV2 redPacketInfo) {
CommonPref.instance(this).putBoolean("redPacketPoint", true);
if (redPacketInfo.isNeedAlert()) {
RedPacketDialog.start(this, redPacketInfo);
}
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onReceiveLevelUpActivity(LevelUpEvent event) {
LevelUpDialog.start(this, event.getLevelName(), true);

View File

@@ -6,6 +6,7 @@ import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.provider.Settings;
import androidx.fragment.app.Fragment;
import com.yizhuan.erban.audio.AudioRecordActivity;
@@ -17,7 +18,6 @@ import com.yizhuan.erban.ui.setting.SettingActivity;
import com.yizhuan.erban.ui.user.UserInfoActivity;
import com.yizhuan.erban.ui.user.UserInfoModifyActivity;
import com.yizhuan.erban.ui.user.UserModifyPhotosActivity;
import com.yizhuan.erban.ui.wallet.JewelActivity;
import com.yizhuan.erban.ui.webview.CommonWebViewActivity;
import com.yizhuan.xchat_android_core.UriProvider;
import com.yizhuan.xchat_android_core.statistic.StatisticManager;
@@ -92,13 +92,6 @@ public class UIHelper {
mActivity.startActivityForResult(intent, requestCode);
}
//我的钱包
public static void showWalletAct(Context mContext) {
Intent intent = new Intent(mContext, JewelActivity.class);
//intent.putExtra("userInfo",userInfo);
mContext.startActivity(intent);
}
//侧边栏===>帮助
public static void showUsinghelp(Context mContext) {
CommonWebViewActivity.start(mContext, UriProvider.getHelp());

View File

@@ -2,20 +2,19 @@ package com.yizhuan.erban.avroom.redpackage
import android.annotation.SuppressLint
import android.content.Intent
import android.graphics.Paint
import android.text.Editable
import android.text.TextWatcher
import android.view.KeyEvent
import android.view.LayoutInflater
import android.view.View
import android.view.WindowManager
import com.jungly.gridpasswordview.GridPasswordView
import com.yizhuan.erban.R
import com.yizhuan.erban.base.BaseDialog
import com.yizhuan.erban.common.widget.dialog.DialogManager
import com.yizhuan.erban.databinding.DialogRedPackageSendBinding
import com.yizhuan.erban.pay.password.GiveGoldPassWordFragment
import com.yizhuan.erban.ui.login.BinderPhoneActivity
import com.yizhuan.erban.ui.login.BindPhoneActivity
import com.yizhuan.erban.ui.pay.ChargeActivity
import com.yizhuan.erban.ui.setting.ModifyPwdActivity
import com.yizhuan.erban.ui.webview.DialogWebViewActivity
@@ -31,6 +30,7 @@ import com.yizhuan.xchat_android_core.statistic.StatisticManager
import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol
import com.yizhuan.xchat_android_core.user.UserModel
import com.yizhuan.xchat_android_core.utils.toIntOrDef
import com.yizhuan.xchat_android_library.annatation.ActLayoutRes
import com.yizhuan.xchat_android_library.utils.CommonUtils
import com.yizhuan.xchat_android_library.utils.SingleToastUtil
import com.yizhuan.xchat_android_library.utils.codec.DESUtils
@@ -38,6 +38,7 @@ import org.greenrobot.eventbus.EventBus
import org.greenrobot.eventbus.Subscribe
import org.greenrobot.eventbus.ThreadMode
@ActLayoutRes(R.layout.dialog_red_package_send)
class RedPackageSendDialog : BaseDialog<DialogRedPackageSendBinding>(), GridPasswordView.OnPasswordChangedListener, TextWatcher {
private var passWordFragment: GiveGoldPassWordFragment? = null
@@ -126,7 +127,7 @@ class RedPackageSendDialog : BaseDialog<DialogRedPackageSendBinding>(), GridPass
binding.ivSend.setOnClickListener {
UserModel.get().cacheLoginUserInfo?.let {
if (!it.isBindPhone) {
startActivity(Intent(context, BinderPhoneActivity::class.java))
BindPhoneActivity.start(context)
return@setOnClickListener
} else if (!it.isBindPaymentPwd) {
ModifyPwdActivity.start(context, ModifyPwdActivity.PAY_PWD)

View File

@@ -296,11 +296,6 @@ public class MeFragment extends BaseMvpFragment<IMainFragmentView, MainFragmentP
case R.id.me_item_radish:
startActivity(new Intent(mContext, ChargeActivity.class));
break;
case R.id.me_item_wallet:
UIHelper.showWalletAct(mContext);
break;
case R.id.me_item_level:
CommonWebViewActivity.start(mContext, UriProvider.getUserLevelUrl());
break;

View File

@@ -25,27 +25,24 @@ import com.yizhuan.erban.public_chat_hall.activity.PublicChatHallHomeActivity;
import com.yizhuan.erban.radish.signin.SignInActivity;
import com.yizhuan.erban.radish.task.activity.TaskCenterActivity;
import com.yizhuan.erban.team.view.NimTeamMessageActivity;
import com.yizhuan.erban.ui.login.BinderPhoneActivity;
import com.yizhuan.erban.ui.login.BindPhoneActivity;
import com.yizhuan.erban.ui.login.ShowBindPhoneActivity;
import com.yizhuan.erban.ui.patriarch.help.LimitEnterRoomHelper;
import com.yizhuan.erban.ui.pay.ChargeActivity;
import com.yizhuan.erban.ui.setting.FeedbackActivity;
import com.yizhuan.erban.ui.setting.ModifyPwdActivity;
import com.yizhuan.erban.ui.user.UserInfoActivity;
import com.yizhuan.erban.ui.wallet.WalletActivity;
import com.yizhuan.erban.ui.wallet.WalletGoldActivity;
import com.yizhuan.erban.ui.webview.CommonWebViewActivity;
import com.yizhuan.erban.ui.withdraw.BinderAlipayActivity;
import com.yizhuan.tutu.mentoring_relationship.activity.MentoringRelationshipActivity;
import com.yizhuan.xchat_android_core.DemoCache;
import com.yizhuan.xchat_android_core.community.event.SquareTaskEvent;
import com.yizhuan.xchat_android_core.auth.AuthModel;
import com.yizhuan.xchat_android_core.community.event.SquareTaskEvent;
import com.yizhuan.xchat_android_core.im.custom.bean.RouterType;
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager;
import com.yizhuan.xchat_android_core.module_hall.hall.HallModel;
import com.yizhuan.xchat_android_core.module_hall.hall.bean.HallInfo;
import com.yizhuan.xchat_android_core.patriarch.exception.PmRoomLimitException;
import com.yizhuan.xchat_android_core.room.bean.RoomInfo;
import com.yizhuan.xchat_android_core.room.model.AvRoomModel;
import com.yizhuan.xchat_android_core.statistic.StatisticManager;
import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol;
@@ -53,7 +50,6 @@ import com.yizhuan.xchat_android_core.user.UserModel;
import com.yizhuan.xchat_android_core.utils.net.BeanObserver;
import com.yizhuan.xchat_android_core.utils.net.RxHelper;
import com.yizhuan.xchat_android_core.withdraw.WithdrawModel;
import com.yizhuan.xchat_android_library.net.rxnet.callback.CallBack;
import com.yizhuan.xchat_android_library.utils.JavaUtil;
import com.yizhuan.xchat_android_library.utils.SingleToastUtil;
@@ -61,7 +57,6 @@ import org.greenrobot.eventbus.EventBus;
import io.reactivex.SingleObserver;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
/**
* Created by MadisonRong on 08/06/2018.
@@ -88,12 +83,6 @@ public class RouterHandler {
case RouterType.H5:
CommonWebViewActivity.start(context, routerValue);
break;
case RouterType.WALLET:
context.startActivity(new Intent(context, WalletGoldActivity.class));
break;
case RouterType.RED:
WalletActivity.start(context, 2);
break;
case RouterType.RECHARGE:
ChargeActivity.start(context);
break;
@@ -145,7 +134,7 @@ public class RouterHandler {
intent.putExtras(mBundle);
context.startActivity(intent);
} else {
context.startActivity(new Intent(context, BinderPhoneActivity.class));
BindPhoneActivity.start(context);
}
}
});
@@ -167,7 +156,7 @@ public class RouterHandler {
@Override
public void onError(Throwable e) {
context.startActivity(new Intent(context, BinderPhoneActivity.class));
BindPhoneActivity.start(context);
}
});
break;
@@ -176,7 +165,7 @@ public class RouterHandler {
if (UserModel.get().getCacheLoginUserInfo().isBindPhone()) {
ModifyPwdActivity.start(context, ModifyPwdActivity.PAY_PWD);
} else {
context.startActivity(new Intent(context, BinderPhoneActivity.class));
BindPhoneActivity.start(context);
}
break;
//推荐卡仓库

View File

@@ -1,219 +0,0 @@
package com.yizhuan.erban.ui.login;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import com.trello.rxlifecycle3.android.ActivityEvent;
import com.yizhuan.erban.R;
import com.yizhuan.erban.base.BaseActivity;
import com.yizhuan.xchat_android_core.auth.AuthModel;
import com.yizhuan.xchat_android_core.code.CodeModel;
import com.yizhuan.xchat_android_core.code.CodeType;
import com.yizhuan.xchat_android_core.statistic.StatisticManager;
import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol;
import com.yizhuan.xchat_android_core.user.bean.UserInfo;
import com.yizhuan.xchat_android_library.utils.SingleToastUtil;
import com.yizhuan.xchat_android_library.utils.TextWatcherWrapper;
import java.text.NumberFormat;
import io.reactivex.SingleObserver;
import io.reactivex.disposables.Disposable;
/*
* copy绑定支付宝页面控件ID没有改变 详情请看布局
*/
public class BinderPhoneActivity extends BaseActivity implements View.OnClickListener,
BindSuccessDialog.BindSuccessDialogListener {
/**
* ture的话表示能返回登录
*/
public static final String KEY_BACK_LOGIN = "key_back_login";
private EditText etAlipayAccount;
private EditText etSmsCode;
private Button btnGetCode;
private Button btnBinderRquest;
private CodeDownTimer timer;
private TextView tvSkip;
public static void start(Context context, boolean backLogin) {
Intent intent = new Intent(context, BinderPhoneActivity.class);
intent.putExtra(KEY_BACK_LOGIN, backLogin);
context.startActivity(intent);
}
public static void start(Context context) {
start(context, false);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_binder_phone);
initWhiteTitleBar("绑定手机");
initView();
initData();
setListener();
}
@Override
protected void onDestroy() {
super.onDestroy();
stopCountDownTimer();
}
private void initView() {
etAlipayAccount = findViewById(R.id.et_phone);
etSmsCode = findViewById(R.id.et_smscode);
btnGetCode = findViewById(R.id.btn_get_code);
btnBinderRquest = findViewById(R.id.btn_binder_request);
tvSkip = findViewById(R.id.tv_skip);
}
private void initData() {
//设置是否显示跳过按钮
tvSkip.setVisibility(View.GONE);
}
private void setListener() {
btnBinderRquest.setEnabled(false);
//获取绑定手机验证码
btnGetCode.setOnClickListener(this);
//请求绑定手机号码
btnBinderRquest.setOnClickListener(this);
//输入框监听改变
TextWatcher textWatcher = new TextWatcherWrapper() {
@Override
public void afterTextChanged(Editable s) {
if (etAlipayAccount.getText() != null && etAlipayAccount.getText().length() > 0
&& etSmsCode.getText() != null && etSmsCode.getText().length() > 0) {
btnBinderRquest.setEnabled(true);
} else {
btnBinderRquest.setEnabled(false);
}
}
};
etAlipayAccount.addTextChangedListener(textWatcher);
etSmsCode.addTextChangedListener(textWatcher);
tvSkip.setOnClickListener(this);
}
private void bindPhone() {
getDialogManager().showProgressDialog(BinderPhoneActivity.this, "正在绑定请稍后...");
AuthModel.get().bindPhone(
etAlipayAccount.getText().toString(),
etSmsCode.getText().toString()
)
.compose(bindUntilEvent(ActivityEvent.DESTROY))
.subscribe(new SingleObserver<UserInfo>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onSuccess(UserInfo s) {
getDialogManager().dismissDialog();
toast("绑定手机号成功");
finish();
}
@Override
public void onError(Throwable e) {
getDialogManager().dismissDialog();
toast(e.getMessage());
}
});
}
private void getCode() {
String phoneNumber = etAlipayAccount.getText().toString().trim();
Number parse = null;
try {
parse = NumberFormat.getIntegerInstance().parse(phoneNumber);
} catch (Exception e) {
Log.e("bind phone", e.getMessage(), e);
}
if (parse == null || parse.intValue() == 0 || phoneNumber.length() != 11) {
// Toast.makeText(BasicConfig.INSTANCE.getAppContext(), "请输入正确的手机号码", Toast.LENGTH_SHORT).show();
SingleToastUtil.showToastShort("请输入正确的手机号码");
return;
}
startCountDownTimer();
CodeModel.get().sendCode(phoneNumber, CodeType.BIND_PHONE)
.compose(bindToLifecycle())
.subscribe(new SingleObserver<String>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onSuccess(String s) {
toast(s);
}
@Override
public void onError(Throwable e) {
toast(e.getMessage());
}
});
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.btn_get_code:
getCode();
break;
case R.id.btn_binder_request:
bindPhone();
break;
case R.id.tv_skip:
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.LOGIN_BINDING_PHONE_SKIP, "绑定手机-跳过");
finish();
break;
default:
break;
}
}
@Override
public void close() {
setResult(RESULT_OK);
finish();
}
private void startCountDownTimer() {
stopCountDownTimer();
timer = new CodeDownTimer(btnGetCode, 60000, 1000);
timer.start();
}
private void stopCountDownTimer() {
if (timer != null) {
timer.cancel();
timer = null;
}
}
}

View File

@@ -22,7 +22,7 @@ import com.yizhuan.erban.base.BaseActivity;
import com.yizhuan.erban.common.widget.dialog.DialogManager;
import com.yizhuan.erban.databinding.ActivitySettingBinding;
import com.yizhuan.erban.ui.im.avtivity.BlackListManageActivity;
import com.yizhuan.erban.ui.login.BinderPhoneActivity;
import com.yizhuan.erban.ui.login.BindPhoneActivity;
import com.yizhuan.erban.ui.login.ShowBindPhoneActivity;
import com.yizhuan.erban.ui.login.helper.LogoutHelper;
import com.yizhuan.erban.ui.user.AboutActivity;
@@ -36,6 +36,7 @@ import com.yizhuan.xchat_android_core.user.bean.UserInfo;
import com.yizhuan.xchat_android_core.utils.SharedPreferenceUtils;
import com.yizhuan.xchat_android_core.withdraw.WithdrawModel;
import com.yizhuan.xchat_android_core.withdraw.bean.WithdrawInfo;
import com.yizhuan.xchat_android_library.utils.SingleToastUtil;
import com.yizhuan.xchat_android_library.utils.config.BasicConfig;
import com.yizhuan.xchat_android_library.utils.file.JXFileUtils;
@@ -144,7 +145,7 @@ public class SettingActivity extends BaseActivity implements View.OnClickListene
@Override
public void onError(Throwable e) {
getDialogManager().dismissDialog();
startActivity(new Intent(SettingActivity.this, BinderPhoneActivity.class));
SingleToastUtil.showToast(e.getMessage());
}
});
break;
@@ -160,7 +161,7 @@ public class SettingActivity extends BaseActivity implements View.OnClickListene
intent.putExtras(mBundle);
startActivity(intent);
} else {
startActivity(new Intent(this, BinderPhoneActivity.class));
BindPhoneActivity.start(context);
}
break;
case R.id.rly_contact_us:
@@ -193,7 +194,7 @@ public class SettingActivity extends BaseActivity implements View.OnClickListene
if (UserModel.get().getCacheLoginUserInfo().isBindPhone()) {
ModifyPwdActivity.start(this, ModifyPwdActivity.PAY_PWD);
} else {
startActivity(new Intent(this, BinderPhoneActivity.class));
BindPhoneActivity.start(context);
}
break;
case R.id.btn_login_out://退出登录

View File

@@ -1,243 +0,0 @@
package com.yizhuan.erban.ui.wallet;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.netease.nim.uikit.StatusBarUtil;
import com.trello.rxlifecycle3.android.ActivityEvent;
import com.trello.rxlifecycle3.android.FragmentEvent;
import com.yizhuan.erban.R;
import com.yizhuan.erban.base.BaseActivity;
import com.yizhuan.erban.base.TitleBar;
import com.yizhuan.erban.bills.activities.BillGiftExpendActivity;
import com.yizhuan.erban.bills.activities.BillGiftInComeActivity;
import com.yizhuan.erban.bills.activities.BillGiftIncomeGroupActivity;
import com.yizhuan.erban.bills.activities.ChargeBillsActivity;
import com.yizhuan.erban.ui.login.BinderPhoneActivity;
import com.yizhuan.erban.ui.setting.ModifyPwdActivity;
import com.yizhuan.erban.ui.withdraw.WithdrawActivity;
import com.yizhuan.xchat_android_core.auth.AuthModel;
import com.yizhuan.xchat_android_core.pay.PayModel;
import com.yizhuan.xchat_android_core.pay.bean.WalletInfo;
import com.yizhuan.xchat_android_core.pay.event.GetWalletInfoEvent;
import com.yizhuan.xchat_android_core.pay.event.UpdateWalletInfoEvent;
import com.yizhuan.xchat_android_core.statistic.StatisticManager;
import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol;
import com.yizhuan.xchat_android_core.user.UserModel;
import com.yizhuan.xchat_android_core.withdraw.bean.ExchangerInfo;
import com.yizhuan.xchat_android_core.withdraw.event.ExchangeInfoEvent;
import com.yizhuan.xchat_android_library.utils.FormatUtils;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import io.reactivex.SingleObserver;
import io.reactivex.disposables.Disposable;
public class JewelActivity extends BaseActivity {
TextView tvDiamondNum;
LinearLayout llGiftIncome;
LinearLayout llGiftRecord;
// TextView tvGiftExpend;
TextView tvJewelExchange;
TextView tvJewelTiXian;
boolean isRequest;
private final int BINDCODE = 100;
private final int BINDCODE_GOLD = 200;
private boolean isBindPhone;
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_jewel);
EventBus.getDefault().register(this);
initTitleBar("礼物收入");
initViews();
initData();
}
@Override
public void onDestroy() {
super.onDestroy();
EventBus.getDefault().unregister(this);
}
@Override
protected boolean needSteepStateBar() {
return true;
}
@Override
protected void setStatusBar() {
super.setStatusBar();
StatusBarUtil.transparencyBar(this);
StatusBarUtil.StatusBarLightMode(this);
}
@Override
public void initTitleBar(String title) {
mTitleBar = findViewById(R.id.title_bar);
if (mTitleBar != null) {
mTitleBar.setTitle(title);
mTitleBar.setImmersive(true);
mTitleBar.setTitleColor(getResources().getColor(R.color.color_333333));
mTitleBar.setLeftImageResource(R.drawable.arrow_left);
mTitleBar.setBackgroundColor(getResources().getColor(R.color.transparent));
mTitleBar.setLeftClickListener(v -> finish());
}
}
private void initViews(){
tvDiamondNum = findViewById(R.id.tv_diamon_num);
llGiftIncome = findViewById(R.id.ll_gift_income);
llGiftRecord = findViewById(R.id.ll_gift_record);
// tvGiftExpend = findViewById(R.id.tv_gift_expend);
tvJewelExchange = findViewById(R.id.tv_jewel_exchange);
tvJewelTiXian = findViewById(R.id.tv_jewel_tixian);
llGiftIncome.setOnClickListener(v -> {
// startActivity(new Intent(JewelActivity.this, BillGiftInComeActivity.class));
// startActivity(new Intent(JewelActivity.this, BillGiftIncomeGroupActivity.class));
BillGiftIncomeGroupActivity.startActivity(JewelActivity.this, BillGiftIncomeGroupActivity.TYPE_BILL_INCOME);
});
llGiftRecord.setOnClickListener(v -> {
BillGiftIncomeGroupActivity.startActivity(JewelActivity.this, BillGiftIncomeGroupActivity.TYPE_BILL_OUTPUT);
});
// tvGiftExpend.setOnClickListener(v -> {
//// startActivity(new Intent(JewelActivity.this, BillGiftExpendActivity.class));
// BillGiftIncomeGroupActivity.startActivity(JewelActivity.this, BillGiftIncomeGroupActivity.TYPE_BILL_OUTPUT);
// });
tvJewelExchange.setOnClickListener(v -> {
if (UserModel.get().getCacheLoginUserInfo() == null) {
return;
}
if (UserModel.get().getCacheLoginUserInfo().isBindPhone() && UserModel.get().getCacheLoginUserInfo().isBindPaymentPwd()){
startActivity(new Intent(JewelActivity.this, ExchangeGoldActivity.class));
}else {
if (UserModel.get().getCacheLoginUserInfo().isBindPhone() || isBindPhone){
ModifyPwdActivity.start(JewelActivity.this,ModifyPwdActivity.FOGERT_PAY_PWD);
}else {
startActivityForResult(new Intent(JewelActivity.this, BinderPhoneActivity.class),BINDCODE_GOLD);
}
}
StatisticManager.Instance().onEvent(context,
StatisticsProtocol.Event.EVENT_EXCHANGE_CLICK,
"我的礼物/我的钻石 兑换钻石",
null);
});
tvJewelTiXian.setOnClickListener(v -> {
isRequest = true;
AuthModel.get().isBindPhone()
.compose(bindUntilEvent(ActivityEvent.DESTROY))
.subscribe(new SingleObserver<String>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onSuccess(String s) {
onIsPhone();
}
@Override
public void onError(Throwable e) {
onIsphoneFail(e.getMessage());
}
});
tvJewelTiXian.setClickable(false);
StatisticManager.Instance().onEvent(context,
StatisticsProtocol.Event.EVENT_ACCOUNT_WITHDRAW_CLICK,
"提现按钮",
null);
});
}
public void onIsPhone() {
if (UserModel.get().getCacheLoginUserInfo() == null) {
return;
}
tvJewelTiXian.setClickable(true);
if (!isRequest) {
return;
}
isRequest = false;
if (UserModel.get().getCacheLoginUserInfo().isBindPhone() && UserModel.get().getCacheLoginUserInfo().isBindPaymentPwd()) {
startActivity(new Intent(this, WithdrawActivity.class));
}else {
ModifyPwdActivity.start(this, ModifyPwdActivity.FOGERT_PAY_PWD);
}
// startActivity(new Intent(getContext(), WithdrawActivity.class));
}
public void onIsphoneFail(String error) {
tvJewelTiXian.setClickable(true);
if (!isRequest) {
return;
}
isRequest = false;
startActivityForResult(new Intent(this, BinderPhoneActivity.class), BINDCODE);
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == BINDCODE && resultCode== Activity.RESULT_OK){
startActivity(new Intent(this, WithdrawActivity.class));
}else if (requestCode == BINDCODE_GOLD && resultCode== Activity.RESULT_OK){
isBindPhone=true;
ModifyPwdActivity.start(this,ModifyPwdActivity.FOGERT_PAY_PWD);
}
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onRequestExchange(ExchangeInfoEvent event) {
ExchangerInfo exchangerInfo = event.getData();
if (exchangerInfo != null) {
setDiamondNum(exchangerInfo.diamondNum);
}
}
@SuppressLint("CheckResult")
public void initData() {
WalletInfo walletInfo = PayModel.get().getCurrentWalletInfo();
if (walletInfo != null) {
setDiamondNum(walletInfo.diamonds);
}
PayModel.get().getWalletInfo(AuthModel.get().getCurrentUid())
.subscribe(info -> {
if (info != null) {
setDiamondNum(info.diamonds);
}
});
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onGetWalletInfo(GetWalletInfoEvent event) {
WalletInfo walletInfo = PayModel.get().getCurrentWalletInfo();
if (walletInfo != null) {
setDiamondNum(walletInfo.diamonds);
}
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onWalletInfoUpdate(UpdateWalletInfoEvent event) {
WalletInfo walletInfo = PayModel.get().getCurrentWalletInfo();
if (walletInfo != null)
setDiamondNum(walletInfo.diamonds);
}
private void setDiamondNum(double diamondNum) {
tvDiamondNum.setText(FormatUtils.formatBigDecimal(diamondNum));
}
}

View File

@@ -1,186 +0,0 @@
package com.yizhuan.erban.ui.wallet;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.Nullable;
import android.widget.Button;
import android.widget.TextView;
import com.trello.rxlifecycle3.android.FragmentEvent;
import com.yizhuan.erban.R;
import com.yizhuan.erban.base.BaseFragment;
import com.yizhuan.erban.ui.login.BinderPhoneActivity;
import com.yizhuan.erban.ui.setting.ModifyPwdActivity;
import com.yizhuan.erban.ui.withdraw.WithdrawActivity;
import com.yizhuan.xchat_android_core.auth.AuthModel;
import com.yizhuan.xchat_android_core.pay.PayModel;
import com.yizhuan.xchat_android_core.pay.bean.WalletInfo;
import com.yizhuan.xchat_android_core.pay.event.GetWalletInfoEvent;
import com.yizhuan.xchat_android_core.pay.event.UpdateWalletInfoEvent;
import com.yizhuan.xchat_android_core.user.UserModel;
import com.yizhuan.xchat_android_core.withdraw.bean.ExchangerInfo;
import com.yizhuan.xchat_android_core.withdraw.event.ExchangeInfoEvent;
import com.yizhuan.xchat_android_library.utils.FormatUtils;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import io.reactivex.SingleObserver;
import io.reactivex.disposables.Disposable;
/**
* 我的钱包--钻石界面
*
* @author Administrator
* @date 2017/7/3
*/
public class JewelFragment extends BaseFragment {
TextView tvDiamondNum;
Button mButton;
Button mExchangeButton;
boolean isRequest;
private final int BINDCODE = 100;
private final int BINDCODE_GOLD=200;
private boolean isBindPhone;
@Override
public int getRootLayoutId() {
return R.layout.wallet_fragment_jewel;
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EventBus.getDefault().register(this);
}
@Override
public void onDestroy() {
super.onDestroy();
EventBus.getDefault().unregister(this);
}
@Override
public void onFindViews() {
tvDiamondNum = (TextView) mView.findViewById(R.id.tv_diamondNum);
mButton = (Button) mView.findViewById(R.id.wallet_jewel_tixian);
mExchangeButton = (Button) mView.findViewById(R.id.wallet_jewel_exchange);
}
@Override
public void onSetListener() {
mButton.setOnClickListener(v -> {
isRequest = true;
AuthModel.get().isBindPhone()
.compose(bindUntilEvent(FragmentEvent.DESTROY))
.subscribe(new SingleObserver<String>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onSuccess(String s) {
onIsPhone();
}
@Override
public void onError(Throwable e) {
onIsphoneFail(e.getMessage());
}
});
mButton.setClickable(false);
});
mExchangeButton.setOnClickListener(v -> {
if (UserModel.get().getCacheLoginUserInfo().isBindPhone() && UserModel.get().getCacheLoginUserInfo().isBindPaymentPwd()){
startActivity(new Intent(getActivity(), ExchangeGoldActivity.class));
}else {
if (UserModel.get().getCacheLoginUserInfo().isBindPhone() || isBindPhone){
ModifyPwdActivity.start(getActivity(),ModifyPwdActivity.FOGERT_PAY_PWD);
}else {
startActivityForResult(new Intent(getActivity(), BinderPhoneActivity.class),BINDCODE_GOLD);
}
}
// ExchangeGoldActivity.start(getContext());
});
}
public void onIsPhone() {
mButton.setClickable(true);
if (!isRequest) {
return;
}
isRequest = false;
if (UserModel.get().getCacheLoginUserInfo().isBindPhone() && UserModel.get().getCacheLoginUserInfo().isBindPaymentPwd()) {
startActivity(new Intent(getActivity(), WithdrawActivity.class));
}else {
ModifyPwdActivity.start(getActivity(),ModifyPwdActivity.FOGERT_PAY_PWD);
}
// startActivity(new Intent(getContext(), WithdrawActivity.class));
}
public void onIsphoneFail(String error) {
mButton.setClickable(true);
if (!isRequest) {
return;
}
isRequest = false;
startActivityForResult(new Intent(getContext(), BinderPhoneActivity.class), BINDCODE);
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == BINDCODE && resultCode== Activity.RESULT_OK){
startActivity(new Intent(getActivity(), WithdrawActivity.class));
}else if (requestCode == BINDCODE_GOLD && resultCode== Activity.RESULT_OK){
isBindPhone=true;
ModifyPwdActivity.start(getActivity(),ModifyPwdActivity.FOGERT_PAY_PWD);
}
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onRequestExchange(ExchangeInfoEvent event) {
ExchangerInfo exchangerInfo = event.getData();
if (exchangerInfo != null) {
setDiamondNum(exchangerInfo.diamondNum);
}
}
@SuppressLint("CheckResult")
@Override
public void initiate() {
WalletInfo walletInfo = PayModel.get().getCurrentWalletInfo();
if (walletInfo != null) {
setDiamondNum(walletInfo.diamonds);
}
PayModel.get().getWalletInfo(AuthModel.get().getCurrentUid())
.subscribe(info -> {
if (info != null) {
setDiamondNum(info.diamonds);
}
});
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onGetWalletInfo(GetWalletInfoEvent event) {
WalletInfo walletInfo = PayModel.get().getCurrentWalletInfo();
if (walletInfo != null) {
setDiamondNum(walletInfo.diamonds);
}
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onWalletInfoUpdate(UpdateWalletInfoEvent event) {
WalletInfo walletInfo = PayModel.get().getCurrentWalletInfo();
if (walletInfo != null)
setDiamondNum(walletInfo.diamonds);
}
private void setDiamondNum(double diamondNum) {
tvDiamondNum.setText(FormatUtils.formatBigDecimal(diamondNum));
}
}

View File

@@ -1,272 +0,0 @@
package com.yizhuan.erban.ui.wallet;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.netease.nim.uikit.StatusBarUtil;
import com.trello.rxlifecycle3.android.ActivityEvent;
import com.trello.rxlifecycle3.android.FragmentEvent;
import com.yizhuan.erban.R;
import com.yizhuan.erban.base.BaseActivity;
import com.yizhuan.erban.base.TitleBar;
import com.yizhuan.erban.bills.activities.RedBagBillsActivity;
import com.yizhuan.erban.bills.activities.TotalBillsActivity;
import com.yizhuan.erban.ui.login.BinderPhoneActivity;
import com.yizhuan.erban.ui.setting.ModifyPwdActivity;
import com.yizhuan.erban.ui.webview.CommonWebViewActivity;
import com.yizhuan.erban.ui.widget.marqueeview.MarqueeView;
import com.yizhuan.xchat_android_core.UriProvider;
import com.yizhuan.xchat_android_core.auth.AuthModel;
import com.yizhuan.xchat_android_core.redPacket.RedPacketModel;
import com.yizhuan.xchat_android_core.redPacket.bean.RedDrawListInfo;
import com.yizhuan.xchat_android_core.redPacket.bean.RedPacketInfo;
import com.yizhuan.xchat_android_core.redPacket.event.GetRedInfoEvent;
import com.yizhuan.xchat_android_core.user.UserModel;
import com.yizhuan.xchat_android_core.utils.net.BeanObserver;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import java.util.ArrayList;
import java.util.List;
import io.reactivex.SingleObserver;
import io.reactivex.disposables.Disposable;
public class RedBagActivity extends BaseActivity implements View.OnClickListener {
private MarqueeView marqueeView;
private TextView redMoeny;
private TextView sharePeoples;
private TextView shareBonus;
private TextView redRank;
private TextView redRule;
private TextView redMethod;
private LinearLayout llSharePeople;
private LinearLayout llShareBonus;
private TextView tvWithdraw;
private boolean isRequest;
private RedPacketInfo redPacketInfo;
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_red_bag);
EventBus.getDefault().register(this);
initTitleBar("我的红包奖励");
initViews();
initData();
}
@Override
public void onDestroy() {
super.onDestroy();
EventBus.getDefault().unregister(this);
}
@Override
protected boolean needSteepStateBar() {
return true;
}
@Override
protected void setStatusBar() {
super.setStatusBar();
StatusBarUtil.transparencyBar(this);
StatusBarUtil.StatusBarLightMode(this);
}
@Override
public void initTitleBar(String title) {
mTitleBar = findViewById(R.id.title_bar);
if (mTitleBar != null) {
mTitleBar.setTitle(title);
mTitleBar.setImmersive(true);
mTitleBar.setTitleColor(getResources().getColor(R.color.white));
mTitleBar.setLeftImageResource(R.drawable.arrow_left_white);
mTitleBar.setBackgroundColor(getResources().getColor(R.color.transparent));
mTitleBar.setLeftClickListener(v -> finish());
}
mTitleBar.setActionTextColor(getResources().getColor(R.color.white));
mTitleBar.addAction(new TitleBar.TextAction("红包纪录") {
@Override
public void performAction(View view) {
startActivity(new Intent(RedBagActivity.this, RedBagBillsActivity.class));
}
});
}
private void initViews(){
marqueeView = findViewById(R.id.marqueeView);
redMoeny = findViewById(R.id.tv_red_money);
sharePeoples = findViewById(R.id.tv_share_count);
shareBonus = findViewById(R.id.tv_share);
redRank = findViewById(R.id.tv_red_rank);
redRule = findViewById(R.id.tv_red_rule);
redMethod = findViewById(R.id.tv_red_method);
llSharePeople = findViewById(R.id.ll_people);
llShareBonus = findViewById(R.id.ll_share_bonus);
tvWithdraw = findViewById(R.id.tv_withdraw);
redRank.setOnClickListener(this);
redRule.setOnClickListener(this);
redMethod.setOnClickListener(this);
llSharePeople.setOnClickListener(this);
llShareBonus.setOnClickListener(this);
tvWithdraw.setOnClickListener(this);
}
private void initData(){
loadData();
}
private void loadData() {
RedPacketModel.get().getRedPacketInfo().subscribe();
RedPacketModel.get().getRedDrawList().subscribe(new BeanObserver<List<RedDrawListInfo>>() {
@Override
public void onErrorMsg(String error) {
showDefaultData();
}
@Override
public void onSuccess(List<RedDrawListInfo> redDrawListInfos) {
onGetRedDrawList(redDrawListInfos);
}
});
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onGetRedInfo(GetRedInfoEvent event) {
if (event.isFailed()) {
toast(event.getError());
return;
}
redPacketInfo = event.getData();
if (redPacketInfo != null) {
redMoeny.setText(String.valueOf(redPacketInfo.getPacketNum()));
sharePeoples.setText(String.valueOf(redPacketInfo.getRegisterCout() + ""));
shareBonus.setText(String.valueOf(redPacketInfo.getChargeBonus() + ""));
}
}
private void onGetRedDrawList(List<RedDrawListInfo> redDrawListInfos) {
if (redDrawListInfos != null && redDrawListInfos.size() > 0) {
List<String> info = new ArrayList<>();
for (int i=0; i<redDrawListInfos.size(); i++) {
String content = redDrawListInfos.get(i).getNick() + "刚刚提现了" + redDrawListInfos.get(i).getPacketNum();
info.add(content);
}
marqueeView.startWithList(info);
} else {
showDefaultData();
}
}
private void showDefaultData() {
List<String> info = new ArrayList<>();
info.add("article一分钟前提现了200");
info.add("木马一分钟前提现了200");
info.add("此乳胸险一分钟前提现了100");
info.add("xiaoshihou一分钟前提现了100");
info.add("夜袭寡妇一分钟前提现了200");
info.add("玮哥一分钟前提现了200");
info.add("xiaoSeSe一分钟前提现了400");
info.add("一生懵逼一分钟前提现了600");
info.add("小可爱一分钟前提现了100");
info.add("ai人一分钟前提现了200");
info.add("大叔一分钟前提现了400");
info.add("小凳子一分钟前提现了800");
info.add("小逍遥一分钟前提现了300");
info.add("清新一分钟前提现了100");
info.add("荔枝一分钟前提现了200");
info.add("小明哥哥一分钟前提现了100");
info.add("薇薇一分钟前提现了300");
info.add("红高粱一分钟前提现了400");
marqueeView.startWithList(info);
}
@Override
public void onClick(View v) {
String url = null;
switch (v.getId()) {
case R.id.tv_red_rank:
url = UriProvider.IM_SERVER_URL + "/yinyou/modules/bonus/rankList.html" + "?uid=" + AuthModel.get().getCurrentUid();
break;
case R.id.tv_red_rule:
url = UriProvider.IM_SERVER_URL + "/yinyou/modules/bonus/fight.html" + "?uid=" + AuthModel.get().getCurrentUid();
break;
case R.id.tv_red_method:
url = UriProvider.IM_SERVER_URL + "/yinyou/modules/bonus/secret.html" + "?uid=" + AuthModel.get().getCurrentUid();
break;
case R.id.ll_people:
url = UriProvider.IM_SERVER_URL + "/yinyou/modules/bonus/invitation.html" + "?uid=" + AuthModel.get().getCurrentUid();
break;
case R.id.ll_share_bonus:
url = UriProvider.IM_SERVER_URL + "/yinyou/modules/bonus/revenue.html" + "?uid=" + AuthModel.get().getCurrentUid();
break;
case R.id.tv_withdraw:
// if (redPacketInfo == null || redPacketInfo.getPacketNum() < 100) {
// toast("红包金额满100才可提现");
// } else {
isRequest = true;
AuthModel.get().isBindPhone()
.compose(bindUntilEvent(ActivityEvent.DESTROY))
.subscribe(new SingleObserver<String>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onSuccess(String s) {
onIsPhone();
}
@Override
public void onError(Throwable e) {
onIsphoneFail(e.getMessage());
}
});
// }
break;
}
if (!TextUtils.isEmpty(url))
openWebView(url);
}
private void openWebView(String url) {
if (TextUtils.isEmpty(url)) return;
Intent intent = new Intent(this, CommonWebViewActivity.class);
intent.putExtra("url", url);
startActivity(intent);
}
public void onIsPhone() {
if (!isRequest) {
return;
}
isRequest = false;
if (UserModel.get().getCacheLoginUserInfo().isBindPaymentPwd()){
startActivity(new Intent(this, RedPacketWithdrawActivity.class));
}else {
ModifyPwdActivity.start(this,ModifyPwdActivity.FOGERT_PAY_PWD);
}
}
public void onIsphoneFail(String error) {
if (!isRequest) {
return;
}
isRequest = false;
startActivity(new Intent(this, BinderPhoneActivity.class));
}
}

View File

@@ -1,247 +0,0 @@
package com.yizhuan.erban.ui.wallet;
import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.Nullable;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.trello.rxlifecycle3.android.FragmentEvent;
import com.yizhuan.erban.R;
import com.yizhuan.erban.base.BaseFragment;
import com.yizhuan.erban.ui.login.BinderPhoneActivity;
import com.yizhuan.erban.ui.setting.ModifyPwdActivity;
import com.yizhuan.erban.ui.webview.CommonWebViewActivity;
import com.yizhuan.erban.ui.widget.marqueeview.MarqueeView;
import com.yizhuan.xchat_android_core.UriProvider;
import com.yizhuan.xchat_android_core.auth.AuthModel;
import com.yizhuan.xchat_android_core.redPacket.RedPacketModel;
import com.yizhuan.xchat_android_core.redPacket.bean.RedDrawListInfo;
import com.yizhuan.xchat_android_core.redPacket.bean.RedPacketInfo;
import com.yizhuan.xchat_android_core.redPacket.event.GetRedInfoEvent;
import com.yizhuan.xchat_android_core.user.UserModel;
import com.yizhuan.xchat_android_core.utils.net.BeanObserver;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import java.util.ArrayList;
import java.util.List;
import io.reactivex.SingleObserver;
import io.reactivex.disposables.Disposable;
/**
* 我的钱包---红包
* Created by ${Seven} on 2017/9/18.
*/
public class RedBagFragment extends BaseFragment implements View.OnClickListener {
private MarqueeView marqueeView;
private TextView redMoeny;
private TextView sharePeoples;
private TextView shareBonus;
private RelativeLayout redRank;
private RelativeLayout redRule;
private RelativeLayout redMethod;
private RelativeLayout rlySharePeople;
private RelativeLayout rlyShareBonus;
private ImageView unWithdraw;
private ImageView withdraw;
private boolean isRequest;
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EventBus.getDefault().register(this);
}
@Override
public void onDestroy() {
super.onDestroy();
EventBus.getDefault().unregister(this);
}
@Override
public void onFindViews() {
marqueeView = (MarqueeView) mView.findViewById(R.id.marqueeView);
redMoeny = (TextView) mView.findViewById(R.id.tv_red_money);
sharePeoples = (TextView) mView.findViewById(R.id.tv_share_count);
shareBonus = (TextView) mView.findViewById(R.id.tv_share);
redRank = (RelativeLayout) mView.findViewById(R.id.rly_red_rank);
redRule = (RelativeLayout) mView.findViewById(R.id.rly_red_rule);
redMethod = (RelativeLayout) mView.findViewById(R.id.rly_red_method);
rlySharePeople = (RelativeLayout) mView.findViewById(R.id.rly_people);
rlyShareBonus = (RelativeLayout) mView.findViewById(R.id.rly_share_bonus);
unWithdraw = (ImageView) mView.findViewById(R.id.img_un_withdraw);
withdraw = (ImageView) mView.findViewById(R.id.img_withdraw);
}
@Override
public void onSetListener() {
redRank.setOnClickListener(this);
redRule.setOnClickListener(this);
redMethod.setOnClickListener(this);
rlySharePeople.setOnClickListener(this);
rlyShareBonus.setOnClickListener(this);
withdraw.setOnClickListener(this);
}
@Override
public void initiate() {
loadData();
}
private void loadData() {
RedPacketModel.get().getRedPacketInfo().subscribe();
RedPacketModel.get().getRedDrawList().subscribe(new BeanObserver<List<RedDrawListInfo>>() {
@Override
public void onErrorMsg(String error) {
showDefaultData();
}
@Override
public void onSuccess(List<RedDrawListInfo> redDrawListInfos) {
onGetRedDrawList(redDrawListInfos);
}
});
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onGetRedInfo(GetRedInfoEvent event) {
if (event.isFailed()) {
toast(event.getError());
return;
}
RedPacketInfo redPacketInfo = event.getData();
if (redPacketInfo != null) {
if (redPacketInfo.getPacketNum() >= 100) {
unWithdraw.setVisibility(View.GONE);
withdraw.setVisibility(View.VISIBLE);
}
redMoeny.setText(String.valueOf(redPacketInfo.getPacketNum()));
sharePeoples.setText(String.valueOf(redPacketInfo.getRegisterCout()));
shareBonus.setText(String.valueOf(redPacketInfo.getChargeBonus()));
}
}
private void onGetRedDrawList(List<RedDrawListInfo> redDrawListInfos) {
if (redDrawListInfos != null && redDrawListInfos.size() > 0) {
List<String> info = new ArrayList<>();
for (int i=0; i<redDrawListInfos.size(); i++) {
String content = redDrawListInfos.get(i).getNick() + "刚刚提现了" + redDrawListInfos.get(i).getPacketNum();
info.add(content);
}
marqueeView.startWithList(info);
} else {
showDefaultData();
}
}
private void showDefaultData() {
List<String> info = new ArrayList<>();
info.add("article一分钟前提现了200");
info.add("木马一分钟前提现了200");
info.add("此乳胸险一分钟前提现了100");
info.add("xiaoshihou一分钟前提现了100");
info.add("夜袭寡妇一分钟前提现了200");
info.add("玮哥一分钟前提现了200");
info.add("xiaoSeSe一分钟前提现了400");
info.add("一生懵逼一分钟前提现了600");
info.add("小可爱一分钟前提现了100");
info.add("ai人一分钟前提现了200");
info.add("大叔一分钟前提现了400");
info.add("小凳子一分钟前提现了800");
info.add("小逍遥一分钟前提现了300");
info.add("清新一分钟前提现了100");
info.add("荔枝一分钟前提现了200");
info.add("小明哥哥一分钟前提现了100");
info.add("薇薇一分钟前提现了300");
info.add("红高粱一分钟前提现了400");
marqueeView.startWithList(info);
}
@Override
public int getRootLayoutId() {
return R.layout.wallet_fragment_redbag;
}
@Override
public void onClick(View v) {
String url = null;
switch (v.getId()) {
case R.id.rly_red_rank:
url = UriProvider.IM_SERVER_URL + "/yinyou/modules/bonus/rankList.html" + "?uid=" + AuthModel.get().getCurrentUid();
break;
case R.id.rly_red_rule:
url = UriProvider.IM_SERVER_URL + "/yinyou/modules/bonus/fight.html" + "?uid=" + AuthModel.get().getCurrentUid();
break;
case R.id.rly_red_method:
url = UriProvider.IM_SERVER_URL + "/yinyou/modules/bonus/secret.html" + "?uid=" + AuthModel.get().getCurrentUid();
break;
case R.id.rly_people:
url = UriProvider.IM_SERVER_URL + "/yinyou/modules/bonus/invitation.html" + "?uid=" + AuthModel.get().getCurrentUid();
break;
case R.id.rly_share_bonus:
url = UriProvider.IM_SERVER_URL + "/yinyou/modules/bonus/revenue.html" + "?uid=" + AuthModel.get().getCurrentUid();
break;
case R.id.img_withdraw:
isRequest = true;
AuthModel.get().isBindPhone()
.compose(bindUntilEvent(FragmentEvent.DESTROY))
.subscribe(new SingleObserver<String>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onSuccess(String s) {
onIsPhone();
}
@Override
public void onError(Throwable e) {
onIsphoneFail(e.getMessage());
}
});
break;
}
if (!TextUtils.isEmpty(url))
openWebView(url);
}
private void openWebView(String url) {
if (TextUtils.isEmpty(url)) return;
Intent intent = new Intent(getContext(), CommonWebViewActivity.class);
intent.putExtra("url", url);
startActivity(intent);
}
public void onIsPhone() {
if (!isRequest) {
return;
}
isRequest = false;
if (UserModel.get().getCacheLoginUserInfo().isBindPaymentPwd()){
startActivity(new Intent(getActivity(), RedPacketWithdrawActivity.class));
}else {
ModifyPwdActivity.start(getActivity(),ModifyPwdActivity.FOGERT_PAY_PWD);
}
}
public void onIsphoneFail(String error) {
if (!isRequest) {
return;
}
isRequest = false;
startActivity(new Intent(getContext(), BinderPhoneActivity.class));
}
}

View File

@@ -1,320 +0,0 @@
package com.yizhuan.erban.ui.wallet;
import android.content.Intent;
import android.os.Bundle;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.yizhuan.erban.R;
import com.yizhuan.erban.base.BaseActivity;
import com.yizhuan.erban.common.widget.dialog.DialogManager;
import com.yizhuan.erban.ui.wallet.adapter.WithdrawRedListAdapter;
import com.yizhuan.erban.ui.widget.password.PassWordFragment;
import com.yizhuan.erban.ui.withdraw.BinderAlipayActivity;
import com.yizhuan.xchat_android_core.auth.AuthModel;
import com.yizhuan.xchat_android_core.initial.bean.TaxInfo;
import com.yizhuan.xchat_android_core.redPacket.RedPacketModel;
import com.yizhuan.xchat_android_core.redPacket.bean.RedPacketInfo;
import com.yizhuan.xchat_android_core.redPacket.bean.WithdrawRedListInfo;
import com.yizhuan.xchat_android_core.redPacket.bean.WithdrawRedSucceedInfo;
import com.yizhuan.xchat_android_core.redPacket.event.GetRedInfoEvent;
import com.yizhuan.xchat_android_core.utils.net.BeanObserver;
import com.yizhuan.xchat_android_core.withdraw.WithdrawModel;
import com.yizhuan.xchat_android_core.withdraw.bean.RefreshInfo;
import com.yizhuan.xchat_android_core.withdraw.bean.WithdrawInfo;
import com.yizhuan.xchat_android_library.utils.ListUtils;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import java.util.List;
import io.reactivex.SingleObserver;
import io.reactivex.disposables.Disposable;
/**
* 红包提现
*/
public class RedPacketWithdrawActivity extends BaseActivity implements View.OnClickListener {
private TextView redNum;
private RelativeLayout binder;
private RelativeLayout binderSucceed;
private TextView zxcAccount;
private TextView alipayName;
private RecyclerView recyclerView;
private Button btnWithdraw;
private Button unBtnWithdraw;
private WithdrawInfo mWithdrawInfo;
private WithdrawRedListAdapter mRedListAdapter;
private WithdrawRedListInfo mSelectRedInfo;
private TextView tvTip;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_red_packet_withdraw);
EventBus.getDefault().register(this);
initTitleBar(getString(R.string.red_packet_withdraw));
initView();
initData();
setListener();
}
private void initView() {
redNum = (TextView) findViewById(R.id.tv_red_num);
binder = (RelativeLayout) findViewById(R.id.rly_binder);
binderSucceed = (RelativeLayout) findViewById(R.id.rly_binder_succeed);
zxcAccount = (TextView) findViewById(R.id.tv_user_zhifubao);
alipayName = (TextView) findViewById(R.id.tv_user_zhifubao_name);
recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
btnWithdraw = (Button) findViewById(R.id.btn_withdraw);
unBtnWithdraw = (Button) findViewById(R.id.btn_withdraw_un);
tvTip = (TextView) findViewById(R.id.tv_tip);
}
private void initData() {
recyclerView.setLayoutManager(new GridLayoutManager(this, 3));
mRedListAdapter = new WithdrawRedListAdapter();
recyclerView.setAdapter(mRedListAdapter);
mRedListAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter baseQuickAdapter, View view, int position) {
List<WithdrawRedListInfo> list = mRedListAdapter.getData();
if (ListUtils.isListEmpty(list)) return;
mSelectRedInfo = list.get(position);
int size = list.size();
for (int i = 0; i < size; i++) {
list.get(i).isSelected = position == i;
}
mRedListAdapter.notifyDataSetChanged();
redPackWithdraw();
}
});
loadAlipayInfo();
loadingData();
loadingListData();
//显示提示
TaxInfo texInfo = WithdrawModel.get().getTaxInfo();
if (null != texInfo){
tvTip.setVisibility(View.VISIBLE);
tvTip.setText(texInfo.getTips());
}else {
tvTip.setVisibility(View.GONE);
}
}
private void loadAlipayInfo() {
WithdrawModel.get().getWithdrawUserInfo(
AuthModel.get().getCurrentUid()
)
.subscribe(new SingleObserver<WithdrawInfo>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onSuccess(WithdrawInfo withdrawInfo) {
onGetWithdrawUserInfo(withdrawInfo);
}
@Override
public void onError(Throwable e) {
}
});
}
public void onGetWithdrawUserInfo(WithdrawInfo withdrawInfo) {
if (withdrawInfo != null) {
mWithdrawInfo = withdrawInfo;
if (TextUtils.isEmpty(withdrawInfo.zxcAccount) || withdrawInfo.zxcAccount.equals("null")) {
binder.setVisibility(View.VISIBLE);
binderSucceed.setVisibility(View.GONE);
} else {
binder.setVisibility(View.GONE);
binderSucceed.setVisibility(View.VISIBLE);
zxcAccount.setText(withdrawInfo.zxcAccount);
alipayName.setText(withdrawInfo.zxcAccountName);
}
}
}
private void loadingListData() {
RedPacketModel.get().getRedList().subscribe(new BeanObserver<List<WithdrawRedListInfo>>() {
@Override
public void onErrorMsg(String error) {
toast(error);
}
@Override
public void onSuccess(List<WithdrawRedListInfo> withdrawRedListInfos) {
onGetRedList(withdrawRedListInfos);
}
});
}
private void onGetRedList(List<WithdrawRedListInfo> withdrawRedListInfos) {
if (!withdrawRedListInfos.isEmpty()) {
mRedListAdapter.setNewData(withdrawRedListInfos);
}
}
private void loadingData() {
RedPacketModel.get().getRedPacketInfo().subscribe();
}
private RedPacketInfo redPacketInfos;
@Subscribe(threadMode = ThreadMode.MAIN)
public void onGetRedInfo(GetRedInfoEvent event) {
if (event.isFailed()) {
toast(event.getError());
return;
}
RedPacketInfo redPacketInfo = event.getData();
if (null != redPacketInfo) {
redPacketInfos = redPacketInfo;
redNum.setText(String.valueOf(redPacketInfo.getPacketNum()));
}
}
private void setListener() {
binder.setOnClickListener(this);
binderSucceed.setOnClickListener(this);
}
private Intent intent;
private Bundle mBundle;
@Override
public void onClick(View v) {
switch (v.getId()) {
//未绑定支付宝时可点---绑定支付宝账号
case R.id.rly_binder:
intent = new Intent(getApplicationContext(), BinderAlipayActivity.class);
mBundle = new Bundle();
mBundle.putSerializable("withdrawInfo", mWithdrawInfo);
intent.putExtras(mBundle);
startActivity(intent);
break;
//绑定成功支付宝后可点---更改支付宝账号
case R.id.rly_binder_succeed:
intent = new Intent(getApplicationContext(), BinderAlipayActivity.class);
mBundle = new Bundle();
mBundle.putSerializable("withdrawInfo", mWithdrawInfo);
intent.putExtras(mBundle);
startActivity(intent);
break;
}
}
//eventbus监听绑定支付宝页面是否绑定成功然后刷新红包提现页面
@Subscribe(threadMode = ThreadMode.MAIN)
public void refreshEvent(RefreshInfo refreshInfo) {
loadAlipayInfo();
}
@Override
protected void onDestroy() {
super.onDestroy();
EventBus.getDefault().unregister(this);
}
private void redPackWithdraw() {
if (mSelectRedInfo == null) {
toast("兑换失败");
return;
}
if (isWithdraw()) {
btnWithdraw.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//有账号才能提现
if (!isAlipayValid()) {
toast(R.string.bind_your_alipay);
return;
}
//发起兑换
getDialogManager().showOkCancelDialog(
getString(R.string.withdraw_dialog_notice,
mSelectRedInfo.getPacketNum(), mSelectRedInfo.getPacketNum()),
true, new DialogManager.OkCancelDialogListener() {
@Override
public void onCancel() {
getDialogManager().dismissDialog();
}
@Override
public void onOk() {
getDialogManager().dismissDialog();
PassWordFragment.newInstace(0).show(getSupportFragmentManager());
}
});
}
});
}
}
public void commit(String pwd) {
RedPacketModel.get().getRedWithdraw(
AuthModel.get().getCurrentUid(),
mSelectRedInfo.getPacketId(), DESAndBase64(pwd))
.subscribe(new BeanObserver<WithdrawRedSucceedInfo>() {
@Override
public void onErrorMsg(String error) {
toast(error);
}
@Override
public void onSuccess(WithdrawRedSucceedInfo info) {
onGetWithdraw(info);
}
});
}
public boolean isWithdraw() {
if (!(mWithdrawInfo != null && mWithdrawInfo.isNotBoundPhone)) {
if (mSelectRedInfo != null) {
//用户的钻石余额 > 选中金额的钻石数时
if (redPacketInfos.getPacketNum() >= mSelectRedInfo.getPacketNum()) {
unBtnWithdraw.setVisibility(View.GONE);
btnWithdraw.setVisibility(View.VISIBLE);
return true;
} else {
unBtnWithdraw.setVisibility(View.VISIBLE);
btnWithdraw.setVisibility(View.GONE);
return true;
}
}
} else {
return false;
}
//如果选中position不为空的时候
return false;
}
private boolean isAlipayValid() {
return mWithdrawInfo != null && !TextUtils.isEmpty(mWithdrawInfo.zxcAccount);
}
private void onGetWithdraw(WithdrawRedSucceedInfo succeedInfo) {
toast("兑换成功");
if (null != succeedInfo) {
redNum.setText(String.valueOf(succeedInfo.getPacketNum()));
}
}
}

View File

@@ -1,109 +0,0 @@
package com.yizhuan.erban.ui.wallet;
import android.content.Context;
import android.content.Intent;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import android.view.View;
import com.yizhuan.erban.R;
import com.yizhuan.erban.base.BaseBindingActivity;
import com.yizhuan.erban.base.TitleBar;
import com.yizhuan.erban.databinding.ActivityWalletBinding;
import com.yizhuan.erban.home.adapter.CommonMagicIndicatorAdapter;
import com.yizhuan.erban.bills.activities.TotalBillsActivity;
import com.yizhuan.erban.ui.widget.magicindicator.MagicIndicator;
import com.yizhuan.erban.ui.widget.magicindicator.ViewPagerHelper;
import com.yizhuan.erban.ui.widget.magicindicator.buildins.commonnavigator.CommonNavigator;
import com.yizhuan.xchat_android_core.Constants;
import com.yizhuan.xchat_android_core.home.bean.TabInfo;
import com.yizhuan.xchat_android_library.annatation.ActLayoutRes;
import java.util.ArrayList;
import java.util.List;
/**
* 我的钱包页面
*
* @author Administrator
* @date 2017/7/1
*/
@ActLayoutRes(R.layout.activity_wallet)
public class WalletActivity extends BaseBindingActivity<ActivityWalletBinding> implements CommonMagicIndicatorAdapter.OnItemSelectListener {
private ArrayList<Fragment> fragmentArrayList;
private FragmentManager fragmentManager;
public Context context;
private int mPosition;
public static void start(Context context, int position) {
Intent intent = new Intent(context, WalletActivity.class);
intent.putExtra(Constants.KEY_POSITION, position);
context.startActivity(intent);
}
@Override
protected void init() {
initTitleBar(getString(R.string.menu_my_wallet));
initFragment();
initViewPager();
}
@Override
public void initTitleBar(String title) {
mTitleBar = mBinding.titleBar;
if (mTitleBar != null) {
mTitleBar.setTitle(title);
mTitleBar.setImmersive(false);
mTitleBar.setTitleColor(getResources().getColor(R.color.back_font));
mTitleBar.setLeftImageResource(R.drawable.arrow_left);
mTitleBar.setLeftClickListener(v -> finish());
}
mTitleBar.setActionTextColor(getResources().getColor(R.color.text_tertiary));
mTitleBar.addAction(new TitleBar.TextAction("账单") {
@Override
public void performAction(View view) {
startActivity(new Intent(WalletActivity.this, TotalBillsActivity.class));
}
});
}
private void initViewPager() {
mBinding.vPager.setAdapter(new WalletFragmentPagerAdapter(fragmentManager, fragmentArrayList));
initMagicIndicator2();
mBinding.vPager.setOffscreenPageLimit(3);
mPosition = getIntent().getIntExtra(Constants.KEY_POSITION, 0);
mBinding.vPager.setCurrentItem(mPosition);
}
private void initMagicIndicator2() {
List<TabInfo> tabInfoList = new ArrayList<>(3);
tabInfoList.add(new TabInfo(1, getString(R.string.gift_expend_gold)));
tabInfoList.add(new TabInfo(2, getString(R.string.gift_income_gold)));
tabInfoList.add(new TabInfo(3, getString(R.string.red_package)));
final MagicIndicator magicIndicator = (MagicIndicator) findViewById(R.id.magic_indicator2);
CommonNavigator commonNavigator = new CommonNavigator(this);
commonNavigator.setAdjustMode(true);
CommonMagicIndicatorAdapter walletAdapter = new CommonMagicIndicatorAdapter(this, tabInfoList, 0);
walletAdapter.setOnItemSelectListener(this);
commonNavigator.setAdapter(walletAdapter);
magicIndicator.setNavigator(commonNavigator);
ViewPagerHelper.bind(magicIndicator, mBinding.vPager);
}
@Override
public void onItemSelect(int position) {
mBinding.vPager.setCurrentItem(position);
}
private void initFragment() {
fragmentArrayList = new ArrayList<>();
fragmentArrayList.add(new WalletGoldFragment());
fragmentArrayList.add(new JewelFragment());
fragmentArrayList.add(new RedBagFragment());
fragmentManager = getSupportFragmentManager();
}
}

View File

@@ -1,35 +0,0 @@
package com.yizhuan.erban.ui.wallet;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
import android.view.ViewGroup;
import java.util.ArrayList;
class WalletFragmentPagerAdapter extends FragmentPagerAdapter {
private ArrayList<Fragment> fragmentsList;
WalletFragmentPagerAdapter(FragmentManager fm, ArrayList<Fragment> fragmentsList) {
super(fm);
this.fragmentsList = fragmentsList;
}
@Override
public Fragment getItem(int position) {
return fragmentsList.get(position);
}
@Override
public int getCount() {
return fragmentsList.size();
}
@Override
public void destroyItem(ViewGroup container, int position, Object object) {
super.destroyItem(container, position, object);
}
}

View File

@@ -1,188 +0,0 @@
package com.yizhuan.erban.ui.wallet;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.Nullable;
import android.view.View;
import com.netease.nim.uikit.StatusBarUtil;
import com.trello.rxlifecycle3.android.ActivityEvent;
import com.yizhuan.erban.R;
import com.yizhuan.erban.base.BaseBindingActivity;
import com.yizhuan.erban.databinding.ActivityWalletGoldBinding;
import com.yizhuan.erban.ui.login.BinderPhoneActivity;
import com.yizhuan.erban.ui.pay.ChargeActivity;
import com.yizhuan.erban.ui.setting.ModifyPwdActivity;
import com.yizhuan.erban.ui.wallet.sendgold.SendGoldActivity;
import com.yizhuan.erban.ui.webview.CommonWebViewActivity;
import com.yizhuan.xchat_android_core.UriProvider;
import com.yizhuan.xchat_android_core.auth.AuthModel;
import com.yizhuan.xchat_android_core.pay.PayModel;
import com.yizhuan.xchat_android_core.pay.bean.WalletInfo;
import com.yizhuan.xchat_android_core.pay.event.GetWalletInfoEvent;
import com.yizhuan.xchat_android_core.pay.event.UpdateWalletInfoEvent;
import com.yizhuan.xchat_android_core.statistic.StatisticManager;
import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol;
import com.yizhuan.xchat_android_core.user.UserModel;
import com.yizhuan.xchat_android_library.annatation.ActLayoutRes;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import io.reactivex.SingleObserver;
import io.reactivex.disposables.Disposable;
@ActLayoutRes(R.layout.activity_wallet_gold)
public class WalletGoldActivity extends BaseBindingActivity<ActivityWalletGoldBinding> {
private final int BINDCODE_GOLD = 200;
private boolean isBindPhone;
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EventBus.getDefault().register(this);
initTitleBar("我的钻石");
}
@Override
public void onDestroy() {
super.onDestroy();
EventBus.getDefault().unregister(this);
}
@Override
protected boolean needSteepStateBar() {
return true;
}
@Override
protected void setStatusBar() {
super.setStatusBar();
StatusBarUtil.transparencyBar(this);
StatusBarUtil.StatusBarLightMode(this);
}
@Override
public void initTitleBar(String title) {
mTitleBar = mBinding.titleBar;
if (mTitleBar != null) {
mTitleBar.setTitle(title);
mTitleBar.setImmersive(true);
mTitleBar.setTitleColor(getResources().getColor(R.color.color_333333));
mTitleBar.setLeftImageResource(R.drawable.arrow_left);
mTitleBar.setBackgroundColor(getResources().getColor(R.color.transparent));
mTitleBar.setLeftClickListener(v -> finish());
}
}
@Override
protected void init() {
mBinding.btnWallGoldGive.setVisibility(View.GONE);
WalletInfo walletInfo = PayModel.get().getCurrentWalletInfo();
if (walletInfo != null) {
mBinding.setWalletInfo(walletInfo);
mBinding.executePendingBindings();
}
loadDiamondNum();
mBinding.setClick(this);
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onWalletInfoUpdate(UpdateWalletInfoEvent event) {
WalletInfo walletInfo = PayModel.get().getCurrentWalletInfo();
if (walletInfo != null)
mBinding.setWalletInfo(walletInfo);
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onGetWalletInfo(GetWalletInfoEvent event) {
WalletInfo walletInfo = PayModel.get().getCurrentWalletInfo();
if (walletInfo != null) {
mBinding.setWalletInfo(walletInfo);
mBinding.btnWallGoldGive.setVisibility(
walletInfo.isSendGold() ? View.VISIBLE : View.GONE);
}
}
@SuppressLint("CheckResult")
private void loadDiamondNum() {
PayModel.get().getWalletInfo(AuthModel.get().getCurrentUid()).subscribe();
}
@Override
public void onClick(View v) {
super.onClick(v);
switch (v.getId()) {
case R.id.btn_wall_gold_charge:
startActivity(new Intent(this, ChargeActivity.class));
StatisticManager.Instance().onEvent(context,
StatisticsProtocol.Event.EVENT_RECHARGE_CLICK,
"钻石充值",
null);
break;
case R.id.btn_wall_gold_give:
SendGoldActivity.start(context);
break;
case R.id.iv_gold_question:
CommonWebViewActivity.start(WalletGoldActivity.this, UriProvider.IM_SERVER_URL + "modules/nobles/faq.html?quesIndex=4");
break;
case R.id.tv_goto_change_gold:
AuthModel.get().isBindPhone()
.compose(bindUntilEvent(ActivityEvent.DESTROY))
.subscribe(new SingleObserver<String>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onSuccess(String s) {
onBindPhone();
}
@Override
public void onError(Throwable e) {
onNoBindPhone(e.getMessage());
}
});
break;
}
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == BINDCODE_GOLD && resultCode == Activity.RESULT_OK) {
isBindPhone = true;
ModifyPwdActivity.start(this, ModifyPwdActivity.FOGERT_PAY_PWD);
}
}
public void onBindPhone() {
mBinding.btnWallGoldCharge.setEnabled(true);
if (UserModel.get().getCacheLoginUserInfo() == null) {
return;
}
if (UserModel.get().getCacheLoginUserInfo().isBindPhone() && UserModel.get().getCacheLoginUserInfo().isBindPaymentPwd()) {
ExchangeGoldActivity.start(WalletGoldActivity.this);
} else {
ModifyPwdActivity.start(this, ModifyPwdActivity.FOGERT_PAY_PWD);
}
}
public void onNoBindPhone(String error) {
mBinding.btnWallGoldCharge.setEnabled(true);
startActivityForResult(new Intent(this, BinderPhoneActivity.class), BINDCODE_GOLD);
}
}

View File

@@ -1,84 +0,0 @@
package com.yizhuan.erban.ui.wallet;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.Nullable;
import com.yizhuan.erban.R;
import com.yizhuan.erban.base.BaseBindingFragment;
import com.yizhuan.erban.databinding.FragmentWalletGoldBinding;
import com.yizhuan.erban.ui.pay.ChargeActivity;
import com.yizhuan.erban.ui.webview.CommonWebViewActivity;
import com.yizhuan.xchat_android_core.UriProvider;
import com.yizhuan.xchat_android_core.auth.AuthModel;
import com.yizhuan.xchat_android_core.pay.PayModel;
import com.yizhuan.xchat_android_core.pay.bean.WalletInfo;
import com.yizhuan.xchat_android_core.pay.event.GetWalletInfoEvent;
import com.yizhuan.xchat_android_core.pay.event.UpdateWalletInfoEvent;
import com.yizhuan.xchat_android_library.annatation.ActLayoutRes;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
/**
* 钻石页面
*
* @author Administrator
* @date 2017/7/3
*/
@ActLayoutRes(R.layout.fragment_wallet_gold)
public class WalletGoldFragment extends BaseBindingFragment<FragmentWalletGoldBinding> {
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EventBus.getDefault().register(this);
}
@Override
public void onDestroy() {
super.onDestroy();
EventBus.getDefault().unregister(this);
}
@Override
public void initiate() {
WalletInfo walletInfo = PayModel.get().getCurrentWalletInfo();
if (walletInfo != null) {
mBinding.setWalletInfo(walletInfo);
mBinding.executePendingBindings();
}
loadDiamondNum();
mBinding.btnWallGoldCharge.setOnClickListener(
v -> startActivity(new Intent(getContext(), ChargeActivity.class)));
mBinding.ivWalletQuestion.setOnClickListener(v ->
CommonWebViewActivity.start(mContext, UriProvider.IM_SERVER_URL + "modules/nobles/faq.html?quesIndex=4"));
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onWalletInfoUpdate(UpdateWalletInfoEvent event) {
WalletInfo walletInfo = PayModel.get().getCurrentWalletInfo();
if (walletInfo != null)
mBinding.setWalletInfo(walletInfo);
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onGetWalletInfo(GetWalletInfoEvent event) {
WalletInfo walletInfo = PayModel.get().getCurrentWalletInfo();
if (walletInfo != null) {
mBinding.setWalletInfo(walletInfo);
}
}
@SuppressLint("CheckResult")
private void loadDiamondNum() {
PayModel.get().getWalletInfo(AuthModel.get().getCurrentUid());
}
}

View File

@@ -1,122 +0,0 @@
package com.yizhuan.erban.ui.widget;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.view.animation.AccelerateInterpolator;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.yizhuan.erban.R;
import com.yizhuan.erban.base.BaseActivity;
import com.yizhuan.erban.ui.wallet.RedBagActivity;
import com.yizhuan.erban.ui.wallet.WalletActivity;
import com.yizhuan.xchat_android_core.redPacket.bean.RedPacketInfoV2;
/**
* @author chenran
* @date 2017/10/4
*/
public class RedPacketDialog extends BaseActivity implements View.OnClickListener{
private ImageView openRed;
private ImageView imgClose;
private ImageView checkDetail;
private TextView redMoney;
private TextView source;
private RelativeLayout openRedPacket;
private LinearLayout checkRedPacket;
private RedPacketInfoV2 redPacketInfo;
private ObjectAnimator mObjectAnimator;
public static void start(Context context, RedPacketInfoV2 redPacketInfoV2) {
Intent intent = new Intent(context, RedPacketDialog.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.putExtra("redPacketInfo", redPacketInfoV2);
context.startActivity(intent);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.red_packet_dialog);
redPacketInfo = (RedPacketInfoV2) getIntent().getSerializableExtra("redPacketInfo");
initView();
setListener();
}
private void setListener() {
imgClose.setOnClickListener(this);
openRed.setOnClickListener(this);
checkDetail.setOnClickListener(this);
}
private void initView() {
openRedPacket = (RelativeLayout) findViewById(R.id.open_red_packet);
checkRedPacket = findViewById(R.id.check_red_packet);
openRed = (ImageView) findViewById(R.id.img_open);
imgClose = (ImageView) findViewById(R.id.img_close);
redMoney = (TextView) findViewById(R.id.tv_red_money);
checkDetail = (ImageView) findViewById(R.id.tv_look);
source = (TextView) findViewById(R.id.source);
source.setText("收到" + redPacketInfo.getPacketName() + "红包");
redMoney.setText(String.valueOf(redPacketInfo.getPacketNum()));
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.img_open:
startRedPacketAnim(v);
break;
case R.id.img_close:
finish();
break;
case R.id.tv_look:
startActivity(new Intent(context, RedBagActivity.class));
finish();
break;
default:
}
}
private void startRedPacketAnim(View v) {
v.setOnClickListener(null);
mObjectAnimator = ObjectAnimator.ofFloat(v, "rotationX", 0, 360, 720, 1080, 1540, 1900);
mObjectAnimator.setDuration(1000);
mObjectAnimator.setInterpolator(new AccelerateInterpolator());
mObjectAnimator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
openRedPacket.setVisibility(View.INVISIBLE);
checkRedPacket.setVisibility(View.VISIBLE);
}
});
mObjectAnimator.start();
}
@Override
protected void onDestroy() {
super.onDestroy();
if (mObjectAnimator != null) {
if (mObjectAnimator.isRunning()) {
mObjectAnimator.cancel();
}
mObjectAnimator = null;
}
}
}

View File

@@ -20,7 +20,6 @@ import com.netease.nim.uikit.common.util.log.LogUtil;
import com.yizhuan.erban.R;
import com.yizhuan.erban.ui.setting.VerifyPhoneActivity;
import com.yizhuan.erban.ui.wallet.ExchangeGoldActivity;
import com.yizhuan.erban.ui.wallet.RedPacketWithdrawActivity;
import com.yizhuan.erban.ui.withdraw.WithdrawActivity;
import com.yizhuan.xchat_android_library.utils.codec.DESUtils;
@@ -43,7 +42,6 @@ public class PassWordFragment extends DialogFragment {
private boolean isFullScreen;
private ExchangeGoldActivity goldActivity;
private WithdrawActivity withdrawActivity;
private RedPacketWithdrawActivity redPacketWithdrawActivity;
private long value;
private int hammerNum;
/**用于标识密码类型*/
@@ -85,8 +83,6 @@ public class PassWordFragment extends DialogFragment {
goldActivity = (ExchangeGoldActivity) activity;
} else if (activity instanceof WithdrawActivity) {
withdrawActivity = (WithdrawActivity) activity;
} else if (activity instanceof RedPacketWithdrawActivity) {
redPacketWithdrawActivity = (RedPacketWithdrawActivity) activity;
}
}
@@ -167,8 +163,6 @@ public class PassWordFragment extends DialogFragment {
goldActivity.commit(value, hammerNum, mPassword.getPassword());
} else if (withdrawActivity != null) {
withdrawActivity.commit(mPassword.getPassword());
} else if (redPacketWithdrawActivity != null) {
redPacketWithdrawActivity.commit(mPassword.getPassword());
}
try {
EventBus.getDefault().post(new PasswordEvent().setType(type)

View File

@@ -1,105 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg_normal_1c1b22"
tools:context=".ui.login.BinderPhoneActivity">
<com.yizhuan.erban.base.TitleBar
android:id="@+id/title_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_25"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/et_phone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="26dp"
android:layout_marginTop="50dp"
android:layout_marginEnd="26dp"
android:gravity="start|center_vertical"
android:hint="@string/hint_register_input_phone_number"
android:inputType="phone"
android:paddingBottom="15dp"
android:textColor="@color/text_normal_c6c6e9"
android:textColorHint="@color/text_hint_555574"
android:textSize="15sp"
android:theme="@style/common_edittext_style"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/title_bar"
tools:ignore="Autofill" />
<EditText
android:id="@+id/et_smscode"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_20"
android:gravity="start|center_vertical"
android:hint="@string/hint_require_code_2"
android:inputType="number"
android:maxLength="15"
android:paddingBottom="15dp"
android:textColor="@color/text_normal_c6c6e9"
android:textColorHint="@color/text_hint_555574"
android:textSize="15sp"
android:theme="@style/common_edittext_style"
app:layout_constraintEnd_toEndOf="@id/et_phone"
app:layout_constraintStart_toStartOf="@id/et_phone"
app:layout_constraintTop_toBottomOf="@id/et_phone"
tools:ignore="Autofill" />
<Button
android:id="@+id/btn_get_code"
android:layout_width="wrap_content"
android:layout_height="29dp"
android:layout_marginStart="@dimen/space_normal"
android:layout_marginEnd="10dp"
android:layout_marginBottom="5dp"
android:background="@color/transparent"
android:clickable="true"
android:focusable="true"
android:text="@string/text_request_code"
android:textColor="@color/design_color"
android:textSize="15sp"
app:layout_constraintBottom_toBottomOf="@id/et_smscode"
app:layout_constraintEnd_toEndOf="@id/et_phone"
app:layout_constraintTop_toTopOf="@id/et_smscode"
tools:ignore="SpUsage" />
<Button
android:id="@+id/btn_binder_request"
android:layout_width="0dp"
android:layout_height="43dp"
android:layout_marginStart="38dp"
android:layout_marginTop="50dp"
android:layout_marginEnd="38dp"
android:background="@drawable/bg_common_confirm"
android:enabled="false"
android:text="@string/text_bind"
android:textColor="@color/text_title_white"
android:textSize="16sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/et_smscode" />
<TextView
android:id="@+id/tv_skip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:padding="@dimen/dp_15"
android:text="@string/text_skip"
android:textColor="@color/text_secondary_4f516a"
android:textSize="@dimen/sp_14"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,234 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@mipmap/bg_red_bag">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/tv_red_rule"
android:layout_width="46dp"
android:layout_height="40dp"
android:layout_alignParentRight="true"
android:layout_marginTop="110dp"
android:background="@drawable/shape_solid_appcolor_left_20dp"
android:gravity="center"
android:text="活动\n规则"
android:textColor="@color/white"
android:textSize="12sp" />
<TextView
android:id="@+id/tv_red_method"
android:layout_width="46dp"
android:layout_height="40dp"
android:layout_below="@id/tv_red_rule"
android:layout_alignParentRight="true"
android:layout_marginTop="15dp"
android:background="@drawable/shape_solid_appcolor_left_20dp"
android:gravity="center"
android:text="奖励\n秘籍"
android:textColor="@color/white"
android:textSize="12sp" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="305dp"
android:layout_centerInParent="true"
android:layout_marginTop="198dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:layout_marginLeft="52dp"
android:layout_marginRight="52dp"
android:background="@mipmap/bg_red_bag_ins"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="60dp"
android:gravity="center"
android:text="您已获得"
android:textColor="@color/text_color_red"
android:textSize="@dimen/font_medium" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:gravity="center"
android:text="奖励金额"
android:textColor="@color/text_color_red"
android:textSize="10sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_red_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:textColor="@color/text_color_red"
android:textSize="24sp"
android:text="0" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:gravity="center"
android:textColor="@color/text_color_red"
android:textSize="@dimen/font_medium"
android:text="元" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_invite"
android:layout_width="match_parent"
android:layout_height="95dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginLeft="18dp"
android:layout_marginRight="18dp"
android:layout_marginBottom="10dp"
android:background="@mipmap/bg_red_bag_invite"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/ll_people"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="已成功邀请"
android:textColor="#085370" />
<TextView
android:id="@+id/tv_share_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#085370"
tools:text="0 人" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_share_bonus"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="我的分成奖励"
android:textColor="#085370" />
<TextView
android:id="@+id/tv_share"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#085370"
tools:text="0 元" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/ll_invite"
android:layout_alignParentLeft="true"
android:layout_marginLeft="109dp"
android:gravity="center">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_horn" />
<com.yizhuan.erban.ui.widget.marqueeview.MarqueeView
android:id="@+id/marqueeView"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_marginLeft="2dp"
app:mvAnimDuration="1000"
app:mvDirection="bottom_to_top"
app:mvGravity="left"
app:mvInterval="3000"
app:mvSingleLine="true"
app:mvTextColor="@color/white"
app:mvTextSize="@dimen/font_small" />
</LinearLayout>
<TextView
android:id="@+id/tv_red_rank"
android:layout_width="88dp"
android:layout_height="26dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:background="@drawable/shape_semi_round_gray_solid"
android:gravity="center"
android:text="查看排名"
android:textColor="@color/white"
android:textSize="15sp" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginLeft="53dp"
android:layout_marginRight="53dp"
android:layout_marginBottom="26dp"
android:gravity="center">
<TextView
android:id="@+id/tv_withdraw"
android:layout_width="match_parent"
android:layout_height="39dp"
android:layout_alignParentLeft="true"
android:alpha="0.6"
android:background="@drawable/shape_semi_round_white_solid"
android:gravity="center"
android:text="提现"
android:textColor="@color/text_primary" />
</LinearLayout>
</RelativeLayout>
<com.yizhuan.erban.base.TitleBar
android:id="@+id/title_bar"
android:layout_width="match_parent"
android:layout_height="@dimen/common_toolbar_height"
app:mBackgroundColor="@color/transparent" />
</FrameLayout>

View File

@@ -1,216 +0,0 @@
<?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="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:background="@color/white">
<com.yizhuan.erban.base.TitleBar
android:id="@+id/title_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<!--刚进来显示的界面,未绑定-->
<RelativeLayout
android:id="@+id/rly_binder"
android:layout_width="match_parent"
android:layout_height="75dp"
android:layout_marginTop="5dp"
android:background="@color/white">
<ImageView
android:id="@+id/zhifubao_un"
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:background="@drawable/icon_zhifubao_grey" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@+id/zhifubao_un"
android:text="请绑定你的支付宝账号"
android:textColor="#666666"
android:textSize="15dp" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="15dp"
android:background="@drawable/arrow_right" />
</RelativeLayout>
<!--绑定成功后显示用户信息的控件,变为可见-->
<RelativeLayout
android:id="@+id/rly_binder_succeed"
android:layout_width="match_parent"
android:layout_height="75dp"
android:layout_marginTop="5dp"
android:background="@color/white"
android:visibility="gone">
<ImageView
android:id="@+id/zhifubao"
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:background="@drawable/icon_zhifubao" />
<LinearLayout
android:id="@+id/lly_zhifubao_user"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/zhifubao"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@+id/zhifubao"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="支付宝账号: "
android:textColor="#333333"
android:textSize="@dimen/font_normal" />
<TextView
android:id="@+id/tv_user_zhifubao"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="13924011834"
android:textColor="#333333"
android:textSize="@dimen/font_normal" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/lly_zhifubao_user"
android:layout_marginLeft="10dp"
android:layout_marginTop="2dp"
android:layout_toRightOf="@+id/zhifubao"
android:orientation="horizontal"
>
<TextView
android:id="@+id/tv_user_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="真实姓名: "
android:textColor="#333333"
android:textSize="@dimen/font_normal" />
<TextView
android:id="@+id/tv_user_zhifubao_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="罗生"
android:textColor="#333333"
android:textSize="@dimen/font_normal" />
</LinearLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="15dp"
android:background="@drawable/arrow_right" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_horizontal"
android:background="@color/white">
<ImageView
android:layout_width="74dp"
android:layout_height="72dp"
android:src="@mipmap/wallet_redbag" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="奖励金余额"
android:textSize="@dimen/font_small"
android:textColor="@color/text_tertiary" />
<TextView
android:id="@+id/tv_red_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="9dp"
tools:text="500"
android:textSize="21sp"
android:textColor="@color/text_primary" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="5dp"
android:layout_weight="1.0"
android:background="@color/white" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_below="@+id/tv_tip"
android:background="@color/white">
<Button
android:id="@+id/btn_withdraw_un"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_gravity="center"
android:layout_marginLeft="@dimen/common_item_view_margin_left_right"
android:layout_marginRight="@dimen/common_item_view_margin_left_right"
android:background="@drawable/shape_semi_round_gray_un_solid"
android:clickable="false"
android:text="确认提现"
android:textColor="#1A1A1A"
android:textSize="16sp" />
<Button
android:id="@+id/btn_withdraw"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_gravity="center"
android:layout_marginLeft="@dimen/common_item_view_margin_left_right"
android:layout_marginRight="@dimen/common_item_view_margin_left_right"
android:background="@drawable/shape_semi_round_yellow_solid"
android:text="确认提现"
android:textColor="@color/white"
android:textSize="16sp"
android:visibility="gone" />
</FrameLayout>
<TextView
android:id="@+id/tv_tip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:layout_marginLeft="29dp"
android:layout_marginRight="29dp"
android:gravity="center"
android:lineSpacingExtra="6dp"
android:textColor="@color/color_999999"
android:textSize="12sp"
tools:text="@string/withdraw_notice"
android:visibility="gone"/>
</LinearLayout>

View File

@@ -1,256 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="walletInfo"
type="com.yizhuan.xchat_android_core.pay.bean.WalletInfo" />
<variable
name="click"
type="android.view.View.OnClickListener" />
<import type="com.yizhuan.xchat_android_library.utils.FormatUtils" />
</data>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_FAFAFA">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="78dp"
android:layout_marginTop="95dp"
android:paddingStart="15dp"
android:paddingEnd="15dp"
android:gravity="center_vertical"
android:background="@drawable/bg_wallet_total"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_wallet_gold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:text="钻石总额"
android:textColor="@color/color_333333"
android:textSize="14sp" />
</LinearLayout>
<TextView
android:id="@+id/tv_wall_gold_remain"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="end"
android:layout_marginStart="5dp"
android:text="@{FormatUtils.formatBigDecimal(walletInfo.diamonds)}"
android:textColor="@color/color_333333"
android:includeFontPadding="false"
android:textSize="25sp"
tools:text="264.00" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center"
android:text="含贵族钻石"
android:textColor="@color/color_B3B3B3"
android:textSize="12sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_marginTop="55dp"
android:orientation="horizontal">
<ImageView
android:layout_width="22dp"
android:layout_height="22dp"
android:src="@mipmap/ic_gold_general" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="7dp"
android:layout_weight="1"
android:text="钻石余额"
android:textColor="@color/text_primary"
android:textSize="@dimen/font_large" />
<TextView
android:id="@+id/tv_gold_general_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{FormatUtils.formatBigDecimal(walletInfo.chargeGoldNum)}"
android:textColor="@color/text_primary"
android:textSize="@dimen/font_large"
android:textStyle="bold"
tools:text="100.00" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_marginTop="25dp"
android:orientation="horizontal">
<ImageView
android:layout_width="22dp"
android:layout_height="22dp"
android:src="@mipmap/ic_gold_noble" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="7dp"
android:text="贵族钻石"
android:textColor="@color/text_primary"
android:textSize="@dimen/font_large" />
<ImageView
android:id="@+id/iv_gold_question"
android:layout_width="22dp"
android:layout_height="22dp"
android:layout_marginLeft="7dp"
android:scaleType="center"
android:onClick="@{click}"
android:src="@mipmap/common_ic_help" />
<View
android:layout_width="wrap_content"
android:layout_height="1dp"
android:layout_weight="1" />
<TextView
android:id="@+id/tv_gold_noble_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{FormatUtils.formatBigDecimal(walletInfo.nobleGoldNum)}"
android:textColor="@color/text_primary"
android:textSize="@dimen/font_large"
android:textStyle="bold"
tools:text="100.00" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="28dp"
android:text="钻石不足?"
android:textColor="@color/color_999999"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_goto_change_gold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="28dp"
android:text="前往【我的钻石】兑换钻石>"
android:textColor="@color/appColor"
android:textSize="13sp"
android:onClick="@{click}" />
</LinearLayout>
<TextView
android:id="@+id/btn_wall_gold_charge"
android:layout_width="match_parent"
android:layout_height="39dp"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="18dp"
android:layout_marginRight="18dp"
android:background="@drawable/shape_semi_round_gray_solid"
android:gravity="center"
android:onClick="@{click}"
android:text="钻石充值"
android:textColor="@color/color_333333"
android:textSize="@dimen/font_larger" />
<TextView
android:id="@+id/btn_wall_gold_give"
android:layout_width="match_parent"
android:layout_height="39dp"
android:layout_marginTop="19dp"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="18dp"
android:layout_marginRight="18dp"
android:background="@drawable/shape_semi_round_gray_solid"
android:gravity="center"
android:onClick="@{click}"
android:text="钻石转赠"
tools:visibility="visible"
android:visibility="gone"
android:textColor="@color/color_333333"
android:textSize="@dimen/font_larger" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="28dp"
android:layout_marginBottom="42dp"
android:text="注: 钻石可用于提现提现比例1元=10钻石"
android:textColor="@color/text_tertiary"
android:textSize="@dimen/font_tiny" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
<com.yizhuan.erban.base.TitleBar
android:id="@+id/title_bar"
android:layout_width="match_parent"
android:layout_height="@dimen/common_toolbar_height"
app:mBackgroundColor="@color/transparent" />
</FrameLayout>
</layout>

View File

@@ -1,188 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="walletInfo"
type="com.yizhuan.xchat_android_core.pay.bean.WalletInfo" />
<import type="com.yizhuan.xchat_android_library.utils.FormatUtils" />
</data>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="15dp"
android:paddingRight="15dp">
<View
android:id="@+id/iv_wall_gold_bg"
android:layout_width="match_parent"
android:layout_height="135dp"
android:layout_marginTop="15dp"
android:background="@mipmap/ic_gold_remaid_bg" />
<TextView
android:id="@+id/tv_wall_gold_remain_before"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="@+id/iv_wall_gold_bg"
android:layout_alignTop="@+id/iv_wall_gold_bg"
android:layout_marginStart="20dp"
android:layout_marginTop="33dp"
android:maxLines="1"
android:text="@string/wall_gold_remain_before_text"
android:textColor="@color/color_1A1A1A"
android:textSize="16sp" />
<TextView
android:id="@+id/tv_wall_gold_remain_after"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/tv_wall_gold_remain_before"
android:layout_alignTop="@+id/tv_wall_gold_remain_before"
android:layout_marginStart="3dp"
android:layout_toEndOf="@+id/tv_wall_gold_remain_before"
android:gravity="center"
android:maxLines="1"
android:text="@string/wall_gold_remain_after_text"
android:textColor="@color/color_1A1A1A"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_wall_gold_remain"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="@+id/tv_wall_gold_remain_before"
android:layout_below="@+id/tv_wall_gold_remain_before"
android:layout_marginTop="10dp"
android:maxLines="1"
android:text="@{FormatUtils.formatBigDecimal(walletInfo.diamonds)}"
android:textColor="@color/color_1A1A1A"
android:textSize="20sp"
android:textStyle="bold"
tools:text="360" />
<Button
android:id="@+id/btn_wall_gold_charge"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_alignBottom="@+id/iv_wall_gold_bg"
android:layout_alignParentEnd="true"
android:layout_marginBottom="15dp"
android:layout_marginEnd="19dp"
android:background="@drawable/wall_gold_charge"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:text="@string/charge_now"
android:textColor="@color/color_1A1A1A"
android:textSize="14sp" />
<View
android:id="@+id/bg_wallet_gold_list"
android:layout_width="match_parent"
android:layout_height="104dp"
android:layout_below="@+id/iv_wall_gold_bg"
android:layout_marginTop="10dp"
android:background="@drawable/bg_wallet_gold_list_while" />
<TextView
android:id="@+id/tv_wallet_gold_normal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/bg_wallet_gold_list"
android:layout_marginStart="15dp"
android:layout_marginTop="13.5dp"
android:drawablePadding="8dp"
android:drawableStart="@mipmap/ic_gold_normal_remain"
android:gravity="center_vertical"
android:maxLines="1"
android:text="@string/wallet_gold_normal_remain"
android:textColor="@color/color_333333"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_wallet_gold_normal_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/view_wallet_gold_line"
android:layout_alignParentEnd="true"
android:layout_alignTop="@+id/bg_wallet_gold_list"
android:layout_marginEnd="15dp"
android:gravity="center_vertical"
android:maxLines="1"
android:text="@{FormatUtils.formatBigDecimal(walletInfo.chargeGoldNum)}"
android:textColor="@color/color_666666"
android:textSize="18sp"
android:textStyle="bold"
tools:text="360" />
<View
android:id="@+id/view_wallet_gold_line"
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_below="@+id/tv_wallet_gold_normal"
android:layout_marginEnd="15dp"
android:layout_marginStart="15dp"
android:layout_marginTop="13.5dp"
android:background="@color/color_f0f0f0" />
<TextView
android:id="@+id/tv_wallet_gold_noble"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/view_wallet_gold_line"
android:layout_marginStart="15dp"
android:layout_marginTop="13.5dp"
android:drawablePadding="8dp"
android:drawableStart="@mipmap/ic_gold_noble_remain"
android:gravity="center_vertical"
android:maxLines="1"
android:text="@string/wallet_gold_noble_remain"
android:textColor="@color/color_333333"
android:textSize="14sp" />
<ImageView
android:id="@+id/iv_wallet_question"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/tv_wallet_gold_noble"
android:layout_alignTop="@+id/tv_wallet_gold_noble"
android:layout_marginStart="10dp"
android:layout_toEndOf="@+id/tv_wallet_gold_noble"
android:src="@mipmap/ic_question" />
<TextView
android:id="@+id/tv_wallet_gold_noble_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/bg_wallet_gold_list"
android:layout_alignParentEnd="true"
android:layout_alignTop="@+id/view_wallet_gold_line"
android:layout_marginEnd="15dp"
android:gravity="center_vertical"
android:maxLines="1"
android:text="@{FormatUtils.formatBigDecimal(walletInfo.nobleGoldNum)}"
android:textColor="@color/color_666666"
android:textSize="18sp"
android:textStyle="bold"
tools:text="0" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/bg_wallet_gold_list"
android:layout_marginTop="15dp"
android:text="@string/wallet_gold_noble_notice"
android:textColor="@color/color_999999"
android:textSize="14sp" />
</RelativeLayout>
</layout>

View File

@@ -1,309 +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="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="34dp"
android:background="@color/color_FFF2C4"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:src="@drawable/icon_trumpet" />
<com.yizhuan.erban.ui.widget.marqueeview.MarqueeView
android:id="@+id/marqueeView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
app:mvAnimDuration="1000"
app:mvDirection="bottom_to_top"
app:mvGravity="left"
app:mvInterval="3000"
app:mvSingleLine="true"
app:mvTextColor="@color/color_dfa12c"
app:mvTextSize="13dp" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="105dp">
<!-- android:background="@color/color_F5F5F5"-->
<TextView
android:id="@+id/tv_s"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="29dp"
android:layout_marginTop="29dp"
android:text="当前红包金额(满100可提现)"
android:textColor="#999999"
android:textSize="13dp" />
<TextView
android:id="@+id/tv_red_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_s"
android:layout_marginLeft="29dp"
android:layout_marginTop="5dp"
android:text="¥ 0"
android:textColor="#1A1A1A"
android:textSize="30dp"
android:textStyle="bold" />
<ImageView
android:id="@+id/img_un_withdraw"
android:layout_width="70dp"
android:layout_height="29dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="15dp"
android:layout_marginRight="20dp"
android:src="@drawable/icon_un_withdraw" />
<ImageView
android:id="@+id/img_withdraw"
android:layout_width="70dp"
android:layout_height="29dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="15dp"
android:layout_marginRight="20dp"
android:src="@drawable/icon_withdraw"
android:visibility="gone" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/rly_red_rank"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/bg_common_touch_while">
<ImageView
android:id="@+id/img_red_rank"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:src="@drawable/icon_red_rank" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@+id/img_red_rank"
android:text="红包排行榜"
android:textColor="#666666"
android:textSize="15dp" />
<ImageView
android:layout_width="7dp"
android:layout_height="12dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="15dp"
android:src="@drawable/arrow_right" />
<View
android:layout_width="wrap_content"
android:layout_height="1px"
android:layout_alignLeft="@+id/img_red_rank"
android:layout_alignParentBottom="true"
android:background="#f5f5f5" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/rly_red_rule"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/bg_common_touch_while">
<ImageView
android:id="@+id/img_red_rule"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:src="@drawable/icon_red_rule" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@+id/img_red_rule"
android:text="红包大作战(规则)"
android:textColor="#666666"
android:textSize="15dp" />
<ImageView
android:layout_width="7dp"
android:layout_height="12dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="15dp"
android:src="@drawable/arrow_right" />
<View
android:layout_width="wrap_content"
android:layout_height="1px"
android:layout_alignLeft="@+id/img_red_rule"
android:layout_alignParentBottom="true"
android:background="#f5f5f5" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/rly_red_method"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/bg_common_touch_while">
<ImageView
android:id="@+id/img_red_method"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:src="@drawable/icon_red_method" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@+id/img_red_method"
android:text="红包秘籍"
android:textColor="#666666"
android:textSize="15dp" />
<ImageView
android:layout_width="7dp"
android:layout_height="12dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="15dp"
android:src="@drawable/arrow_right" />
<View
android:layout_width="wrap_content"
android:layout_height="1px"
android:layout_alignLeft="@+id/img_red_method"
android:layout_alignParentBottom="true"
android:background="#f5f5f5" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/rly_people"
android:layout_width="match_parent"
android:layout_height="75dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="25dp"
android:background="@drawable/shape_wallet_red_pack_invited_num">
<ImageView
android:id="@+id/img_people"
android:layout_width="34dp"
android:layout_height="34dp"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:src="@drawable/icon_people" />
<TextView
android:id="@+id/tv_people"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="19dp"
android:layout_toRightOf="@+id/img_people"
android:text="我的邀请人数"
android:textColor="#FFFFFF"
android:textSize="18dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_people"
android:layout_marginTop="8dp"
android:layout_toRightOf="@+id/img_people"
android:text="邀请越多,红包越多"
android:textColor="#FFFFFF"
android:textSize="12dp" />
<TextView
android:id="@+id/tv_share_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="20dp"
android:text="0人"
android:textColor="#FFFFFF"
android:textSize="25dp"
android:textStyle="bold" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/rly_share_bonus"
android:layout_width="match_parent"
android:layout_height="75dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="20dp"
android:background="@drawable/shape_wallet_red_pack_reward">
<ImageView
android:id="@+id/img_share"
android:layout_width="34dp"
android:layout_height="34dp"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:src="@drawable/icon_share_money" />
<TextView
android:id="@+id/tv_share_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="19dp"
android:layout_toRightOf="@+id/img_share"
android:text="分成奖励"
android:textColor="#FFFFFF"
android:textSize="18dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_share_tv"
android:layout_marginTop="8dp"
android:layout_toRightOf="@+id/img_share"
android:text="努力一次,收益十年"
android:textColor="#FFFFFF"
android:textSize="12dp" />
<TextView
android:id="@+id/tv_share"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="20dp"
android:text="0元"
android:textColor="#FFFFFF"
android:textSize="25dp"
android:textStyle="bold" />
</RelativeLayout>
</LinearLayout>

View File

@@ -3,8 +3,6 @@ package com.yizhuan.erban.bank_card.activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.method.LinkMovementMethod;
@@ -12,13 +10,16 @@ import android.text.style.ForegroundColorSpan;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import com.netease.nim.uikit.StatusBarUtil;
import com.netease.nim.uikit.common.util.log.LogUtil;
import com.yizhuan.erban.R;
import com.yizhuan.erban.bank_card.presenter.AddBankCardAgreementPresenter;
import com.yizhuan.erban.base.BaseMvpActivity;
import com.yizhuan.erban.common.widget.OriginalDrawStatusClickSpan;
import com.yizhuan.erban.ui.login.BinderPhoneActivity;
import com.yizhuan.erban.ui.login.BindPhoneActivity;
import com.yizhuan.erban.ui.setting.ModifyPwdActivity;
import com.yizhuan.erban.ui.webview.CommonWebViewActivity;
import com.yizhuan.erban.ui.widget.password.PassWordFragment;
@@ -163,7 +164,7 @@ public class AddBankCardAgreementActivity extends BaseMvpActivity<IAddBankCardAg
@Override
public void goToBindPhoneActivity() {
getDialogManager().dismissDialog();
BinderPhoneActivity.start(this);
BindPhoneActivity.start(this);
}
@Override

View File

@@ -48,7 +48,7 @@ import com.yizhuan.erban.community.utils.ObjectTypeHelper;
import com.yizhuan.erban.community.widget.DynamicNickDetailWidget;
import com.yizhuan.erban.community.widget.ExpandableTextView;
import com.yizhuan.erban.miniworld.activity.TopicMainActivity;
import com.yizhuan.erban.ui.login.BinderPhoneActivity;
import com.yizhuan.erban.ui.login.BindPhoneActivity;
import com.yizhuan.erban.ui.utils.ImageLoadUtilsV2;
import com.yizhuan.erban.ui.widget.ButtonItem;
import com.yizhuan.erban.ui.widget.magicindicator.buildins.UIUtil;
@@ -1158,7 +1158,7 @@ public class DynamicDetailActivity extends BaseActivity implements IEmoticonSele
}
if (!userInfo.isBindPhone()) {
getDialogManager().showOkCancelWithTitleDialog("为了营造更安全的网络环境发布评论需先绑定手机号",
() -> BinderPhoneActivity.start(context));
() -> BindPhoneActivity.start(this));
return false;
}
return true;

View File

@@ -3,8 +3,6 @@ package com.yizhuan.erban.public_chat_hall.fragment;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.style.ForegroundColorSpan;
@@ -12,6 +10,9 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import com.netease.nim.uikit.api.NimUIKit;
import com.netease.nim.uikit.api.model.chatroom.ChatRoomSessionCustomization;
import com.netease.nim.uikit.business.ait.AitManager;
@@ -50,7 +51,7 @@ import com.yizhuan.erban.public_chat_hall.module.PublicChatHallMessageListPanel;
import com.yizhuan.erban.public_chat_hall.utils.RemainCountManager;
import com.yizhuan.erban.public_chat_hall.widget.PublicChatHallGiftAnimationDialog;
import com.yizhuan.erban.ui.gift.callback.OnGiftDialogBtnClickListenerWrapper;
import com.yizhuan.erban.ui.login.BinderPhoneActivity;
import com.yizhuan.erban.ui.login.BindPhoneActivity;
import com.yizhuan.erban.ui.widget.GiftDialog;
import com.yizhuan.erban.ui.widget.UserInfoDialog;
import com.yizhuan.erban.ui.widget.dialog.OpenNobleDialog;
@@ -575,7 +576,7 @@ public class PublicChatHallMessageFragment extends TFragment implements ModulePr
dialogManager.showTipsDialog(builder, getString(R.string.label_go_to_bind_phone), new DialogManager.AbsOkDialogListener() {
@Override
public void onOk() {
startActivity(new Intent(getContext(), BinderPhoneActivity.class));
BindPhoneActivity.start(getContext());
}
});
return false;