修改金币明细和提现bug
This commit is contained in:
@@ -1,15 +1,5 @@
|
||||
package com.yizhuan.erban.base;
|
||||
|
||||
import static com.yizhuan.xchat_android_core.Constants.DEBUG_MAX_UID;
|
||||
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MESS_HEAD_NOBLE;
|
||||
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MESS_SUB_OPENNOBLE;
|
||||
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MESS_SUB_RENEWNOBLE;
|
||||
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_RED_PACKAGE;
|
||||
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ALL_DIAMOND;
|
||||
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_VIP;
|
||||
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_VIP_USER_ALL_UPGRADE;
|
||||
import static com.yizhuan.xchat_android_library.utils.UIUtils.getActivityByContext;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.ActivityManager;
|
||||
import android.content.ComponentName;
|
||||
@@ -67,7 +57,6 @@ import com.yizhuan.erban.common.widget.dialog.DialogUiHelper;
|
||||
import com.yizhuan.erban.ui.im.avtivity.NimP2PMessageActivity;
|
||||
import com.yizhuan.erban.ui.login.AddUserInfoActivity;
|
||||
import com.yizhuan.erban.ui.login.LoginCodeActivity;
|
||||
import com.yizhuan.erban.ui.login.LoginPhoneActivity;
|
||||
import com.yizhuan.erban.ui.pay.ChargeActivity;
|
||||
import com.yizhuan.erban.ui.setting.ResetPasswordActivity;
|
||||
import com.yizhuan.erban.ui.webview.CommonWebViewActivity;
|
||||
@@ -115,12 +104,20 @@ import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.yizhuan.xchat_android_library.common.fragmentation.ISupportActivity;
|
||||
import com.yizhuan.xchat_android_library.common.fragmentation.SupportActivityDelegate;
|
||||
import io.reactivex.Observable;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.CompositeDisposable;
|
||||
|
||||
import static com.yizhuan.xchat_android_core.Constants.DEBUG_MAX_UID;
|
||||
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MESS_HEAD_NOBLE;
|
||||
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MESS_SUB_OPENNOBLE;
|
||||
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MESS_SUB_RENEWNOBLE;
|
||||
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_RED_PACKAGE;
|
||||
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ALL_DIAMOND;
|
||||
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_VIP;
|
||||
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_VIP_USER_ALL_UPGRADE;
|
||||
import static com.yizhuan.xchat_android_library.utils.UIUtils.getActivityByContext;
|
||||
|
||||
|
||||
/**
|
||||
* @author alvin hwang
|
||||
@@ -974,7 +971,7 @@ public abstract class BaseActivity extends RxAppCompatActivity
|
||||
*/
|
||||
private boolean isNeedToHandleBroadcastMessageActivity() {
|
||||
List<Class> acts = new ArrayList<>();
|
||||
acts.add(LoginPhoneActivity.class);
|
||||
// acts.add(LoginPhoneActivity.class);
|
||||
acts.add(LoginCodeActivity.class);
|
||||
acts.add(ResetPasswordActivity.class);
|
||||
acts.add(AddUserInfoActivity.class);
|
||||
|
@@ -49,22 +49,16 @@ class EarnRecordViewModel : BaseViewModel() {
|
||||
*/
|
||||
private var mWeekChooseDay: Long = 0
|
||||
|
||||
/**
|
||||
* 日范围内选中的日期
|
||||
*/
|
||||
private var mDay: Long = 0
|
||||
|
||||
fun initCurrentDay() {
|
||||
mWeekChooseDay = System.currentTimeMillis()
|
||||
mDay = mWeekChooseDay
|
||||
mWeekChooseDay = System.currentTimeMillis() - TimeUtils.MILLIS_OF_A_DAY * 7
|
||||
val calendar = Calendar.getInstance()
|
||||
calendar.timeInMillis = mDay
|
||||
calendar.timeInMillis = mWeekChooseDay
|
||||
val curWeekDay = calendar[Calendar.DAY_OF_WEEK]
|
||||
//周一的时间
|
||||
val firstDayTime: Long = if (curWeekDay == 1) { //周日
|
||||
calendar.timeInMillis - TimeUtils.MILLIS_OF_A_DAY * (14 - curWeekDay)
|
||||
calendar.timeInMillis - TimeUtils.MILLIS_OF_A_DAY * (7 - curWeekDay)
|
||||
} else {
|
||||
calendar.timeInMillis - TimeUtils.MILLIS_OF_A_DAY * ((curWeekDay - 2) + 7)
|
||||
calendar.timeInMillis - TimeUtils.MILLIS_OF_A_DAY * (curWeekDay - 2)
|
||||
}
|
||||
//周日
|
||||
val lastDayTime = firstDayTime + TimeUtils.MILLIS_OF_A_DAY * 6
|
||||
@@ -152,7 +146,7 @@ class EarnRecordViewModel : BaseViewModel() {
|
||||
/**
|
||||
* 提现
|
||||
*/
|
||||
fun exchange(goldNum: Long, payPwd: String) {
|
||||
fun exchange(goldNum: Double, payPwd: String) {
|
||||
safeLaunch(
|
||||
true,
|
||||
block = {
|
||||
|
@@ -117,9 +117,9 @@ class EarnWithdrawActivity : BaseViewBindingActivity<ActivityEarnWithdrawBinding
|
||||
}
|
||||
)
|
||||
tipDialog.show()
|
||||
} else if (binding.edGold.text.toString().toLong() < it.minGolds) {
|
||||
} else if (binding.edGold.text.toString().toDouble() < it.minGolds.toString().toDouble()) {
|
||||
toast("至少需要提現${it.minGolds}金幣")
|
||||
} else if (binding.edGold.text.toString().toLong() > it.maxGolds) {
|
||||
} else if (binding.edGold.text.toString().toDouble() > it.maxGolds.toString().toDouble()) {
|
||||
toast("提現不能超過${it.maxGolds}金幣")
|
||||
} else {
|
||||
GiveGoldPassWordFragment.newInstance(
|
||||
@@ -154,7 +154,7 @@ class EarnWithdrawActivity : BaseViewBindingActivity<ActivityEarnWithdrawBinding
|
||||
val password = passWordFragment?.password?.password ?: ""
|
||||
if (password.length == 6) {
|
||||
earnRecordModel.exchange(
|
||||
binding.edGold.text.toString().toLong(), DESAndBase64(password)
|
||||
binding.edGold.text.toString().toDouble(), DESAndBase64(password)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -163,5 +163,4 @@ class EarnWithdrawActivity : BaseViewBindingActivity<ActivityEarnWithdrawBinding
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -2,23 +2,30 @@ package com.yizhuan.erban.earn.activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.view.Gravity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.WindowManager
|
||||
import android.widget.PopupWindow
|
||||
import androidx.activity.viewModels
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.jzxiang.pickerview.data.Type
|
||||
import com.netease.nim.uikit.StatusBarUtil
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.base.BaseViewBindingActivity
|
||||
import com.yizhuan.erban.common.EmptyViewHelper
|
||||
import com.yizhuan.erban.databinding.ActivityGoldDetailBinding
|
||||
import com.yizhuan.erban.earn.EarnRecordViewModel
|
||||
import com.yizhuan.erban.earn.adapter.GoldDetailAdapter
|
||||
import com.yizhuan.erban.earn.adapter.GoldRoomAdapter
|
||||
import com.yizhuan.erban.module_hall.hall.view.dialog.TimePickerDialog
|
||||
import com.yizhuan.erban.module_hall.income.adapter.LiveIncomeAdapter
|
||||
import com.yizhuan.erban.ui.utils.RVDelegate
|
||||
import com.yizhuan.xchat_android_core.association.ClanListInfo
|
||||
import com.yizhuan.erban.ui.widget.recyclerview.decoration.ColorDecoration
|
||||
import com.yizhuan.xchat_android_core.earn.bean.MemberSettlement
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil
|
||||
|
||||
/**
|
||||
* 金币明细
|
||||
@@ -28,10 +35,14 @@ class GoldDetailActivity : BaseViewBindingActivity<ActivityGoldDetailBinding>(),
|
||||
|
||||
private val earnRecordModel: EarnRecordViewModel by viewModels()
|
||||
|
||||
private val mIncomeAdapter: GoldDetailAdapter by lazy { GoldDetailAdapter() }
|
||||
private val mGoldDetailAdapter: GoldDetailAdapter by lazy { GoldDetailAdapter() }
|
||||
|
||||
private lateinit var rvDelegate: RVDelegate<MemberSettlement>
|
||||
|
||||
private lateinit var roomPopupWindow: PopupWindow
|
||||
|
||||
private var settlementList : List<MemberSettlement> ?= null
|
||||
|
||||
companion object {
|
||||
|
||||
@JvmStatic
|
||||
@@ -59,13 +70,16 @@ class GoldDetailActivity : BaseViewBindingActivity<ActivityGoldDetailBinding>(),
|
||||
getString(R.string.empty_data)
|
||||
)
|
||||
)
|
||||
.setAdapter(mIncomeAdapter)
|
||||
.setAdapter(mGoldDetailAdapter)
|
||||
.build()
|
||||
}
|
||||
|
||||
private fun initListener() {
|
||||
binding.ivRoomDown.setOnClickListener{
|
||||
|
||||
binding.tvBelongRoom.setOnClickListener {
|
||||
showRoomPopup()
|
||||
}
|
||||
binding.ivRoomDown.setOnClickListener {
|
||||
showRoomPopup()
|
||||
}
|
||||
binding.llDate.setOnClickListener {
|
||||
val builder = TimePickerDialog.Builder()
|
||||
@@ -94,6 +108,52 @@ class GoldDetailActivity : BaseViewBindingActivity<ActivityGoldDetailBinding>(),
|
||||
}
|
||||
}
|
||||
|
||||
private fun showRoomPopup() {
|
||||
val contentView =
|
||||
LayoutInflater.from(context).inflate(R.layout.layout_belong_room_view, null)
|
||||
roomPopupWindow =
|
||||
PopupWindow(
|
||||
contentView,
|
||||
ScreenUtil.dip2px(100f),
|
||||
WindowManager.LayoutParams.WRAP_CONTENT
|
||||
)
|
||||
roomPopupWindow.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
|
||||
roomPopupWindow.isOutsideTouchable = true
|
||||
roomPopupWindow.isFocusable = true
|
||||
|
||||
val list = settlementList?.map { it.hallName }?.toMutableList()
|
||||
list?.add(0, getString(R.string.all))
|
||||
val recyclerview = contentView.findViewById<RecyclerView>(R.id.mRecyclerView)
|
||||
val goldRoomAdapter = GoldRoomAdapter()
|
||||
recyclerview.adapter = goldRoomAdapter
|
||||
recyclerview.addItemDecoration(
|
||||
ColorDecoration(
|
||||
ContextCompat.getColor(
|
||||
this,
|
||||
R.color.color_F7F7F7
|
||||
), 0, 2, false
|
||||
)
|
||||
)
|
||||
|
||||
goldRoomAdapter.setOnItemClickListener { adapter, view, position ->
|
||||
if(position == 0){
|
||||
mGoldDetailAdapter.setNewData(settlementList)
|
||||
}else{
|
||||
val settlementList = settlementList?.filter { it.hallName == goldRoomAdapter.data[position] }?.toMutableList()
|
||||
mGoldDetailAdapter.setNewData(settlementList)
|
||||
}
|
||||
roomPopupWindow.dismiss()
|
||||
}
|
||||
|
||||
goldRoomAdapter.setNewData(list)
|
||||
|
||||
try {
|
||||
roomPopupWindow.showAsDropDown(binding.tvBelongRoom, -40, 0, Gravity.BOTTOM)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
private fun initModel() {
|
||||
getWeekIncomeTotal(earnRecordModel.getWeekFirstDay(), earnRecordModel.getWeekLastDay())
|
||||
|
||||
@@ -101,6 +161,7 @@ class GoldDetailActivity : BaseViewBindingActivity<ActivityGoldDetailBinding>(),
|
||||
it?.let {
|
||||
binding.tvTotalGold.text = it.total.toString()
|
||||
rvDelegate.setNewData(it.memberSettlement)
|
||||
settlementList = it.memberSettlement
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,20 @@
|
||||
package com.yizhuan.erban.earn.adapter;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.yizhuan.erban.R;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class GoldRoomAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
|
||||
|
||||
public GoldRoomAdapter() {
|
||||
super(R.layout.item_gold_room_popwindow);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(@NotNull BaseViewHolder helper, String item) {
|
||||
helper.setText(R.id.tv_content, item);
|
||||
}
|
||||
|
||||
}
|
@@ -15,11 +15,14 @@ import com.yizhuan.erban.home.adapter.HomeChatAdapter
|
||||
import com.yizhuan.erban.home.adapter.HomeHotAdapter
|
||||
import com.yizhuan.erban.home.helper.BannerHelper
|
||||
import com.yizhuan.erban.home.helper.OpenRoomHelper
|
||||
import com.yizhuan.xchat_android_core.Constants
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel
|
||||
import com.yizhuan.xchat_android_core.home.bean.HomeRoomInfo
|
||||
import com.yizhuan.xchat_android_core.home.event.RefreshHomeDataEvent
|
||||
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.user.event.LoginUserInfoUpdateEvent
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import org.greenrobot.eventbus.Subscribe
|
||||
@@ -63,12 +66,6 @@ class RecommendFragment : BaseViewBindingFragment<FragmentRecommendBinding>() {
|
||||
}
|
||||
}
|
||||
|
||||
val userInfo = UserModel.get().cacheLoginUserInfo
|
||||
if (userInfo?.isHasPermitRoom == true) {
|
||||
binding.ivGameGuide.visibility = View.GONE
|
||||
} else {
|
||||
binding.ivGameGuide.visibility = View.VISIBLE
|
||||
}
|
||||
binding.ivGameGuide.setOnClickListener {
|
||||
CreateRoomDialog().apply { setGameVisible() }.show(context)
|
||||
}
|
||||
@@ -151,6 +148,16 @@ class RecommendFragment : BaseViewBindingFragment<FragmentRecommendBinding>() {
|
||||
homeViewModel.getHotRoom()
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
fun onLoginUserInfoUpdateEvent(event: LoginUserInfoUpdateEvent?) {
|
||||
val userInfo = UserModel.get().cacheLoginUserInfo
|
||||
if (userInfo?.isHasPermitRoom == true) {
|
||||
binding.ivGameGuide.visibility = View.GONE
|
||||
} else {
|
||||
binding.ivGameGuide.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
fun onRefreshHomeDataEvent(event: RefreshHomeDataEvent?) {
|
||||
if (isResumed) {
|
||||
|
@@ -26,7 +26,7 @@ import com.yizhuan.xchat_android_library.utils.TextWatcherWrapper;
|
||||
*/
|
||||
public class BindPhoneActivity extends BaseActivity implements View.OnClickListener {
|
||||
|
||||
private static final String TAG = "LoginPhoneActivity";
|
||||
private static final String TAG = "BindPhoneActivity";
|
||||
|
||||
private EditText accountEt;
|
||||
private Button btnNext;
|
||||
|
@@ -79,6 +79,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
findViewById(R.id.tv_facebook).setOnClickListener(this);
|
||||
findViewById(R.id.tv_line).setOnClickListener(this);
|
||||
findViewById(R.id.tv_google).setOnClickListener(this);
|
||||
findViewById(R.id.tv_phone).setOnClickListener(this);
|
||||
findViewById(R.id.tv_others).setOnClickListener(this);
|
||||
}
|
||||
|
||||
@@ -216,6 +217,9 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
}
|
||||
});
|
||||
|
||||
break;
|
||||
case R.id.tv_phone:
|
||||
|
||||
break;
|
||||
case R.id.tv_others:
|
||||
LoginPasswordActivity.start(LoginActivity.this);
|
||||
|
@@ -1,174 +0,0 @@
|
||||
package com.yizhuan.erban.ui.login;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.netease.nim.uikit.StatusBarUtil;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.base.BaseActivity;
|
||||
import com.yizhuan.xchat_android_core.auth.event.LoginEvent;
|
||||
import com.yizhuan.xchat_android_library.utils.NetworkUtils;
|
||||
import com.yizhuan.xchat_android_library.utils.TextWatcherWrapper;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
/**
|
||||
* @author zhouxiangfeng
|
||||
* @date 17/2/26
|
||||
*/
|
||||
public class LoginPhoneActivity extends BaseActivity implements View.OnClickListener {
|
||||
|
||||
private static final String TAG = "LoginPhoneActivity";
|
||||
|
||||
private EditText accountEt;
|
||||
private Button btnNext;
|
||||
private ImageView ivBack;
|
||||
|
||||
private AccountValidator accountValidator = new AccountValidator();
|
||||
private TextWatcher textWatcher = new TextWatcherWrapper() {
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
checkInput();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
public static void start(Context context) {
|
||||
Intent intent = new Intent(context, LoginPhoneActivity.class);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
public static void startForResult(Activity context, int requestCode) {
|
||||
Intent intent = new Intent(context, LoginPhoneActivity.class);
|
||||
context.startActivityForResult(intent, requestCode); //
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_login_phone);
|
||||
EventBus.getDefault().register(this);
|
||||
onFindViews();
|
||||
onSetListener();
|
||||
|
||||
accountEt.setFocusable(true);
|
||||
accountEt.setFocusableInTouchMode(true);
|
||||
accountEt.requestFocus();
|
||||
this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
|
||||
|
||||
}
|
||||
|
||||
private void onFindViews() {
|
||||
accountEt = findViewById(R.id.et_account);
|
||||
btnNext = findViewById(R.id.btn_next);
|
||||
ivBack = findViewById(R.id.iv_back);
|
||||
}
|
||||
|
||||
private void onSetListener() {
|
||||
btnNext.setOnClickListener(this);
|
||||
btnNext.setEnabled(false);
|
||||
accountEt.addTextChangedListener(textWatcher);
|
||||
ivBack.setOnClickListener(this);
|
||||
findViewById(R.id.tv_password_login).setOnClickListener(v -> LoginPasswordActivity.start(this));
|
||||
}
|
||||
|
||||
private void checkInput() {
|
||||
if (!TextUtils.isEmpty(accountEt.getText().toString()) && accountEt.getText().toString().length() >= 7) {
|
||||
btnNext.setEnabled(true);
|
||||
} else {
|
||||
btnNext.setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.btn_next:
|
||||
if (!NetworkUtils.isNetworkStrictlyAvailable(this)) {
|
||||
checkNetToast();
|
||||
return;
|
||||
}
|
||||
if (!accountValidator.isValid(accountEt.getText().toString())) {
|
||||
toast(accountValidator.getErrorMessage());
|
||||
return;
|
||||
}
|
||||
LoginCodeActivity.start(LoginPhoneActivity.this, accountEt.getText().toString());
|
||||
break;
|
||||
|
||||
case R.id.iv_back:
|
||||
handleFinish();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean needSteepStateBar() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setStatusBar() {
|
||||
StatusBarUtil.transparencyBar(this);
|
||||
StatusBarUtil.StatusBarLightMode(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
accountEt = null;
|
||||
super.onDestroy();
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
View view = getCurrentFocus();
|
||||
boolean isPressEdit = false;
|
||||
if (view instanceof EditText) {
|
||||
if (event.getRawX() >= view.getX() && event.getRawX() <= view.getX() + view.getWidth() && event.getRawY() >= view.getY() && event.getRawY() <= view.getY() + view.getHeight()) {
|
||||
isPressEdit = true;
|
||||
}
|
||||
}
|
||||
if (!isPressEdit) {
|
||||
hideIME();
|
||||
}
|
||||
return super.onTouchEvent(event);
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册成功后发送过来的事件
|
||||
*/
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onLoginEvent(LoginEvent event) {
|
||||
getDialogManager().dismissDialog();
|
||||
setResult(RESULT_OK);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
handleFinish();
|
||||
}
|
||||
|
||||
private void handleFinish() {
|
||||
finish();
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 4.3 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_login_phone.webp
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_login_phone.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 530 B |
11
app/src/main/res/drawable/bg_ffffff_8_stroke_1.xml
Normal file
11
app/src/main/res/drawable/bg_ffffff_8_stroke_1.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<corners android:radius="@dimen/dp_8"/>
|
||||
|
||||
<stroke android:color="@color/color_F7F7F7" android:width="1dp"/>
|
||||
|
||||
<solid android:color="@color/color_FFFFFF"/>
|
||||
|
||||
</shape>
|
@@ -116,6 +116,7 @@
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvBelongRoom"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/belong_room"
|
||||
|
@@ -47,7 +47,7 @@
|
||||
android:background="@drawable/shape_white_top_25dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="-20dp"
|
||||
android:layout_marginTop="-80dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/view_bg_top"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
@@ -58,13 +58,14 @@
|
||||
android:layout_height="63dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:background="@drawable/shape_login_btn_bg"
|
||||
android:drawableStart="@drawable/ic_login_facebook"
|
||||
android:drawablePadding="35dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="25dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/login_facebook"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="16sp" />
|
||||
android:textSize="16sp"
|
||||
app:drawableStartCompat="@drawable/ic_login_facebook" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_line"
|
||||
@@ -72,13 +73,14 @@
|
||||
android:layout_height="63dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:background="@drawable/shape_login_btn_bg"
|
||||
android:drawableStart="@drawable/ic_login_line"
|
||||
android:drawablePadding="35dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="25dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/login_line"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="16sp" />
|
||||
android:textSize="16sp"
|
||||
app:drawableStartCompat="@drawable/ic_login_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_google"
|
||||
@@ -95,6 +97,21 @@
|
||||
android:textSize="16sp"
|
||||
app:drawableStartCompat="@drawable/ic_login_google" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_phone"
|
||||
android:layout_width="308dp"
|
||||
android:layout_height="63dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:background="@drawable/shape_login_btn_bg"
|
||||
android:drawablePadding="35dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="25dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/login_phone"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="16sp"
|
||||
app:drawableStartCompat="@drawable/ic_login_phone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_others"
|
||||
android:layout_width="wrap_content"
|
||||
|
@@ -1,109 +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">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:padding="@dimen/dp_17"
|
||||
android:src="@drawable/arrow_left"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_password_login"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="75dp"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:text="@string/layout_activity_login_phone_01"
|
||||
android:textColor="@color/text_secondary_4f516a"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="140dp"
|
||||
android:text="@string/layout_activity_login_phone_02"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="@dimen/text_size_18"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:text="@string/layout_activity_login_phone_03"
|
||||
android:textColor="@color/text_secondary_4f516a"
|
||||
android:textSize="11sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_account"
|
||||
android:layout_width="270dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="70dp"
|
||||
android:background="@drawable/bg_common_edit"
|
||||
android:baselineAligned="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_title">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
android:text="+86"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="@dimen/sp_15" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/et_account"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="33dp"
|
||||
android:background="@null"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
android:inputType="number"
|
||||
android:maxLength="11"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="@dimen/dp_15"
|
||||
tools:ignore="SpUsage"
|
||||
tools:text="123456" />
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_next"
|
||||
android:layout_width="270dp"
|
||||
android:layout_height="@dimen/dp_45"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/bg_common_confirm"
|
||||
android:enabled="false"
|
||||
android:gravity="center"
|
||||
android:text="@string/layout_activity_login_phone_04"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll_account" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
14
app/src/main/res/layout/item_gold_room_popwindow.xml
Normal file
14
app/src/main/res/layout/item_gold_room_popwindow.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/tv_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/color_white"
|
||||
android:paddingTop="@dimen/dp_4"
|
||||
android:paddingBottom="@dimen/dp_4"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textColor="@color/color_1F1A4E"
|
||||
android:textSize="@dimen/sp_14"
|
||||
tools:text="测试测试测试按时发萨法沙发沙发是发萨法沙发沙发时发生发撒发生" />
|
18
app/src/main/res/layout/layout_belong_room_view.xml
Normal file
18
app/src/main/res/layout/layout_belong_room_view.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?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"
|
||||
android:background="@drawable/bg_ffffff_8_stroke_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/mRecyclerView"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
|
||||
</FrameLayout>
|
@@ -19,6 +19,7 @@
|
||||
<string name="login_facebook">Facebook登錄</string>
|
||||
<string name="login_line">Line登錄</string>
|
||||
<string name="login_google">Google登錄</string>
|
||||
<string name="login_phone">手機號登錄</string>
|
||||
<string name="login_account">賬號登錄</string>
|
||||
<string name="login_select_other_login_type">選擇其他方式登錄</string>
|
||||
<string name="login_agree_with_the_protocol">同意隱私政策和用戶協議後,才可以註冊登錄哦~</string>
|
||||
|
@@ -41,7 +41,7 @@ object EarnModel : BaseModel() {
|
||||
api.getConfigWithdrawInfo()
|
||||
}
|
||||
|
||||
suspend fun exchange(goldNum: Long, payPwd: String): Any? =
|
||||
suspend fun exchange(goldNum: Double, payPwd: String): Any? =
|
||||
launchRequest {
|
||||
api.exchange(goldNum, payPwd)
|
||||
}
|
||||
@@ -111,7 +111,7 @@ object EarnModel : BaseModel() {
|
||||
*/
|
||||
@POST("/withdraw/exchange")
|
||||
suspend fun exchange(
|
||||
@Query("goldNum") goldNum: Long,
|
||||
@Query("goldNum") goldNum: Double,
|
||||
@Query("payPwd") payPwd: String
|
||||
): ServiceResult<Any>
|
||||
|
||||
|
Reference in New Issue
Block a user