删除提现、转赠、支付密码相关
This commit is contained in:
@@ -303,10 +303,6 @@
|
|||||||
android:name=".home.activity.CollectionRoomActivity"
|
android:name=".home.activity.CollectionRoomActivity"
|
||||||
android:label="@string/main_androidmanifest_019"
|
android:label="@string/main_androidmanifest_019"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
<activity
|
|
||||||
android:name=".ui.wallet.ExchangeGoldActivity"
|
|
||||||
android:label="@string/main_androidmanifest_020"
|
|
||||||
android:screenOrientation="portrait" />
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.setting.SettingActivity"
|
android:name=".ui.setting.SettingActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
@@ -316,18 +312,6 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".ui.relation.FansListActivity"
|
android:name=".ui.relation.FansListActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
<activity
|
|
||||||
android:name=".ui.withdraw.WithdrawActivity"
|
|
||||||
android:screenOrientation="portrait" />
|
|
||||||
<activity
|
|
||||||
android:name=".ui.withdraw.bankcard.BindWithdrawBankCardActivity"
|
|
||||||
android:screenOrientation="portrait" />
|
|
||||||
<activity
|
|
||||||
android:name=".ui.withdraw.WithdrawRuleActivity"
|
|
||||||
android:screenOrientation="portrait" />
|
|
||||||
<activity
|
|
||||||
android:name=".ui.withdraw.BinderAlipayActivity"
|
|
||||||
android:screenOrientation="portrait" />
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.user.activity.AboutActivity"
|
android:name=".ui.user.activity.AboutActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
@@ -728,26 +712,6 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name="com.example.matisse.internal.ui.SelectedPreviewActivity"
|
android:name="com.example.matisse.internal.ui.SelectedPreviewActivity"
|
||||||
android:screenOrientation="portrait" /> <!-- 房间内私聊 -->
|
android:screenOrientation="portrait" /> <!-- 房间内私聊 -->
|
||||||
<activity
|
|
||||||
android:name=".ui.wallet.sendgold.SendGoldActivity"
|
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
|
||||||
<activity
|
|
||||||
android:name=".pay.activity.GiveGoldActivity"
|
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
|
||||||
<activity
|
|
||||||
android:name=".pay.activity.GiveGoldDetailActivity"
|
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
|
||||||
<activity
|
|
||||||
android:name=".pay.activity.GiveGoldToUserActivity"
|
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:windowSoftInputMode="adjustPan" />
|
|
||||||
<activity
|
|
||||||
android:name=".pay.activity.GiveGoldSearchActivity"
|
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.setting.PrivacySettingActivity"
|
android:name=".ui.setting.PrivacySettingActivity"
|
||||||
android:screenOrientation="portrait" /> <!-- 银行卡列表 -->
|
android:screenOrientation="portrait" /> <!-- 银行卡列表 -->
|
||||||
@@ -802,9 +766,6 @@
|
|||||||
android:name=".avroom.singleroompk.SingleRoomPKSearchActivity"
|
android:name=".avroom.singleroompk.SingleRoomPKSearchActivity"
|
||||||
android:theme="@style/dialog_web_view_activity"
|
android:theme="@style/dialog_web_view_activity"
|
||||||
android:windowSoftInputMode="adjustPan" />
|
android:windowSoftInputMode="adjustPan" />
|
||||||
<activity
|
|
||||||
android:name=".avroom.firstcharge.FirstChargeDialog"
|
|
||||||
android:theme="@style/dialogactivity" />
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.setting.GrantedPermissionsActivity"
|
android:name=".ui.setting.GrantedPermissionsActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
@@ -872,11 +833,6 @@
|
|||||||
android:configChanges="screenSize|orientation|keyboardHidden|mcc|mnc|locale|touchscreen|screenLayout|keyboard|navigation|fontScale|uiMode|smallestScreenSize|layoutDirection"
|
android:configChanges="screenSize|orientation|keyboardHidden|mcc|mnc|locale|touchscreen|screenLayout|keyboard|navigation|fontScale|uiMode|smallestScreenSize|layoutDirection"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
<activity
|
|
||||||
android:name=".earn.activity.EarnWithdrawActivity"
|
|
||||||
android:configChanges="screenSize|orientation|keyboardHidden|mcc|mnc|locale|touchscreen|screenLayout|keyboard|navigation|fontScale|uiMode|smallestScreenSize|layoutDirection"
|
|
||||||
android:exported="false"
|
|
||||||
android:screenOrientation="portrait" /> <!-- com.chwl.core.skill -->
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".earn.activity.BindWithdrawMsgActivity"
|
android:name=".earn.activity.BindWithdrawMsgActivity"
|
||||||
android:configChanges="screenSize|orientation|keyboardHidden|mcc|mnc|locale|touchscreen|screenLayout|keyboard|navigation|fontScale|uiMode|smallestScreenSize|layoutDirection"
|
android:configChanges="screenSize|orientation|keyboardHidden|mcc|mnc|locale|touchscreen|screenLayout|keyboard|navigation|fontScale|uiMode|smallestScreenSize|layoutDirection"
|
||||||
|
@@ -11,12 +11,7 @@ import com.chwl.app.base.BaseViewBindingActivity
|
|||||||
import com.chwl.app.databinding.ActivityEarnRecordBinding
|
import com.chwl.app.databinding.ActivityEarnRecordBinding
|
||||||
import com.chwl.app.earn.EarnRecordViewModel
|
import com.chwl.app.earn.EarnRecordViewModel
|
||||||
import com.chwl.app.ui.pay.ChargeActivity
|
import com.chwl.app.ui.pay.ChargeActivity
|
||||||
import com.chwl.app.ui.webview.CommonWebViewActivity
|
|
||||||
import com.chwl.core.Constants
|
|
||||||
import com.chwl.core.UriProvider
|
|
||||||
import com.chwl.core.earn.bean.RoomTypeInfo
|
import com.chwl.core.earn.bean.RoomTypeInfo
|
||||||
import com.chwl.library.common.util.DeviceUtil
|
|
||||||
import com.chwl.library.utils.AppMetaDataUtil
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* author: wushaocheng
|
* author: wushaocheng
|
||||||
@@ -52,12 +47,6 @@ class EarnRecordActivity : BaseViewBindingActivity<ActivityEarnRecordBinding>(),
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
earnRecordModel.getConfigWithdrawLiveData.observe(this) {
|
|
||||||
it?.let {
|
|
||||||
EarnWithdrawActivity.start(this, it)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
earnRecordModel.queryRoomTypeLiveData.observe(this) {
|
earnRecordModel.queryRoomTypeLiveData.observe(this) {
|
||||||
it?.let {
|
it?.let {
|
||||||
roomTypeInfo = it
|
roomTypeInfo = it
|
||||||
|
@@ -1,175 +0,0 @@
|
|||||||
package com.chwl.app.earn.activity
|
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import android.content.Intent
|
|
||||||
import android.text.Editable
|
|
||||||
import android.text.TextWatcher
|
|
||||||
import android.view.View
|
|
||||||
import androidx.activity.viewModels
|
|
||||||
import com.jungly.gridpasswordview.GridPasswordView
|
|
||||||
import com.netease.nim.uikit.StatusBarUtil
|
|
||||||
import com.chwl.app.R
|
|
||||||
import com.chwl.app.base.BaseViewBindingActivity
|
|
||||||
import com.chwl.app.databinding.ActivityEarnWithdrawBinding
|
|
||||||
import com.chwl.app.earn.EarnRecordViewModel
|
|
||||||
import com.chwl.app.pay.password.GiveGoldPassWordFragment
|
|
||||||
import com.chwl.app.pay.widget.GridPasswordNoFocusView
|
|
||||||
import com.chwl.app.ui.setting.ModifyPwdActivity
|
|
||||||
import com.chwl.app.ui.webview.CommonWebViewActivity
|
|
||||||
import com.chwl.app.ui.widget.dialog.CommonTipDialog
|
|
||||||
import com.chwl.core.UriProvider
|
|
||||||
import com.chwl.core.earn.bean.ConfigWithdrawInfo
|
|
||||||
import com.chwl.core.user.UserModel
|
|
||||||
import com.chwl.library.utils.ResUtil
|
|
||||||
|
|
||||||
/**
|
|
||||||
* author: wushaocheng
|
|
||||||
* time: 2022/11/18
|
|
||||||
* desc: 提现
|
|
||||||
*/
|
|
||||||
class EarnWithdrawActivity : BaseViewBindingActivity<ActivityEarnWithdrawBinding>(),
|
|
||||||
GridPasswordNoFocusView.OnPasswordChangedListener {
|
|
||||||
|
|
||||||
private val earnRecordModel: EarnRecordViewModel by viewModels()
|
|
||||||
|
|
||||||
private var passWordFragment: GiveGoldPassWordFragment? = null
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
|
|
||||||
const val BEAN = "bean"
|
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
fun start(context: Context, configWithdrawInfo: ConfigWithdrawInfo) {
|
|
||||||
val starter = Intent(context, EarnWithdrawActivity::class.java)
|
|
||||||
starter.putExtra(BEAN, configWithdrawInfo)
|
|
||||||
context.startActivity(starter)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun init() {
|
|
||||||
initTitleBar(getString(R.string.withdraw))
|
|
||||||
val bean = intent.getSerializableExtra(BEAN) as? ConfigWithdrawInfo
|
|
||||||
bean?.let {
|
|
||||||
binding.tvMyGold.text = getString(R.string.my_gold, it.golds.toString())
|
|
||||||
binding.tvWithdrawNum.text = it.remainTimes.toString()
|
|
||||||
it.account?.let { account ->
|
|
||||||
binding.groupBind.visibility = View.VISIBLE
|
|
||||||
binding.tvNoWithdraw.visibility = View.GONE
|
|
||||||
binding.tvSwift.text = getString(R.string.swift_code, account.swift)
|
|
||||||
binding.tvBankName.text = getString(R.string.bank_name, account.bankName)
|
|
||||||
} ?: run {
|
|
||||||
binding.groupBind.visibility = View.GONE
|
|
||||||
binding.tvNoWithdraw.visibility = View.VISIBLE
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.edGold.addTextChangedListener(object : TextWatcher {
|
|
||||||
override fun beforeTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun afterTextChanged(p0: Editable?) {
|
|
||||||
binding.tvWithdraw.isEnabled =
|
|
||||||
it.account != null && p0.toString().isNotEmpty() && it.remainTimes > 0
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
earnRecordModel.loadingLiveData.observe(this) { loading ->
|
|
||||||
if (loading) dialogManager.showProgressDialog(this)
|
|
||||||
else dialogManager.dismissDialog()
|
|
||||||
}
|
|
||||||
|
|
||||||
earnRecordModel.exchangeLiveData.observe(this) { exchange ->
|
|
||||||
passWordFragment?.dismissAllowingStateLoss()
|
|
||||||
toast(getString(R.string.withdraw_success))
|
|
||||||
finish()
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.csWithdrawAccount.setOnClickListener { view ->
|
|
||||||
BindWithdrawMsgActivity.start(this, it.account)
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.tvWithdrawRecord.setOnClickListener {
|
|
||||||
CommonWebViewActivity.start(context, UriProvider.getWithdrawRecord())
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.tvAll.setOnClickListener { view ->
|
|
||||||
if (it.golds.toLong() < it.maxGolds) {
|
|
||||||
binding.edGold.setText(String.format(it.golds.toString()))
|
|
||||||
} else {
|
|
||||||
binding.edGold.setText(String.format(it.maxGolds.toString()))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.tvWithdraw.setOnClickListener { view ->
|
|
||||||
UserModel.get().cacheLoginUserInfo?.let { userInfo ->
|
|
||||||
if (!userInfo.isBindPaymentPwd) {
|
|
||||||
val tipDialog = CommonTipDialog(this@EarnWithdrawActivity)
|
|
||||||
tipDialog.setTipMsg(ResUtil.getString(R.string.setting_pay_pwd_first))
|
|
||||||
tipDialog.setOkText(getString(R.string.to_setting))
|
|
||||||
tipDialog.setOnActionListener(
|
|
||||||
object : CommonTipDialog.OnActionListener {
|
|
||||||
override fun onOk() {
|
|
||||||
ModifyPwdActivity.start(
|
|
||||||
this@EarnWithdrawActivity,
|
|
||||||
ModifyPwdActivity.PAY_PWD
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
tipDialog.show()
|
|
||||||
} else if (binding.edGold.text.toString().toDouble() < it.minGolds.toString()
|
|
||||||
.toDouble()
|
|
||||||
) {
|
|
||||||
toast("至少需要提現${it.minGolds}金幣")
|
|
||||||
} else if (binding.edGold.text.toString().toDouble() > it.maxGolds.toString()
|
|
||||||
.toDouble()
|
|
||||||
) {
|
|
||||||
toast("提現不能超過${it.maxGolds}金幣")
|
|
||||||
} else {
|
|
||||||
GiveGoldPassWordFragment.newInstance(
|
|
||||||
supportFragmentManager,
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
""
|
|
||||||
)
|
|
||||||
.apply {
|
|
||||||
passWordFragment = this
|
|
||||||
setListener(this@EarnWithdrawActivity)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} ?: run {
|
|
||||||
toast(ResUtil.getString(R.string.ui_setting_settingactivity_06))
|
|
||||||
return@setOnClickListener
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun needSteepStateBar() = true
|
|
||||||
|
|
||||||
override fun setStatusBar() {
|
|
||||||
super.setStatusBar()
|
|
||||||
StatusBarUtil.transparencyBar(this)
|
|
||||||
StatusBarUtil.StatusBarLightMode(this)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onTextChanged(psw: String?) {
|
|
||||||
val password = passWordFragment?.password?.password ?: ""
|
|
||||||
if (password.length == 6) {
|
|
||||||
earnRecordModel.exchange(
|
|
||||||
binding.edGold.text.toString().toDouble(), DESAndBase64(password)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onInputFinish(psw: String?) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -1,68 +0,0 @@
|
|||||||
package com.chwl.app.pay
|
|
||||||
|
|
||||||
import androidx.lifecycle.MutableLiveData
|
|
||||||
import com.chwl.app.base.BaseViewModel
|
|
||||||
import com.chwl.core.bean.response.ListResult
|
|
||||||
import com.chwl.core.home.model.HomeModel
|
|
||||||
import com.chwl.core.user.bean.DiamondGiveHistoryInfo
|
|
||||||
import com.chwl.core.user.bean.SearchUserInfo
|
|
||||||
|
|
||||||
class GiveGoldModel : BaseViewModel() {
|
|
||||||
|
|
||||||
private val _diamondGiveHistoryLiveData = MutableLiveData<ListResult<DiamondGiveHistoryInfo>?>()
|
|
||||||
val diamondGiveHistoryLiveData: MutableLiveData<ListResult<DiamondGiveHistoryInfo>?> =
|
|
||||||
_diamondGiveHistoryLiveData
|
|
||||||
|
|
||||||
private val _searchUserLiveData = MutableLiveData<SearchUserInfo?>()
|
|
||||||
val searchUserLiveData: MutableLiveData<SearchUserInfo?> = _searchUserLiveData
|
|
||||||
|
|
||||||
private val _giveGiftLiveData = MutableLiveData<String?>()
|
|
||||||
val giveGiftLiveData: MutableLiveData<String?> = _giveGiftLiveData
|
|
||||||
|
|
||||||
private val _giveDetailLiveData = MutableLiveData<ListResult<DiamondGiveHistoryInfo>?>()
|
|
||||||
val giveDetailLiveData: MutableLiveData<ListResult<DiamondGiveHistoryInfo>?> =
|
|
||||||
_giveDetailLiveData
|
|
||||||
|
|
||||||
fun getDiamondListInfo(pageNum: Int, pageSize: Int) {
|
|
||||||
safeLaunch(
|
|
||||||
onError = {
|
|
||||||
_diamondGiveHistoryLiveData.value = ListResult.failed(pageNum)
|
|
||||||
},
|
|
||||||
block = {
|
|
||||||
val result = HomeModel.getDiamondGiveHistory(pageNum, pageSize)
|
|
||||||
_diamondGiveHistoryLiveData.value = ListResult.success(result, pageNum)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun getSearchUserInfo(erbanNo: Long) {
|
|
||||||
safeLaunch(
|
|
||||||
true,
|
|
||||||
block = {
|
|
||||||
_searchUserLiveData.value = HomeModel.getSearchUser(erbanNo)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun giveGift(toUid: Long, giftId: Int, giftNum: Int) {
|
|
||||||
safeLaunch(
|
|
||||||
true,
|
|
||||||
block = {
|
|
||||||
_giveGiftLiveData.value = HomeModel.giveGift(toUid, giftId, giftNum)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun giveDetailInfo(uid: Long, type: Int, pageNum: Int, pageSize: Int) {
|
|
||||||
safeLaunch(
|
|
||||||
onError = {
|
|
||||||
_giveDetailLiveData.value = ListResult.failed(pageNum)
|
|
||||||
},
|
|
||||||
block = {
|
|
||||||
val result = HomeModel.getGiveDetail(uid, type, pageNum, pageSize)
|
|
||||||
_giveDetailLiveData.value = ListResult.success(result, pageNum)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -1,129 +0,0 @@
|
|||||||
package com.chwl.app.pay.activity
|
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
|
||||||
import android.content.Context
|
|
||||||
import android.content.Intent
|
|
||||||
import android.text.TextUtils
|
|
||||||
import android.view.KeyEvent
|
|
||||||
import android.view.inputmethod.EditorInfo
|
|
||||||
import android.widget.TextView.OnEditorActionListener
|
|
||||||
import androidx.activity.viewModels
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
|
||||||
import com.netease.nim.uikit.StatusBarUtil
|
|
||||||
import com.chwl.app.R
|
|
||||||
import com.chwl.app.base.BaseViewBindingActivity
|
|
||||||
import com.chwl.app.common.EmptyViewHelper
|
|
||||||
import com.chwl.app.databinding.ActivityGiveGoldBinding
|
|
||||||
import com.chwl.app.pay.GiveGoldModel
|
|
||||||
import com.chwl.app.pay.adapter.LatelyGiveAdapter
|
|
||||||
import com.chwl.app.ui.utils.RVDelegate
|
|
||||||
import com.chwl.core.gift.GiftModel
|
|
||||||
import com.chwl.core.user.bean.DiamondGiveHistoryInfo
|
|
||||||
import com.chwl.library.utils.ResUtil
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 轉贈鉆石頁面
|
|
||||||
*/
|
|
||||||
class GiveGoldActivity : BaseViewBindingActivity<ActivityGiveGoldBinding>() {
|
|
||||||
|
|
||||||
private var pageNum: Int = 1
|
|
||||||
private val pageSize = 20
|
|
||||||
private lateinit var mAdapter: LatelyGiveAdapter
|
|
||||||
private lateinit var rvDelegate: RVDelegate<DiamondGiveHistoryInfo>
|
|
||||||
|
|
||||||
private val giveGoldModel: GiveGoldModel by viewModels()
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
fun start(context: Context) {
|
|
||||||
val intent = Intent(context, GiveGoldActivity::class.java)
|
|
||||||
context.startActivity(intent)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun init() {
|
|
||||||
initTitleBar(ResUtil.getString(R.string.me_donation))
|
|
||||||
binding.etSearch.setOnEditorActionListener(OnEditorActionListener { v, actionId, event -> //以下方法防止两次发送请求
|
|
||||||
if (actionId == EditorInfo.IME_ACTION_SEARCH && event != null || event != null && event.keyCode == KeyEvent.KEYCODE_ENTER) {
|
|
||||||
if (event.action == KeyEvent.ACTION_UP) { //发送请求
|
|
||||||
val newStr: String = binding.etSearch.text.toString().trim { it <= ' ' }
|
|
||||||
if (!TextUtils.isEmpty(newStr)) {
|
|
||||||
giveGoldModel.getSearchUserInfo(newStr.toLong())
|
|
||||||
}else{
|
|
||||||
toast(getString(R.string.password_input_user_id))
|
|
||||||
}
|
|
||||||
return@OnEditorActionListener true //自己消费
|
|
||||||
}
|
|
||||||
return@OnEditorActionListener true
|
|
||||||
}
|
|
||||||
false
|
|
||||||
})
|
|
||||||
binding.mTvSearch.setOnClickListener {
|
|
||||||
val newStr: String = binding.etSearch.text.toString().trim { it <= ' ' }
|
|
||||||
if (!TextUtils.isEmpty(newStr)) {
|
|
||||||
giveGoldModel.getSearchUserInfo(newStr.toLong())
|
|
||||||
} else {
|
|
||||||
toast(getString(R.string.password_input_user_id))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
mAdapter = LatelyGiveAdapter()
|
|
||||||
rvDelegate = RVDelegate.Builder<DiamondGiveHistoryInfo>()
|
|
||||||
.setAdapter(mAdapter)
|
|
||||||
.setLayoutManager(LinearLayoutManager(this))
|
|
||||||
.setPageSize(20)
|
|
||||||
.setEmptyView(
|
|
||||||
EmptyViewHelper.createEmptyTextView(
|
|
||||||
this,
|
|
||||||
ResUtil.getString(R.string.me_give_gold_empty)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.setRefreshLayout(binding.refreshLayout)
|
|
||||||
.setRecyclerView(binding.recyclerView)
|
|
||||||
.build()
|
|
||||||
mAdapter.setOnItemClickListener { _, _, position ->
|
|
||||||
mAdapter.getItem(position)?.targetUid?.let { GiveGoldDetailActivity.start(this, it) }
|
|
||||||
}
|
|
||||||
mAdapter.setOnLoadMoreListener({
|
|
||||||
loadData(false)
|
|
||||||
}, binding.recyclerView)
|
|
||||||
binding.refreshLayout.setOnRefreshListener {
|
|
||||||
loadData(true)
|
|
||||||
}
|
|
||||||
giveGoldModel.diamondGiveHistoryLiveData.observe(this) {
|
|
||||||
rvDelegate.loadData(it)
|
|
||||||
}
|
|
||||||
giveGoldModel.searchUserLiveData.observe(this) {
|
|
||||||
it?.let {
|
|
||||||
GiveGoldToUserActivity.start(this, it)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
giveGoldModel.loadingLiveData.observe(this) {
|
|
||||||
if (it) dialogManager.showProgressDialog(this)
|
|
||||||
else dialogManager.dismissDialog()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onResume() {
|
|
||||||
super.onResume()
|
|
||||||
loadData(true)
|
|
||||||
GiftModel.get().requestKnapGiftInfos().subscribe()
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressLint("CheckResult")
|
|
||||||
fun loadData(isRefresh: Boolean) {
|
|
||||||
binding.refreshLayout.isRefreshing = isRefresh
|
|
||||||
pageNum = if (isRefresh) 1 else (pageNum + 1)
|
|
||||||
giveGoldModel.getDiamondListInfo(pageNum, pageSize)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun setStatusBar() {
|
|
||||||
super.setStatusBar()
|
|
||||||
StatusBarUtil.transparencyBar(this)
|
|
||||||
StatusBarUtil.StatusBarLightMode(this)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun needSteepStateBar(): Boolean {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -1,115 +0,0 @@
|
|||||||
package com.chwl.app.pay.activity
|
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import android.content.Intent
|
|
||||||
import android.view.View
|
|
||||||
import android.widget.LinearLayout
|
|
||||||
import android.widget.TextView
|
|
||||||
import androidx.fragment.app.Fragment
|
|
||||||
import androidx.viewpager.widget.ViewPager
|
|
||||||
import com.netease.nim.uikit.StatusBarUtil
|
|
||||||
import com.chwl.app.R
|
|
||||||
import com.chwl.app.base.BaseViewBindingActivity
|
|
||||||
import com.chwl.app.databinding.ActivityGiveGoldDetailBinding
|
|
||||||
import com.chwl.app.pay.fragment.GiveDiamondFragment
|
|
||||||
import com.chwl.app.pay.fragment.GiveGiftFragment
|
|
||||||
import com.chwl.app.ui.user.adapter.CommonWrapIndicatorAdapter
|
|
||||||
import com.chwl.app.ui.user.adapter.UserInfoPagerAdapter
|
|
||||||
import com.chwl.app.ui.widget.magicindicator.MagicIndicator
|
|
||||||
import com.chwl.app.ui.widget.magicindicator.ViewPagerHelper
|
|
||||||
import com.chwl.app.ui.widget.magicindicator.buildins.commonnavigator.CommonNavigator
|
|
||||||
import com.chwl.core.initial.InitialModel
|
|
||||||
import com.chwl.core.user.UserModel
|
|
||||||
import com.chwl.library.utils.ResUtil
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 轉贈鉆石頁面
|
|
||||||
*/
|
|
||||||
class GiveGoldDetailActivity : BaseViewBindingActivity<ActivityGiveGoldDetailBinding>() {
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
fun start(context: Context, uid: Long) {
|
|
||||||
val intent = Intent(context, GiveGoldDetailActivity::class.java)
|
|
||||||
intent.putExtra("uid", uid)
|
|
||||||
context.startActivity(intent)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun init() {
|
|
||||||
initTitleBar(ResUtil.getString(R.string.me_donation_detail))
|
|
||||||
initDetail()
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 轉贈詳情
|
|
||||||
*/
|
|
||||||
private fun initDetail() {
|
|
||||||
val uid = intent.extras?.getLong("uid", 0L) ?: 0L
|
|
||||||
|
|
||||||
val initInfo = InitialModel.get().cacheInitInfo
|
|
||||||
val userInfo = UserModel.get().cacheLoginUserInfo
|
|
||||||
val diamondList = initInfo?.giveDiamondErbanNoList
|
|
||||||
val giftList = initInfo?.giveGiftErbanNoList
|
|
||||||
val levelSep = userInfo?.userLevelVo?.experLevelSeq ?: 0
|
|
||||||
|
|
||||||
val viewPager: ViewPager = binding.viewPagerDetail
|
|
||||||
val magicIndicator: MagicIndicator = binding.magicIndicator
|
|
||||||
val fragmentList: MutableList<Fragment> = ArrayList()
|
|
||||||
val pagerAdapter = UserInfoPagerAdapter(supportFragmentManager, fragmentList)
|
|
||||||
val tagList: MutableList<String> = ArrayList()
|
|
||||||
if (diamondList?.contains(userInfo?.erbanNo) == true || levelSep >= (initInfo?.giveDiamondExperLevel
|
|
||||||
?: 0)
|
|
||||||
) {
|
|
||||||
tagList.add(getString(R.string.diamond))
|
|
||||||
fragmentList.add(GiveDiamondFragment.newInstance(uid))
|
|
||||||
}
|
|
||||||
if (giftList?.contains(userInfo?.erbanNo) == true || levelSep >= (initInfo?.giveGiftExperLevel
|
|
||||||
?: 0)
|
|
||||||
) {
|
|
||||||
tagList.add(getString(R.string.gift_action))
|
|
||||||
fragmentList.add(GiveGiftFragment.newInstance(uid))
|
|
||||||
}
|
|
||||||
if (tagList.size == 0) {
|
|
||||||
return
|
|
||||||
}else if(tagList.size == 1){
|
|
||||||
binding.magicIndicator.visibility = View.GONE
|
|
||||||
}
|
|
||||||
val commonNavigator = CommonNavigator(context)
|
|
||||||
commonNavigator.isAdjustMode = true//自我调节位置,实现自我平分
|
|
||||||
val magicIndicatorAdapter = CommonWrapIndicatorAdapter(context, tagList)
|
|
||||||
magicIndicatorAdapter.setOnItemSelectListener { position: Int, view: TextView? ->
|
|
||||||
viewPager.currentItem = position
|
|
||||||
}
|
|
||||||
commonNavigator.adapter = magicIndicatorAdapter
|
|
||||||
magicIndicator.navigator = commonNavigator
|
|
||||||
commonNavigator.titleContainer.showDividers = LinearLayout.SHOW_DIVIDER_MIDDLE
|
|
||||||
viewPager.adapter = pagerAdapter
|
|
||||||
ViewPagerHelper.bind(magicIndicator, viewPager)
|
|
||||||
viewPager.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
|
|
||||||
override fun onPageScrolled(
|
|
||||||
position: Int,
|
|
||||||
positionOffset: Float,
|
|
||||||
positionOffsetPixels: Int
|
|
||||||
) {
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onPageSelected(position: Int) {
|
|
||||||
viewPager.requestLayout()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onPageScrollStateChanged(state: Int) {}
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun setStatusBar() {
|
|
||||||
super.setStatusBar()
|
|
||||||
StatusBarUtil.transparencyBar(this)
|
|
||||||
StatusBarUtil.StatusBarLightMode(this)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun needSteepStateBar(): Boolean {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -1,84 +0,0 @@
|
|||||||
package com.chwl.app.pay.activity
|
|
||||||
|
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
|
||||||
import android.app.Activity
|
|
||||||
import android.content.Intent
|
|
||||||
import android.os.Bundle
|
|
||||||
import android.os.Parcelable
|
|
||||||
import android.text.Editable
|
|
||||||
import android.text.TextWatcher
|
|
||||||
import android.widget.EditText
|
|
||||||
import android.widget.TextView
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
|
||||||
import com.chwl.app.R
|
|
||||||
import com.chwl.app.base.BaseActivity
|
|
||||||
import com.chwl.app.common.EmptyViewHelper
|
|
||||||
import com.chwl.app.pay.adapter.GiveSearchAdapter
|
|
||||||
import com.chwl.app.ui.utils.RVDelegate
|
|
||||||
import com.chwl.core.room.bean.SearchRoomInfo
|
|
||||||
import com.chwl.core.room.model.AvRoomModel
|
|
||||||
import com.chwl.core.utils.net.RxHelper
|
|
||||||
import com.chwl.library.utils.ResUtil
|
|
||||||
|
|
||||||
class GiveGoldSearchActivity : BaseActivity(), TextWatcher {
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
const val REQUEST_CODE = 0xff12
|
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
fun start(context: Activity) {
|
|
||||||
val intent = Intent(context, GiveGoldSearchActivity::class.java)
|
|
||||||
context.startActivityForResult(intent, REQUEST_CODE)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private lateinit var rvDelegate: RVDelegate<SearchRoomInfo>
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
setContentView(R.layout.activity_give_gold_search)
|
|
||||||
val adapter = GiveSearchAdapter()
|
|
||||||
rvDelegate = RVDelegate.Builder<SearchRoomInfo>()
|
|
||||||
.setPageSize(Int.MAX_VALUE)
|
|
||||||
.setEmptyView(EmptyViewHelper.createEmptyTextView(this, ResUtil.getString(R.string.pay_activity_givegoldsearchactivity_01)))
|
|
||||||
.setLayoutManager(LinearLayoutManager(this))
|
|
||||||
.setRecyclerView(findViewById(R.id.recyclerView))
|
|
||||||
.setAdapter(adapter)
|
|
||||||
.build()
|
|
||||||
adapter.setOnItemClickListener { _, _, position ->
|
|
||||||
setResult(Activity.RESULT_OK, Intent().apply {
|
|
||||||
adapter.getItem(position)?.let {
|
|
||||||
putExtra("searchRoomInfo", it as Parcelable)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
finish()
|
|
||||||
}
|
|
||||||
findViewById<EditText>(R.id.editSearch).addTextChangedListener(this)
|
|
||||||
findViewById<TextView>(R.id.tvCancel).setOnClickListener { finish() }
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun afterTextChanged(s: Editable?) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressLint("CheckResult")
|
|
||||||
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
|
||||||
if (s.isNullOrEmpty()) {
|
|
||||||
rvDelegate.setNewData(null)
|
|
||||||
} else {
|
|
||||||
AvRoomModel.get()
|
|
||||||
.roomSearch(s.toString())
|
|
||||||
.compose(RxHelper.handleBeanData())
|
|
||||||
.doOnError { rvDelegate.loadErr(true) }
|
|
||||||
.compose(bindToLifecycle())
|
|
||||||
.subscribe { rooms ->
|
|
||||||
rvDelegate.setNewData(rooms)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,33 +0,0 @@
|
|||||||
package com.chwl.app.pay.activity
|
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import android.content.Intent
|
|
||||||
import android.os.Bundle
|
|
||||||
import android.widget.TextView
|
|
||||||
import com.chwl.app.R
|
|
||||||
import com.chwl.app.base.BaseActivity
|
|
||||||
import com.chwl.library.utils.ResUtil
|
|
||||||
|
|
||||||
class GiveGoldSuccessActivity : BaseActivity() {
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
@JvmStatic
|
|
||||||
fun start(context: Context, gold: String, nickname: String) {
|
|
||||||
val intent = Intent(context, GiveGoldSuccessActivity::class.java)
|
|
||||||
intent.putExtra("gold", gold)
|
|
||||||
intent.putExtra("nickname", nickname)
|
|
||||||
context.startActivity(intent)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
setContentView(R.layout.activity_give_gold_success)
|
|
||||||
initTitleBar(ResUtil.getString(R.string.pay_activity_givegoldsuccessactivity_01))
|
|
||||||
findViewById<TextView>(R.id.tvNickname).text = "轉贈給:${intent.getStringExtra("nickname")}"
|
|
||||||
findViewById<TextView>(R.id.tvGold).text = "${intent.getStringExtra("gold")?.toInt()}鉆石"
|
|
||||||
findViewById<TextView>(R.id.tvSure).setOnClickListener { finish() }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@@ -1,401 +0,0 @@
|
|||||||
package com.chwl.app.pay.activity
|
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
|
||||||
import android.content.Context
|
|
||||||
import android.content.Intent
|
|
||||||
import android.text.Editable
|
|
||||||
import android.text.InputFilter
|
|
||||||
import android.text.InputFilter.LengthFilter
|
|
||||||
import android.text.TextWatcher
|
|
||||||
import android.util.SparseArray
|
|
||||||
import android.view.View
|
|
||||||
import android.view.ViewGroup
|
|
||||||
import android.widget.EditText
|
|
||||||
import androidx.activity.viewModels
|
|
||||||
import androidx.recyclerview.widget.GridLayoutManager
|
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
|
||||||
import androidx.viewpager.widget.PagerAdapter
|
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
|
||||||
import com.netease.nim.uikit.StatusBarUtil
|
|
||||||
import com.chwl.app.R
|
|
||||||
import com.chwl.app.base.BaseViewBindingActivity
|
|
||||||
import com.chwl.app.databinding.ActivityGiveGoldToUserBinding
|
|
||||||
import com.chwl.app.pay.GiveGoldModel
|
|
||||||
import com.chwl.app.pay.adapter.GiveGiftAdapter
|
|
||||||
import com.chwl.app.pay.password.GiveGoldPassWordFragment
|
|
||||||
import com.chwl.app.pay.widget.GridPasswordNoFocusView
|
|
||||||
import com.chwl.app.ui.setting.ModifyPwdActivity
|
|
||||||
import com.chwl.app.ui.utils.ImageLoadUtils
|
|
||||||
import com.chwl.app.ui.widget.OnPageSelectedListener
|
|
||||||
import com.chwl.app.ui.widget.dialog.CommonTipDialog
|
|
||||||
import com.chwl.app.ui.widget.dialog.GiveDiamondTipDialog
|
|
||||||
import com.chwl.app.ui.widget.magicindicator.buildins.UIUtil
|
|
||||||
import com.chwl.app.ui.widget.recyclerview.decoration.GridSpacingItemNewDecoration
|
|
||||||
import com.chwl.app.utils.DoubleClickCheckListener
|
|
||||||
import com.chwl.core.DemoCache
|
|
||||||
import com.chwl.core.gift.GiftModel
|
|
||||||
import com.chwl.core.gift.bean.GiftInfo
|
|
||||||
import com.chwl.core.initial.InitialModel
|
|
||||||
import com.chwl.core.pay.PayModel
|
|
||||||
import com.chwl.core.user.UserModel
|
|
||||||
import com.chwl.core.user.bean.SearchUserInfo
|
|
||||||
import com.chwl.library.utils.ResUtil
|
|
||||||
|
|
||||||
class GiveGoldToUserActivity : BaseViewBindingActivity<ActivityGiveGoldToUserBinding>(),
|
|
||||||
GridPasswordNoFocusView.OnPasswordChangedListener,
|
|
||||||
TextWatcher {
|
|
||||||
|
|
||||||
private val giveGoldModel: GiveGoldModel by viewModels()
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
@JvmStatic
|
|
||||||
fun start(context: Context, searchUser: SearchUserInfo) {
|
|
||||||
val intent = Intent(context, GiveGoldToUserActivity::class.java)
|
|
||||||
intent.putExtra("searchUser", searchUser)
|
|
||||||
context.startActivity(intent)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private var searchUserInfo: SearchUserInfo? = null
|
|
||||||
private var passWordFragment: GiveGoldPassWordFragment? = null
|
|
||||||
private var selectGiftPos = -1
|
|
||||||
private var giftAllCount = -1
|
|
||||||
private var giftId = -1
|
|
||||||
|
|
||||||
private var centerIndex = 0
|
|
||||||
|
|
||||||
override fun setStatusBar() {
|
|
||||||
super.setStatusBar()
|
|
||||||
StatusBarUtil.transparencyBar(this)
|
|
||||||
StatusBarUtil.StatusBarLightMode(this)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun needSteepStateBar(): Boolean {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun init() {
|
|
||||||
initTitleBar(ResUtil.getString(R.string.donation_to))
|
|
||||||
searchUserInfo = intent.getSerializableExtra("searchUser") as SearchUserInfo?
|
|
||||||
searchUserInfo?.apply {
|
|
||||||
binding.tvId.text = "ID:${erbanNo}"
|
|
||||||
binding.tvNickname.text = nick
|
|
||||||
ImageLoadUtils.loadAvatar(context, avatar, binding.ivAvatar)
|
|
||||||
}
|
|
||||||
val initInfo = InitialModel.get().cacheInitInfo
|
|
||||||
val userInfo = UserModel.get().cacheLoginUserInfo
|
|
||||||
val diamondList = initInfo?.giveDiamondErbanNoList
|
|
||||||
val giftList = initInfo?.giveGiftErbanNoList
|
|
||||||
val levelSep = userInfo?.userLevelVo?.experLevelSeq ?: 0
|
|
||||||
if (diamondList?.contains(userInfo?.erbanNo) == true || levelSep >= (initInfo?.giveDiamondExperLevel
|
|
||||||
?: 0)
|
|
||||||
) {
|
|
||||||
binding.tvDiamondTab.visibility = View.VISIBLE
|
|
||||||
binding.groupDiamond.visibility = View.VISIBLE
|
|
||||||
} else {
|
|
||||||
binding.tvDiamondTab.visibility = View.GONE
|
|
||||||
binding.groupDiamond.visibility = View.GONE
|
|
||||||
}
|
|
||||||
if (giftList?.contains(userInfo?.erbanNo) == true || levelSep >= (initInfo?.giveGiftExperLevel
|
|
||||||
?: 0)
|
|
||||||
) {
|
|
||||||
binding.tvGiftTab.visibility = View.VISIBLE
|
|
||||||
binding.groupGift.visibility = View.VISIBLE
|
|
||||||
} else {
|
|
||||||
binding.tvGiftTab.visibility = View.GONE
|
|
||||||
binding.groupGift.visibility = View.GONE
|
|
||||||
}
|
|
||||||
binding.viewPagerEntrance.addOnPageChangeListener(object : OnPageSelectedListener() {
|
|
||||||
override fun onPageSelected(position: Int) {
|
|
||||||
centerIndex = position
|
|
||||||
binding.magicIndicatorEntrance.setSelectedPage(position)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
initDiamond()
|
|
||||||
initGift()
|
|
||||||
initListener()
|
|
||||||
giveGoldModel.loadingLiveData.observe(this) {
|
|
||||||
if (it) dialogManager.showProgressDialog(this)
|
|
||||||
else dialogManager.dismissDialog()
|
|
||||||
}
|
|
||||||
giveGoldModel.giveGiftLiveData.observe(this) {
|
|
||||||
toast(getString(R.string.gift_give_success))
|
|
||||||
finish()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun initListener() {
|
|
||||||
binding.tvSure.setOnClickListener {
|
|
||||||
val initInfo = DemoCache.readInitInfo()
|
|
||||||
if (binding.groupDiamond.visibility == View.VISIBLE) {
|
|
||||||
searchUserInfo?.apply {
|
|
||||||
val gold = binding.mEditGold.text.toString().toInt()
|
|
||||||
if (gold <= 0) {
|
|
||||||
toast(ResUtil.getString(R.string.pay_activity_givegoldtouseractivity_06))
|
|
||||||
return@setOnClickListener
|
|
||||||
}
|
|
||||||
UserModel.get().cacheLoginUserInfo?.let {
|
|
||||||
if (!it.isBindPaymentPwd) {
|
|
||||||
val tipDialog = CommonTipDialog(this@GiveGoldToUserActivity)
|
|
||||||
tipDialog.setTipMsg(ResUtil.getString(R.string.setting_pay_pwd_first))
|
|
||||||
tipDialog.setOkText(getString(R.string.to_setting))
|
|
||||||
tipDialog.setOnActionListener(
|
|
||||||
object : CommonTipDialog.OnActionListener {
|
|
||||||
override fun onOk() {
|
|
||||||
ModifyPwdActivity.start(
|
|
||||||
this@GiveGoldToUserActivity,
|
|
||||||
ModifyPwdActivity.PAY_PWD
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
tipDialog.show()
|
|
||||||
} else {
|
|
||||||
val rateGold = initInfo.giveDiamondRate * 100
|
|
||||||
val tipDialog = GiveDiamondTipDialog(this@GiveGoldToUserActivity)
|
|
||||||
tipDialog.setTvDiamond(gold.toString())
|
|
||||||
tipDialog.setTipMsg(getString(R.string.give_gold_to_user, nick))
|
|
||||||
if (rateGold == 0.0) {
|
|
||||||
tipDialog.setTipMessageGone(true)
|
|
||||||
} else {
|
|
||||||
tipDialog.setTvSeCharge("${rateGold.toInt()}%")
|
|
||||||
val goldNew = gold + (gold * initInfo.giveDiamondRate)
|
|
||||||
tipDialog.setTvConsumeDiamond(
|
|
||||||
getString(
|
|
||||||
R.string.consume_diamond_num,
|
|
||||||
goldNew.toString()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
tipDialog.setOnActionListener(
|
|
||||||
object : GiveDiamondTipDialog.OnActionListener {
|
|
||||||
override fun onOk() {
|
|
||||||
GiveGoldPassWordFragment.newInstance(
|
|
||||||
supportFragmentManager,
|
|
||||||
gold.toString(),
|
|
||||||
nick,
|
|
||||||
""
|
|
||||||
)
|
|
||||||
.apply {
|
|
||||||
passWordFragment = this
|
|
||||||
setListener(this@GiveGoldToUserActivity)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
tipDialog.show()
|
|
||||||
}
|
|
||||||
} ?: run {
|
|
||||||
toast(ResUtil.getString(R.string.ui_setting_settingactivity_06))
|
|
||||||
return@setOnClickListener
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {//赠送礼物
|
|
||||||
searchUserInfo?.apply {
|
|
||||||
val giftNum = binding.editGift.text.toString().toInt()
|
|
||||||
if (selectGiftPos < 0) {
|
|
||||||
toast(ResUtil.getString(R.string.please_select_gift))
|
|
||||||
return@setOnClickListener
|
|
||||||
} else if (giftNum == 0) {
|
|
||||||
toast(ResUtil.getString(R.string.please_enter_gift_num))
|
|
||||||
return@setOnClickListener
|
|
||||||
} else if (giftNum > giftAllCount) {
|
|
||||||
toast(ResUtil.getString(R.string.gift_num_fail))
|
|
||||||
return@setOnClickListener
|
|
||||||
}
|
|
||||||
giveGoldModel.giveGift(uid, giftId, giftNum)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun initDiamond() {
|
|
||||||
if (binding.tvDiamondTab.visibility == View.GONE) {
|
|
||||||
return
|
|
||||||
} else if (binding.tvGiftTab.visibility == View.VISIBLE) {
|
|
||||||
binding.tvGiftTab.isSelected = false
|
|
||||||
binding.groupGift.visibility = View.GONE
|
|
||||||
}
|
|
||||||
val initInfo = DemoCache.readInitInfo()
|
|
||||||
val length = initInfo?.giveDiamondOnceLimitNum?.toInt()?.toString()?.length ?: 0
|
|
||||||
binding.mEditGold.text.filters = arrayOf<InputFilter>(LengthFilter(length))
|
|
||||||
binding.mTvDiamond.text = getString(
|
|
||||||
R.string.my_diamond,
|
|
||||||
PayModel.get().currentWalletInfo?.diamondNum?.toString() ?: "0"
|
|
||||||
)
|
|
||||||
binding.mEditGold.addTextChangedListener(this)
|
|
||||||
binding.tvDiamondTab.isSelected = true
|
|
||||||
binding.tvDiamondTab.setOnClickListener {
|
|
||||||
if (binding.tvGiftTab.visibility == View.VISIBLE) {
|
|
||||||
binding.tvGiftTab.isSelected = false
|
|
||||||
binding.groupGift.visibility = View.GONE
|
|
||||||
binding.tvDiamondTab.isSelected = true
|
|
||||||
binding.groupDiamond.visibility = View.VISIBLE
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressLint("CheckResult")
|
|
||||||
private fun initGift() {
|
|
||||||
if (binding.tvGiftTab.visibility == View.GONE) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
val giftList = GiftModel.get().knapList
|
|
||||||
if (binding.tvDiamondTab.visibility == View.GONE) {
|
|
||||||
binding.tvGiftTab.isSelected = true
|
|
||||||
binding.tvSure.isEnabled = true
|
|
||||||
}
|
|
||||||
binding.tvGiftTab.setOnClickListener {
|
|
||||||
if (binding.tvDiamondTab.visibility == View.VISIBLE) {
|
|
||||||
binding.tvDiamondTab.isSelected = false
|
|
||||||
binding.groupDiamond.visibility = View.GONE
|
|
||||||
binding.tvGiftTab.isSelected = true
|
|
||||||
binding.groupGift.visibility = View.VISIBLE
|
|
||||||
binding.tvSure.isEnabled = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (giftList.size == 0) {
|
|
||||||
binding.tvEmptyTip.visibility = View.VISIBLE
|
|
||||||
return
|
|
||||||
} else {
|
|
||||||
binding.tvEmptyTip.visibility = View.GONE
|
|
||||||
}
|
|
||||||
val list = transformList(giftList, 8)
|
|
||||||
binding.magicIndicatorEntrance.initIndicator(list.size)
|
|
||||||
binding.magicIndicatorEntrance.setSelectedPage(centerIndex)
|
|
||||||
binding.magicIndicatorEntrance.visibility =
|
|
||||||
if (list.size > 1) View.VISIBLE else View.INVISIBLE
|
|
||||||
binding.viewPagerEntrance.adapter = object : PagerAdapter() {
|
|
||||||
var cacheItemView = SparseArray<RecyclerView>()
|
|
||||||
override fun getCount(): Int {
|
|
||||||
return list.size
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun isViewFromObject(view: View, `object`: Any): Boolean {
|
|
||||||
return view == `object`
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun instantiateItem(container: ViewGroup, position: Int): Any {
|
|
||||||
val recyclerView: RecyclerView
|
|
||||||
val giveGiftAdapter: GiveGiftAdapter
|
|
||||||
if (cacheItemView[position] == null) {
|
|
||||||
recyclerView = RecyclerView(context)
|
|
||||||
var lp = recyclerView.layoutParams
|
|
||||||
if (lp == null) {
|
|
||||||
lp = ViewGroup.LayoutParams(
|
|
||||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
|
||||||
ViewGroup.LayoutParams.WRAP_CONTENT
|
|
||||||
)
|
|
||||||
}
|
|
||||||
recyclerView.layoutParams = lp
|
|
||||||
recyclerView.layoutManager = GridLayoutManager(context, 4)
|
|
||||||
recyclerView.addItemDecoration(
|
|
||||||
GridSpacingItemNewDecoration(
|
|
||||||
UIUtil.dip2px(
|
|
||||||
context,
|
|
||||||
18.0
|
|
||||||
), UIUtil.dip2px(context, 10.0), true
|
|
||||||
)
|
|
||||||
)
|
|
||||||
giveGiftAdapter = GiveGiftAdapter()
|
|
||||||
giveGiftAdapter.onItemClickListener = object : DoubleClickCheckListener() {
|
|
||||||
override fun onItemClickSingle(
|
|
||||||
adapter: BaseQuickAdapter<*, *>?,
|
|
||||||
view: View,
|
|
||||||
position: Int
|
|
||||||
) {
|
|
||||||
val oldBean = giveGiftAdapter.getItem(selectGiftPos)
|
|
||||||
oldBean?.isSelected = false
|
|
||||||
giveGiftAdapter.notifyItemChanged(selectGiftPos)
|
|
||||||
val bean = giveGiftAdapter.getItem(position)
|
|
||||||
bean?.isSelected = true
|
|
||||||
giveGiftAdapter.notifyItemChanged(position)
|
|
||||||
selectGiftPos = position
|
|
||||||
giftAllCount = giveGiftAdapter.getItem(position)?.count ?: -1
|
|
||||||
giftId = giveGiftAdapter.getItem(position)?.giftId ?: -1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
recyclerView.adapter = giveGiftAdapter
|
|
||||||
} else {
|
|
||||||
recyclerView = cacheItemView[position]
|
|
||||||
giveGiftAdapter = recyclerView.adapter as GiveGiftAdapter
|
|
||||||
}
|
|
||||||
giveGiftAdapter.setNewData(list[position])
|
|
||||||
container.addView(recyclerView)
|
|
||||||
return recyclerView
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun destroyItem(container: ViewGroup, position: Int, `object`: Any) {
|
|
||||||
val recyclerView = cacheItemView[position]
|
|
||||||
container.removeView(recyclerView)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
binding.viewPagerEntrance.setCurrentItem(centerIndex, false)
|
|
||||||
binding.editGift.addTextChangedListener(this)
|
|
||||||
binding.tvAll.setOnClickListener {
|
|
||||||
if (giftAllCount != -1)
|
|
||||||
binding.editGift.setText(giftAllCount.toString())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun transformList(
|
|
||||||
data: List<GiftInfo>,
|
|
||||||
pageSize: Int
|
|
||||||
): List<MutableList<GiftInfo>> {
|
|
||||||
val result: MutableList<MutableList<GiftInfo>> = ArrayList()
|
|
||||||
if (data.isEmpty()) {
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
for (i in data.toTypedArray().indices) {
|
|
||||||
var page: MutableList<GiftInfo>? = null
|
|
||||||
if (i % pageSize == 0) {
|
|
||||||
page = ArrayList()
|
|
||||||
result.add(page)
|
|
||||||
} else {
|
|
||||||
if (result.size > 0) {
|
|
||||||
page = result[result.size - 1]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
page?.add(data[i])
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressLint("CheckResult")
|
|
||||||
override fun onInputFinish(psw: String) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressLint("CheckResult")
|
|
||||||
override fun onTextChanged(psw: String) {
|
|
||||||
val password = passWordFragment?.password?.password ?: ""
|
|
||||||
if (password.length == 6) {
|
|
||||||
searchUserInfo?.apply {
|
|
||||||
dialogManager.showProgressDialog(context)
|
|
||||||
PayModel.get().giveGold(uid, findViewById<EditText>(R.id.mEditGold).text.toString(), DESAndBase64(password))
|
|
||||||
.compose(bindToLifecycle())
|
|
||||||
.doOnError {
|
|
||||||
toast(it.message)
|
|
||||||
passWordFragment?.password?.clearPassword()
|
|
||||||
dialogManager.dismissDialog()
|
|
||||||
}
|
|
||||||
.subscribe { _ ->
|
|
||||||
passWordFragment?.dismissAllowingStateLoss()
|
|
||||||
dialogManager.dismissDialog()
|
|
||||||
toast(getString(R.string.layout_activity_give_gold_success_01))
|
|
||||||
finish()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun afterTextChanged(s: Editable?) {
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
|
||||||
binding.tvSure.isEnabled = !s.isNullOrBlank()
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -1,30 +0,0 @@
|
|||||||
package com.chwl.app.pay.adapter;
|
|
||||||
|
|
||||||
import android.text.TextUtils;
|
|
||||||
|
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
|
||||||
import com.chad.library.adapter.base.BaseViewHolder;
|
|
||||||
import com.chwl.app.R;
|
|
||||||
import com.chwl.core.pay.bean.ChargeBean;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p> 充值adapter </p>
|
|
||||||
* Created by Administrator on 2017/11/20.
|
|
||||||
*/
|
|
||||||
public class ChargeAdapter extends BaseQuickAdapter<ChargeBean, BaseViewHolder> {
|
|
||||||
public ChargeAdapter() {
|
|
||||||
super(R.layout.list_item_charge);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void convert(BaseViewHolder baseViewHolder, ChargeBean chargeBean) {
|
|
||||||
if (chargeBean == null) return;
|
|
||||||
baseViewHolder
|
|
||||||
// .setText(R.id.item_charge_gold, chargeBean.chargeGoldNum)
|
|
||||||
.setText(R.id.tv_desc, chargeBean.prodDesc)
|
|
||||||
// .setText(R.id.item_charge_money, "" + chargeBean.money)
|
|
||||||
.setGone(R.id.tv_desc, !TextUtils.isEmpty(chargeBean.prodDesc));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -1,23 +0,0 @@
|
|||||||
package com.chwl.app.pay.adapter
|
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
|
||||||
import android.widget.TextView
|
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
|
||||||
import com.chad.library.adapter.base.BaseViewHolder
|
|
||||||
import com.chwl.app.R
|
|
||||||
import com.chwl.core.user.bean.DiamondGiveHistoryInfo
|
|
||||||
import com.chwl.library.utils.TimeUtils
|
|
||||||
|
|
||||||
|
|
||||||
class GiveDiamondDetailAdapter :
|
|
||||||
BaseQuickAdapter<DiamondGiveHistoryInfo, BaseViewHolder>(R.layout.item_give_diamond_detail) {
|
|
||||||
|
|
||||||
@SuppressLint("SetTextI18n")
|
|
||||||
override fun convert(helper: BaseViewHolder, item: DiamondGiveHistoryInfo) {
|
|
||||||
helper.getView<TextView>(R.id.tv_number).text = item.diamondNum.toString()
|
|
||||||
helper.getView<TextView>(R.id.tv_pay_diamond).text =
|
|
||||||
mContext.getString(R.string.all_pay_diamond, item.realDiamondNum.toString())
|
|
||||||
helper.setText(R.id.tv_date, TimeUtils.getDateTimeString(item.createTime,"yyyy-MM-dd HH:mm:ss"))
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -1,34 +0,0 @@
|
|||||||
package com.chwl.app.pay.adapter;
|
|
||||||
|
|
||||||
|
|
||||||
import android.widget.ImageView;
|
|
||||||
|
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
|
||||||
import com.chad.library.adapter.base.BaseViewHolder;
|
|
||||||
import com.chwl.app.R;
|
|
||||||
import com.chwl.app.ui.utils.ImageLoadUtils;
|
|
||||||
import com.chwl.core.gift.bean.GiftInfo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 赠送礼物
|
|
||||||
*/
|
|
||||||
public class GiveGiftAdapter extends BaseQuickAdapter<GiftInfo, BaseViewHolder> {
|
|
||||||
|
|
||||||
|
|
||||||
public GiveGiftAdapter() {
|
|
||||||
super(R.layout.item_give_gift);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void convert(BaseViewHolder helper, GiftInfo item) {
|
|
||||||
if (item == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
helper.setText(R.id.tvName, item.getGiftName())
|
|
||||||
.setText(R.id.tvNum, "x" + item.getCount());
|
|
||||||
ImageView giftPic = helper.itemView.findViewById(R.id.ivGift);
|
|
||||||
ImageLoadUtils.loadImage(mContext, item.getGiftUrl(), giftPic);
|
|
||||||
helper.getView(R.id.viewBg).setSelected(item.isSelected);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -1,24 +0,0 @@
|
|||||||
package com.chwl.app.pay.adapter
|
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
|
||||||
import android.widget.TextView
|
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
|
||||||
import com.chad.library.adapter.base.BaseViewHolder
|
|
||||||
import com.chwl.app.R
|
|
||||||
import com.chwl.app.ui.utils.ImageLoadUtils
|
|
||||||
import com.chwl.app.utils.TimeUiUtils
|
|
||||||
import com.chwl.core.user.bean.DiamondGiveHistoryInfo
|
|
||||||
import com.chwl.library.utils.TimeUtils
|
|
||||||
|
|
||||||
|
|
||||||
class GiveGiftDetailAdapter :
|
|
||||||
BaseQuickAdapter<DiamondGiveHistoryInfo, BaseViewHolder>(R.layout.item_give_gift_detail) {
|
|
||||||
|
|
||||||
@SuppressLint("SetTextI18n")
|
|
||||||
override fun convert(helper: BaseViewHolder, item: DiamondGiveHistoryInfo) {
|
|
||||||
helper.getView<TextView>(R.id.tv_gift_name).text = "${item.giftName}x${item.giftNum}"
|
|
||||||
ImageLoadUtils.loadAvatar(mContext, item.giftUrl, helper.getView(R.id.iv_avatar))
|
|
||||||
helper.setText(R.id.tv_date, TimeUtils.getDateTimeString(item.createTime,"yyyy-MM-dd HH:mm:ss"))
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -1,22 +0,0 @@
|
|||||||
package com.chwl.app.pay.adapter
|
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
|
||||||
import android.widget.TextView
|
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
|
||||||
import com.chad.library.adapter.base.BaseViewHolder
|
|
||||||
import com.chwl.app.R
|
|
||||||
import com.chwl.app.ui.utils.ImageLoadUtils
|
|
||||||
import com.chwl.core.room.bean.SearchRoomInfo
|
|
||||||
|
|
||||||
|
|
||||||
class GiveSearchAdapter :
|
|
||||||
BaseQuickAdapter<SearchRoomInfo, BaseViewHolder>(R.layout.item_lately_give) {
|
|
||||||
|
|
||||||
@SuppressLint("SetTextI18n")
|
|
||||||
override fun convert(helper: BaseViewHolder, item: SearchRoomInfo) {
|
|
||||||
helper.getView<TextView>(R.id.tv_id).text = "ID:${item.erbanNo}"
|
|
||||||
helper.getView<TextView>(R.id.tv_nickname).text = item.nick
|
|
||||||
ImageLoadUtils.loadAvatar(mContext, item.avatar, helper.getView(R.id.iv_avatar))
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -1,22 +0,0 @@
|
|||||||
package com.chwl.app.pay.adapter
|
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
|
||||||
import android.widget.TextView
|
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
|
||||||
import com.chad.library.adapter.base.BaseViewHolder
|
|
||||||
import com.chwl.app.R
|
|
||||||
import com.chwl.app.ui.utils.ImageLoadUtils
|
|
||||||
import com.chwl.core.user.bean.DiamondGiveHistoryInfo
|
|
||||||
|
|
||||||
|
|
||||||
class LatelyGiveAdapter :
|
|
||||||
BaseQuickAdapter<DiamondGiveHistoryInfo, BaseViewHolder>(R.layout.item_lately_give) {
|
|
||||||
|
|
||||||
@SuppressLint("SetTextI18n")
|
|
||||||
override fun convert(helper: BaseViewHolder, item: DiamondGiveHistoryInfo) {
|
|
||||||
helper.getView<TextView>(R.id.tv_id).text = "ID:${item.targetErbanNo}"
|
|
||||||
helper.getView<TextView>(R.id.tv_nickname).text = item.targetNick
|
|
||||||
ImageLoadUtils.loadAvatar(mContext, item.targetAvatar, helper.getView(R.id.iv_avatar))
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -1,75 +0,0 @@
|
|||||||
package com.chwl.app.pay.fragment
|
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
|
||||||
import android.os.Bundle
|
|
||||||
import androidx.fragment.app.viewModels
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
|
||||||
import com.chwl.app.R
|
|
||||||
import com.chwl.app.base.BaseViewBindingFragment
|
|
||||||
import com.chwl.app.common.EmptyViewHelper
|
|
||||||
import com.chwl.app.databinding.FragmentGiveDiamondBinding
|
|
||||||
import com.chwl.app.pay.GiveGoldModel
|
|
||||||
import com.chwl.app.pay.activity.GiveGoldDetailActivity
|
|
||||||
import com.chwl.app.pay.adapter.GiveDiamondDetailAdapter
|
|
||||||
import com.chwl.app.pay.adapter.LatelyGiveAdapter
|
|
||||||
import com.chwl.app.ui.utils.RVDelegate
|
|
||||||
import com.chwl.core.user.bean.DiamondGiveHistoryInfo
|
|
||||||
import com.chwl.library.utils.ResUtil
|
|
||||||
|
|
||||||
class GiveDiamondFragment : BaseViewBindingFragment<FragmentGiveDiamondBinding>() {
|
|
||||||
|
|
||||||
private var pageNum: Int = 1
|
|
||||||
private val pageSize = 20
|
|
||||||
private lateinit var mAdapter: GiveDiamondDetailAdapter
|
|
||||||
private lateinit var rvDelegate: RVDelegate<DiamondGiveHistoryInfo>
|
|
||||||
|
|
||||||
private val giveGoldModel: GiveGoldModel by viewModels()
|
|
||||||
|
|
||||||
private var uid: Long = 0L
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
fun newInstance(uid: Long): GiveDiamondFragment {
|
|
||||||
val args = Bundle()
|
|
||||||
args.putLong("uid", uid)
|
|
||||||
val fragment = GiveDiamondFragment()
|
|
||||||
fragment.arguments = args
|
|
||||||
return fragment
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun init() {
|
|
||||||
uid = arguments?.getLong("uid") ?: 0L
|
|
||||||
mAdapter = GiveDiamondDetailAdapter()
|
|
||||||
rvDelegate = RVDelegate.Builder<DiamondGiveHistoryInfo>()
|
|
||||||
.setAdapter(mAdapter)
|
|
||||||
.setLayoutManager(LinearLayoutManager(context))
|
|
||||||
.setPageSize(20)
|
|
||||||
.setEmptyView(
|
|
||||||
EmptyViewHelper.createEmptyTextView(
|
|
||||||
context,
|
|
||||||
ResUtil.getString(R.string.me_give_gold_empty)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.setRefreshLayout(binding.refreshLayout)
|
|
||||||
.setRecyclerView(binding.recyclerView)
|
|
||||||
.build()
|
|
||||||
mAdapter.setOnLoadMoreListener({
|
|
||||||
loadData(false)
|
|
||||||
}, binding.recyclerView)
|
|
||||||
binding.refreshLayout.setOnRefreshListener {
|
|
||||||
loadData(true)
|
|
||||||
}
|
|
||||||
giveGoldModel.giveDetailLiveData.observe(this) {
|
|
||||||
rvDelegate.loadData(it)
|
|
||||||
}
|
|
||||||
loadData(true)
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressLint("CheckResult")
|
|
||||||
fun loadData(isRefresh: Boolean) {
|
|
||||||
binding.refreshLayout.isRefreshing = isRefresh
|
|
||||||
pageNum = if (isRefresh) 1 else (pageNum + 1)
|
|
||||||
giveGoldModel.giveDetailInfo(uid, 0, pageNum, pageSize)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -1,76 +0,0 @@
|
|||||||
package com.chwl.app.pay.fragment
|
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
|
||||||
import android.os.Bundle
|
|
||||||
import androidx.fragment.app.viewModels
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
|
||||||
import com.chwl.app.R
|
|
||||||
import com.chwl.app.base.BaseViewBindingFragment
|
|
||||||
import com.chwl.app.common.EmptyViewHelper
|
|
||||||
import com.chwl.app.databinding.FragmentGiveDiamondBinding
|
|
||||||
import com.chwl.app.databinding.FragmentGiveGiftBinding
|
|
||||||
import com.chwl.app.pay.GiveGoldModel
|
|
||||||
import com.chwl.app.pay.activity.GiveGoldDetailActivity
|
|
||||||
import com.chwl.app.pay.adapter.GiveGiftDetailAdapter
|
|
||||||
import com.chwl.app.pay.adapter.LatelyGiveAdapter
|
|
||||||
import com.chwl.app.ui.utils.RVDelegate
|
|
||||||
import com.chwl.core.user.bean.DiamondGiveHistoryInfo
|
|
||||||
import com.chwl.library.utils.ResUtil
|
|
||||||
|
|
||||||
class GiveGiftFragment : BaseViewBindingFragment<FragmentGiveGiftBinding>() {
|
|
||||||
|
|
||||||
private var pageNum: Int = 1
|
|
||||||
private val pageSize = 20
|
|
||||||
private lateinit var mAdapter: GiveGiftDetailAdapter
|
|
||||||
private lateinit var rvDelegate: RVDelegate<DiamondGiveHistoryInfo>
|
|
||||||
|
|
||||||
private val giveGoldModel: GiveGoldModel by viewModels()
|
|
||||||
|
|
||||||
private var uid: Long = 0L
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
fun newInstance(uid: Long): GiveGiftFragment {
|
|
||||||
val args = Bundle()
|
|
||||||
args.putLong("uid", uid)
|
|
||||||
val fragment = GiveGiftFragment()
|
|
||||||
fragment.arguments = args
|
|
||||||
return fragment
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun init() {
|
|
||||||
uid = arguments?.getLong("uid") ?: 0L
|
|
||||||
mAdapter = GiveGiftDetailAdapter()
|
|
||||||
rvDelegate = RVDelegate.Builder<DiamondGiveHistoryInfo>()
|
|
||||||
.setAdapter(mAdapter)
|
|
||||||
.setLayoutManager(LinearLayoutManager(context))
|
|
||||||
.setPageSize(20)
|
|
||||||
.setEmptyView(
|
|
||||||
EmptyViewHelper.createEmptyTextView(
|
|
||||||
context,
|
|
||||||
ResUtil.getString(R.string.me_give_gold_empty)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.setRefreshLayout(binding.refreshLayout)
|
|
||||||
.setRecyclerView(binding.recyclerView)
|
|
||||||
.build()
|
|
||||||
mAdapter.setOnLoadMoreListener({
|
|
||||||
loadData(false)
|
|
||||||
}, binding.recyclerView)
|
|
||||||
binding.refreshLayout.setOnRefreshListener {
|
|
||||||
loadData(true)
|
|
||||||
}
|
|
||||||
giveGoldModel.giveDetailLiveData.observe(this) {
|
|
||||||
rvDelegate.loadData(it)
|
|
||||||
}
|
|
||||||
loadData(true)
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressLint("CheckResult")
|
|
||||||
fun loadData(isRefresh: Boolean) {
|
|
||||||
binding.refreshLayout.isRefreshing = isRefresh
|
|
||||||
pageNum = if (isRefresh) 1 else (pageNum + 1)
|
|
||||||
giveGoldModel.giveDetailInfo(uid, 1, pageNum, pageSize)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -1,23 +0,0 @@
|
|||||||
package com.chwl.app.pay.interfaces;
|
|
||||||
|
|
||||||
import com.jungly.gridpasswordview.PasswordType;
|
|
||||||
import com.chwl.app.pay.widget.GridPasswordNoFocusView;
|
|
||||||
|
|
||||||
public interface PasswordView {
|
|
||||||
|
|
||||||
//void setError(String error);
|
|
||||||
|
|
||||||
String getPassWord();
|
|
||||||
|
|
||||||
void clearPassword();
|
|
||||||
|
|
||||||
void setPassword(String password);
|
|
||||||
|
|
||||||
void setPasswordVisibility(boolean visible);
|
|
||||||
|
|
||||||
void togglePasswordVisibility();
|
|
||||||
|
|
||||||
void setOnPasswordChangedListener(GridPasswordNoFocusView.OnPasswordChangedListener listener);
|
|
||||||
|
|
||||||
void setPasswordType(PasswordType passwordType);
|
|
||||||
}
|
|
@@ -1,132 +0,0 @@
|
|||||||
package com.chwl.app.pay.password;
|
|
||||||
|
|
||||||
import android.graphics.drawable.ColorDrawable;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.text.TextUtils;
|
|
||||||
import android.util.DisplayMetrics;
|
|
||||||
import android.view.Display;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.view.Window;
|
|
||||||
import android.view.WindowManager;
|
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
import androidx.fragment.app.DialogFragment;
|
|
||||||
import androidx.fragment.app.FragmentManager;
|
|
||||||
|
|
||||||
import com.chwl.app.R;
|
|
||||||
import com.chwl.app.pay.widget.GridPasswordNoFocusView;
|
|
||||||
import com.chwl.app.ui.setting.ModifyPwdActivity;
|
|
||||||
import com.chwl.library.utils.ResUtil;
|
|
||||||
|
|
||||||
|
|
||||||
//也可继承design中的BottomSheetDialogFragment
|
|
||||||
public class GiveGoldPassWordFragment extends DialogFragment {
|
|
||||||
|
|
||||||
private GiveGoldPasswordView mPassword;
|
|
||||||
|
|
||||||
private GridPasswordNoFocusView.OnPasswordChangedListener listener;
|
|
||||||
|
|
||||||
private static GiveGoldPassWordFragment passWordFragment;
|
|
||||||
|
|
||||||
private static final String EXTRA_GOLD = "gold";
|
|
||||||
private static final String EXTRA_NICKNAME = "nickname";
|
|
||||||
private static final String EXTRA_GOLD_RATE = "rate";
|
|
||||||
|
|
||||||
public static GiveGoldPassWordFragment newInstance(FragmentManager fragmentManager, String gold) {
|
|
||||||
if (passWordFragment == null) {
|
|
||||||
passWordFragment = new GiveGoldPassWordFragment();
|
|
||||||
Bundle bundle = new Bundle();
|
|
||||||
bundle.putString(EXTRA_GOLD, gold);
|
|
||||||
passWordFragment.setArguments(bundle);
|
|
||||||
passWordFragment.show(fragmentManager, "GiveGoldPassWordFragment");
|
|
||||||
}
|
|
||||||
return passWordFragment;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param gold 金额
|
|
||||||
* @param nickname 转账对象昵称
|
|
||||||
* @param rate 手续费
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static GiveGoldPassWordFragment newInstance(FragmentManager fragmentManager, String gold, String nickname, String rate) {
|
|
||||||
if (passWordFragment == null) {
|
|
||||||
passWordFragment = new GiveGoldPassWordFragment();
|
|
||||||
Bundle bundle = new Bundle();
|
|
||||||
bundle.putString(EXTRA_GOLD, gold);
|
|
||||||
bundle.putString(EXTRA_NICKNAME, nickname);
|
|
||||||
bundle.putString(EXTRA_GOLD_RATE, rate);
|
|
||||||
passWordFragment.setArguments(bundle);
|
|
||||||
passWordFragment.show(fragmentManager, "GiveGoldPassWordFragment");
|
|
||||||
}
|
|
||||||
return passWordFragment;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
}
|
|
||||||
|
|
||||||
//继承BottomSheetDialogFragment时onStart()可注释掉
|
|
||||||
@Override
|
|
||||||
public void onStart() {
|
|
||||||
super.onStart();
|
|
||||||
Window window = getDialog().getWindow();
|
|
||||||
if (window != null) {
|
|
||||||
window.setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.transparent)));
|
|
||||||
WindowManager.LayoutParams layoutParams = window.getAttributes();
|
|
||||||
DisplayMetrics dm = new DisplayMetrics();
|
|
||||||
Display d = window.getWindowManager().getDefaultDisplay();
|
|
||||||
d.getRealMetrics(dm);
|
|
||||||
window.getWindowManager().getDefaultDisplay().getMetrics(dm);
|
|
||||||
layoutParams.width = dm.widthPixels;
|
|
||||||
layoutParams.height = WindowManager.LayoutParams.MATCH_PARENT;
|
|
||||||
window.setAttributes(layoutParams);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Nullable
|
|
||||||
@Override
|
|
||||||
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
|
||||||
View view = inflater.inflate(R.layout.dialog_give_gold_password, container);
|
|
||||||
init(view);
|
|
||||||
return view;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void init(View view) {
|
|
||||||
mPassword = view.findViewById(R.id.give_gold_password_view);
|
|
||||||
mPassword.getCloseImageView().setOnClickListener(view12 -> dismiss());
|
|
||||||
mPassword.getForgetTextView().setOnClickListener(view1 -> ModifyPwdActivity.start(getContext(), ModifyPwdActivity.PAY_PWD));
|
|
||||||
mPassword.getPswView().setOnPasswordChangedListener(listener);
|
|
||||||
if (getArguments() != null) {
|
|
||||||
if (!TextUtils.isEmpty(getArguments().getString(EXTRA_NICKNAME))) {
|
|
||||||
mPassword.getTvNickname().setText(ResUtil.getString(R.string.pay_password_givegoldpasswordfragment_01) + getArguments().getString(EXTRA_NICKNAME));
|
|
||||||
} else {
|
|
||||||
mPassword.getTvNickname().setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
if (!TextUtils.isEmpty(getArguments().getString(EXTRA_GOLD_RATE))) {
|
|
||||||
mPassword.getTvRate().setText(getArguments().getString(EXTRA_GOLD_RATE));
|
|
||||||
} else {
|
|
||||||
mPassword.getTvRate().setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
mPassword.getTvGold().setText(getArguments().getString(EXTRA_GOLD));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setListener(GridPasswordNoFocusView.OnPasswordChangedListener listener) {
|
|
||||||
this.listener = listener;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GiveGoldPasswordView getPassword() {
|
|
||||||
return mPassword;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDestroy() {
|
|
||||||
super.onDestroy();
|
|
||||||
passWordFragment = null;
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,135 +0,0 @@
|
|||||||
package com.chwl.app.pay.password;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.util.AttributeSet;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.RelativeLayout;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import com.chwl.app.R;
|
|
||||||
import com.chwl.app.pay.widget.GridPasswordNoFocusView;
|
|
||||||
import com.chwl.app.ui.widget.password.PasswordKeyboardView;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by lcw on 2016/11/28.
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class GiveGoldPasswordView extends RelativeLayout {
|
|
||||||
|
|
||||||
private ImageView mClose;
|
|
||||||
private TextView mTitle;
|
|
||||||
private TextView mForgetPwd;
|
|
||||||
private GridPasswordNoFocusView mPassword;
|
|
||||||
private TextView tvNickname;
|
|
||||||
private TextView tvRate;
|
|
||||||
private TextView tvGold;
|
|
||||||
private PasswordKeyboardView mKeyboard;
|
|
||||||
private List<String> passwordList;//记录键盘输入的值
|
|
||||||
private StringBuilder mValue;//最后保存的密码
|
|
||||||
|
|
||||||
public GiveGoldPasswordView(Context context) {
|
|
||||||
this(context, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
public GiveGoldPasswordView(Context context, AttributeSet attrs) {
|
|
||||||
this(context, attrs, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public GiveGoldPasswordView(Context context, AttributeSet attrs, int defStyleAttr) {
|
|
||||||
super(context, attrs, defStyleAttr);
|
|
||||||
View.inflate(context, R.layout.view_give_gold_password, this);
|
|
||||||
initView();
|
|
||||||
initEvent();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initView() {
|
|
||||||
mPassword = findViewById(R.id.view_password);
|
|
||||||
mClose = findViewById(R.id.img_close);
|
|
||||||
mTitle = findViewById(R.id.tv_title);
|
|
||||||
mForgetPwd = findViewById(R.id.tv_forgetPwd);
|
|
||||||
mKeyboard = findViewById(R.id.view_keyboard);
|
|
||||||
tvGold = findViewById(R.id.tv_gold);
|
|
||||||
tvNickname = findViewById(R.id.tv_nickname);
|
|
||||||
tvRate = findViewById(R.id.tv_rate);
|
|
||||||
//打乱数字的位置
|
|
||||||
//mKeyboard.shuffleKeyboard();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initEvent() {
|
|
||||||
mValue = new StringBuilder();
|
|
||||||
passwordList = new ArrayList<>();
|
|
||||||
mKeyboard.setIOnKeyboardListener(new PasswordKeyboardView.IOnKeyboardListener() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onInsertKeyEvent(String text) {
|
|
||||||
mValue.setLength(0);
|
|
||||||
passwordList.add(text);
|
|
||||||
for (int i = 0; i < passwordList.size(); i++) {
|
|
||||||
mValue.append(passwordList.get(i));
|
|
||||||
}
|
|
||||||
mPassword.setPassword(mValue.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDeleteKeyEvent() {
|
|
||||||
mValue.setLength(0);
|
|
||||||
if (passwordList.size() != 0) {
|
|
||||||
passwordList.remove(passwordList.size() - 1);
|
|
||||||
for (int i = 0; i < passwordList.size(); i++) {
|
|
||||||
mValue.append(passwordList.get(i));
|
|
||||||
}
|
|
||||||
mPassword.setPassword(mValue.toString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
//获取输入的密码
|
|
||||||
public String getPassword() {
|
|
||||||
return mValue.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
//取消
|
|
||||||
public ImageView getCloseImageView() {
|
|
||||||
return mClose;
|
|
||||||
}
|
|
||||||
|
|
||||||
//标题
|
|
||||||
public TextView getTitleTextView() {
|
|
||||||
return mTitle;
|
|
||||||
}
|
|
||||||
|
|
||||||
//忘记密码
|
|
||||||
public TextView getForgetTextView() {
|
|
||||||
return mForgetPwd;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public TextView getTvNickname() {
|
|
||||||
return tvNickname;
|
|
||||||
}
|
|
||||||
|
|
||||||
public TextView getTvRate() {
|
|
||||||
return tvRate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public TextView getTvGold() {
|
|
||||||
return tvGold;
|
|
||||||
}
|
|
||||||
|
|
||||||
//输入密码控件
|
|
||||||
public GridPasswordNoFocusView getPswView() {
|
|
||||||
return mPassword;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void clearPassword(){
|
|
||||||
mValue.setLength(0);
|
|
||||||
mPassword.clearPassword();
|
|
||||||
passwordList.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -1,12 +1,8 @@
|
|||||||
package com.chwl.app.pay.presenter;
|
package com.chwl.app.pay.presenter;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
|
|
||||||
import com.hjq.toast.ToastUtils;
|
|
||||||
import com.chwl.app.pay.view.IChargeView;
|
import com.chwl.app.pay.view.IChargeView;
|
||||||
import com.chwl.core.pay.PayModel;
|
import com.chwl.core.pay.PayModel;
|
||||||
import com.chwl.library.base.PresenterEvent;
|
|
||||||
import com.chwl.library.utils.ListUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by MadisonRong on 05/01/2018.
|
* Created by MadisonRong on 05/01/2018.
|
||||||
|
@@ -1,9 +1,6 @@
|
|||||||
package com.chwl.app.pay.view;
|
package com.chwl.app.pay.view;
|
||||||
|
|
||||||
|
|
||||||
import com.chwl.core.pay.bean.Banner;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by MadisonRong on 05/01/2018.
|
* Created by MadisonRong on 05/01/2018.
|
||||||
|
@@ -1,436 +0,0 @@
|
|||||||
package com.chwl.app.pay.widget;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.res.ColorStateList;
|
|
||||||
import android.content.res.TypedArray;
|
|
||||||
import android.graphics.drawable.ColorDrawable;
|
|
||||||
import android.graphics.drawable.Drawable;
|
|
||||||
import android.graphics.drawable.GradientDrawable;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.os.Parcelable;
|
|
||||||
import android.text.Editable;
|
|
||||||
import android.text.InputType;
|
|
||||||
import android.text.TextUtils;
|
|
||||||
import android.text.TextWatcher;
|
|
||||||
import android.text.method.PasswordTransformationMethod;
|
|
||||||
import android.util.AttributeSet;
|
|
||||||
import android.view.KeyEvent;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.LinearLayout;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import com.jungly.gridpasswordview.CustomPasswordTransformationMethod;
|
|
||||||
import com.jungly.gridpasswordview.PasswordType;
|
|
||||||
import com.jungly.gridpasswordview.Util;
|
|
||||||
import com.jungly.gridpasswordview.imebugfixer.ImeDelBugFixedEditText;
|
|
||||||
import com.chwl.app.R;
|
|
||||||
import com.chwl.app.pay.interfaces.PasswordView;
|
|
||||||
|
|
||||||
public class GridPasswordNoFocusView extends LinearLayout implements PasswordView {
|
|
||||||
private static final int DEFAULT_PASSWORDLENGTH = 6;
|
|
||||||
private static final int DEFAULT_TEXTSIZE = 16;
|
|
||||||
private static final String DEFAULT_TRANSFORMATION = "●";
|
|
||||||
private static final int DEFAULT_LINECOLOR = 0xaa888888;
|
|
||||||
private static final int DEFAULT_GRIDCOLOR = 0xffffffff;
|
|
||||||
|
|
||||||
private ColorStateList mTextColor;
|
|
||||||
private int mTextSize = DEFAULT_TEXTSIZE;
|
|
||||||
private int mLineWidth;
|
|
||||||
private int mLineColor;
|
|
||||||
private int mGridColor;
|
|
||||||
private Drawable mLineDrawable;
|
|
||||||
private Drawable mOuterLineDrawable;
|
|
||||||
private int mPasswordLength;
|
|
||||||
private String mPasswordTransformation;
|
|
||||||
private int mPasswordType;
|
|
||||||
|
|
||||||
private String[] mPasswordArr;
|
|
||||||
private TextView[] mViewArr;
|
|
||||||
|
|
||||||
private ImeDelBugFixedEditText mInputView;
|
|
||||||
private OnPasswordChangedListener mListener;
|
|
||||||
private PasswordTransformationMethod mTransformationMethod;
|
|
||||||
|
|
||||||
public GridPasswordNoFocusView(Context context) {
|
|
||||||
super(context);
|
|
||||||
initViews(context);
|
|
||||||
init(context, null, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public GridPasswordNoFocusView(Context context, AttributeSet attrs) {
|
|
||||||
super(context, attrs);
|
|
||||||
init(context, attrs, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public GridPasswordNoFocusView(Context context, AttributeSet attrs, int defStyleAttr) {
|
|
||||||
super(context, attrs, defStyleAttr);
|
|
||||||
init(context, attrs, defStyleAttr);
|
|
||||||
}
|
|
||||||
|
|
||||||
public GridPasswordNoFocusView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
|
||||||
super(context, attrs, defStyleAttr, defStyleRes);
|
|
||||||
init(context, attrs, defStyleAttr);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void init(Context context, AttributeSet attrs, int defStyleAttr) {
|
|
||||||
initAttrs(context, attrs, defStyleAttr);
|
|
||||||
initViews(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initAttrs(Context context, AttributeSet attrs, int defStyleAttr) {
|
|
||||||
TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.gridPasswordView, defStyleAttr, 0);
|
|
||||||
|
|
||||||
mTextColor = ta.getColorStateList(R.styleable.gridPasswordView_gpvTextColor);
|
|
||||||
if (mTextColor == null)
|
|
||||||
mTextColor = ColorStateList.valueOf(getResources().getColor(android.R.color.primary_text_light));
|
|
||||||
int textSize = ta.getDimensionPixelSize(R.styleable.gridPasswordView_gpvTextSize, -1);
|
|
||||||
if (textSize != -1) {
|
|
||||||
this.mTextSize = Util.px2sp(context, textSize);
|
|
||||||
}
|
|
||||||
|
|
||||||
mLineWidth = (int) ta.getDimension(R.styleable.gridPasswordView_gpvLineWidth, Util.dp2px(getContext(), 1));
|
|
||||||
mLineColor = ta.getColor(R.styleable.gridPasswordView_gpvLineColor, DEFAULT_LINECOLOR);
|
|
||||||
mGridColor = ta.getColor(R.styleable.gridPasswordView_gpvGridColor, DEFAULT_GRIDCOLOR);
|
|
||||||
mLineDrawable = ta.getDrawable(R.styleable.gridPasswordView_gpvLineColor);
|
|
||||||
if (mLineDrawable == null)
|
|
||||||
mLineDrawable = new ColorDrawable(mLineColor);
|
|
||||||
mOuterLineDrawable = generateBackgroundDrawable();
|
|
||||||
|
|
||||||
mPasswordLength = ta.getInt(R.styleable.gridPasswordView_gpvPasswordLength, DEFAULT_PASSWORDLENGTH);
|
|
||||||
mPasswordTransformation = ta.getString(R.styleable.gridPasswordView_gpvPasswordTransformation);
|
|
||||||
if (TextUtils.isEmpty(mPasswordTransformation))
|
|
||||||
mPasswordTransformation = DEFAULT_TRANSFORMATION;
|
|
||||||
|
|
||||||
|
|
||||||
mPasswordType = ta.getInt(R.styleable.gridPasswordView_gpvPasswordType, 0);
|
|
||||||
|
|
||||||
ta.recycle();
|
|
||||||
|
|
||||||
mPasswordArr = new String[mPasswordLength];
|
|
||||||
mViewArr = new TextView[mPasswordLength];
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initViews(Context context) {
|
|
||||||
super.setBackgroundDrawable(mOuterLineDrawable);
|
|
||||||
setShowDividers(SHOW_DIVIDER_NONE);
|
|
||||||
setOrientation(HORIZONTAL);
|
|
||||||
|
|
||||||
mTransformationMethod = new CustomPasswordTransformationMethod(mPasswordTransformation);
|
|
||||||
inflaterViews(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void inflaterViews(Context context) {
|
|
||||||
LayoutInflater inflater = LayoutInflater.from(context);
|
|
||||||
inflater.inflate(R.layout.grid_password_view, this);
|
|
||||||
|
|
||||||
mInputView = (ImeDelBugFixedEditText) findViewById(R.id.inputView);
|
|
||||||
mInputView.setMaxEms(mPasswordLength);
|
|
||||||
mInputView.addTextChangedListener(textWatcher);
|
|
||||||
mInputView.setDelKeyEventListener(onDelKeyEventListener);
|
|
||||||
setCustomAttr(mInputView);
|
|
||||||
|
|
||||||
mViewArr[0] = mInputView;
|
|
||||||
|
|
||||||
int index = 1;
|
|
||||||
while (index < mPasswordLength) {
|
|
||||||
View dividerView = inflater.inflate(R.layout.divider, null);
|
|
||||||
LinearLayout.LayoutParams dividerParams = new LinearLayout.LayoutParams(mLineWidth, LinearLayout.LayoutParams.MATCH_PARENT);
|
|
||||||
dividerView.setBackgroundDrawable(mLineDrawable);
|
|
||||||
addView(dividerView, dividerParams);
|
|
||||||
|
|
||||||
TextView textView = (TextView) inflater.inflate(R.layout.textview, null);
|
|
||||||
setCustomAttr(textView);
|
|
||||||
LinearLayout.LayoutParams textViewParams = new LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.MATCH_PARENT, 1f);
|
|
||||||
addView(textView, textViewParams);
|
|
||||||
|
|
||||||
mViewArr[index] = textView;
|
|
||||||
index++;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setCustomAttr(TextView view) {
|
|
||||||
if (mTextColor != null)
|
|
||||||
view.setTextColor(mTextColor);
|
|
||||||
view.setTextSize(mTextSize);
|
|
||||||
|
|
||||||
int inputType = InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_VARIATION_PASSWORD;
|
|
||||||
switch (mPasswordType) {
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
inputType = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
inputType = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 3:
|
|
||||||
inputType = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_WEB_PASSWORD;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
view.setInputType(inputType);
|
|
||||||
view.setTransformationMethod(mTransformationMethod);
|
|
||||||
}
|
|
||||||
|
|
||||||
private GradientDrawable generateBackgroundDrawable() {
|
|
||||||
GradientDrawable drawable = new GradientDrawable();
|
|
||||||
drawable.setColor(mGridColor);
|
|
||||||
drawable.setStroke(mLineWidth, mLineColor);
|
|
||||||
return drawable;
|
|
||||||
}
|
|
||||||
|
|
||||||
private ImeDelBugFixedEditText.OnDelKeyEventListener onDelKeyEventListener = new ImeDelBugFixedEditText.OnDelKeyEventListener() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDeleteClick() {
|
|
||||||
for (int i = mPasswordArr.length - 1; i >= 0; i--) {
|
|
||||||
if (mPasswordArr[i] != null) {
|
|
||||||
mPasswordArr[i] = null;
|
|
||||||
mViewArr[i].setText(null);
|
|
||||||
notifyTextChanged();
|
|
||||||
break;
|
|
||||||
} else {
|
|
||||||
mViewArr[i].setText(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
private TextWatcher textWatcher = new TextWatcher() {
|
|
||||||
@Override
|
|
||||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
|
||||||
if (s == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
String newStr = s.toString();
|
|
||||||
if (newStr.length() == 1) {
|
|
||||||
mPasswordArr[0] = newStr;
|
|
||||||
notifyTextChanged();
|
|
||||||
} else if (newStr.length() == 2) {
|
|
||||||
String newNum = newStr.substring(1);
|
|
||||||
for (int i = 0; i < mPasswordArr.length; i++) {
|
|
||||||
if (mPasswordArr[i] == null) {
|
|
||||||
mPasswordArr[i] = newNum;
|
|
||||||
mViewArr[i].setText(newNum);
|
|
||||||
notifyTextChanged();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
mInputView.removeTextChangedListener(this);
|
|
||||||
mInputView.setText(mPasswordArr[0]);
|
|
||||||
if (mInputView.getText().length() >= 1) {
|
|
||||||
mInputView.setSelection(1);
|
|
||||||
}
|
|
||||||
mInputView.addTextChangedListener(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void afterTextChanged(Editable s) {
|
|
||||||
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
private OnKeyListener onKeyListener = new OnKeyListener() {
|
|
||||||
@Override
|
|
||||||
public boolean onKey(View v, int keyCode, KeyEvent event) {
|
|
||||||
if (event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_DEL) {
|
|
||||||
onDelKeyEventListener.onDeleteClick();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
private void notifyTextChanged() {
|
|
||||||
if (mListener == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
String currentPsw = getPassWord();
|
|
||||||
mListener.onTextChanged(currentPsw);
|
|
||||||
|
|
||||||
if (currentPsw.length() == mPasswordLength)
|
|
||||||
mListener.onInputFinish(currentPsw);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Parcelable onSaveInstanceState() {
|
|
||||||
Bundle bundle = new Bundle();
|
|
||||||
bundle.putParcelable("instanceState", super.onSaveInstanceState());
|
|
||||||
bundle.putStringArray("passwordArr", mPasswordArr);
|
|
||||||
return bundle;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onRestoreInstanceState(Parcelable state) {
|
|
||||||
if (state instanceof Bundle) {
|
|
||||||
Bundle bundle = (Bundle) state;
|
|
||||||
mPasswordArr = bundle.getStringArray("passwordArr");
|
|
||||||
state = bundle.getParcelable("instanceState");
|
|
||||||
mInputView.removeTextChangedListener(textWatcher);
|
|
||||||
setPassword(getPassWord());
|
|
||||||
mInputView.addTextChangedListener(textWatcher);
|
|
||||||
}
|
|
||||||
super.onRestoreInstanceState(state);
|
|
||||||
}
|
|
||||||
|
|
||||||
//TODO
|
|
||||||
//@Override
|
|
||||||
private void setError(String error) {
|
|
||||||
mInputView.setError(error);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the text the PasswordView is displaying.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public String getPassWord() {
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
for (int i = 0; i < mPasswordArr.length; i++) {
|
|
||||||
if (mPasswordArr[i] != null)
|
|
||||||
sb.append(mPasswordArr[i]);
|
|
||||||
}
|
|
||||||
return sb.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clear the passwrod the PasswordView is displaying.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void clearPassword() {
|
|
||||||
for (int i = 0; i < mPasswordArr.length; i++) {
|
|
||||||
mPasswordArr[i] = null;
|
|
||||||
mViewArr[i].setText(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the string value of the PasswordView.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void setPassword(String password) {
|
|
||||||
clearPassword();
|
|
||||||
|
|
||||||
if (TextUtils.isEmpty(password))
|
|
||||||
return;
|
|
||||||
|
|
||||||
char[] pswArr = password.toCharArray();
|
|
||||||
for (int i = 0; i < pswArr.length; i++) {
|
|
||||||
if (i < mPasswordArr.length) {
|
|
||||||
mPasswordArr[i] = pswArr[i] + "";
|
|
||||||
mViewArr[i].setText(mPasswordArr[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the enabled state of this view.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void setPasswordVisibility(boolean visible) {
|
|
||||||
for (TextView textView : mViewArr) {
|
|
||||||
textView.setTransformationMethod(visible ? null : mTransformationMethod);
|
|
||||||
if (textView instanceof EditText) {
|
|
||||||
EditText et = (EditText) textView;
|
|
||||||
et.setSelection(et.getText().length());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Toggle the enabled state of this view.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void togglePasswordVisibility() {
|
|
||||||
boolean currentVisible = getPassWordVisibility();
|
|
||||||
setPasswordVisibility(!currentVisible);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the visibility of this view.
|
|
||||||
*/
|
|
||||||
private boolean getPassWordVisibility() {
|
|
||||||
return mViewArr[0].getTransformationMethod() == null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Register a callback to be invoked when password changed.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void setOnPasswordChangedListener(OnPasswordChangedListener listener) {
|
|
||||||
this.mListener = listener;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setPasswordType(PasswordType passwordType) {
|
|
||||||
boolean visible = getPassWordVisibility();
|
|
||||||
int inputType = InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_VARIATION_PASSWORD;
|
|
||||||
switch (passwordType) {
|
|
||||||
|
|
||||||
case TEXT:
|
|
||||||
inputType = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case TEXTVISIBLE:
|
|
||||||
inputType = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case TEXTWEB:
|
|
||||||
inputType = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_WEB_PASSWORD;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (TextView textView : mViewArr)
|
|
||||||
textView.setInputType(inputType);
|
|
||||||
|
|
||||||
setPasswordVisibility(visible);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setBackground(Drawable background) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setBackgroundColor(int color) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setBackgroundResource(int resid) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setBackgroundDrawable(Drawable background) {
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Interface definition for a callback to be invoked when the password changed or is at the maximum length.
|
|
||||||
*/
|
|
||||||
public interface OnPasswordChangedListener {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Invoked when the password changed.
|
|
||||||
*
|
|
||||||
* @param psw new text
|
|
||||||
*/
|
|
||||||
void onTextChanged(String psw);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Invoked when the password is at the maximum length.
|
|
||||||
*
|
|
||||||
* @param psw complete text
|
|
||||||
*/
|
|
||||||
void onInputFinish(String psw);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@@ -38,7 +38,6 @@ import com.chwl.app.ui.setting.FeedbackActivity;
|
|||||||
import com.chwl.app.ui.setting.ModifyPwdActivity;
|
import com.chwl.app.ui.setting.ModifyPwdActivity;
|
||||||
import com.chwl.app.ui.user.activity.UserInfoActivity;
|
import com.chwl.app.ui.user.activity.UserInfoActivity;
|
||||||
import com.chwl.app.ui.webview.CommonWebViewActivity;
|
import com.chwl.app.ui.webview.CommonWebViewActivity;
|
||||||
import com.chwl.app.ui.withdraw.BinderAlipayActivity;
|
|
||||||
import com.chwl.app.vip.VipMainActivity;
|
import com.chwl.app.vip.VipMainActivity;
|
||||||
import com.chwl.app.mentoring_relationship.activity.MentoringRelationshipActivity;
|
import com.chwl.app.mentoring_relationship.activity.MentoringRelationshipActivity;
|
||||||
import com.chwl.core.DemoCache;
|
import com.chwl.core.DemoCache;
|
||||||
@@ -137,21 +136,6 @@ public class RouterHandler {
|
|||||||
case RouterType.PUBLIC_CHAT_HALL:
|
case RouterType.PUBLIC_CHAT_HALL:
|
||||||
PublicChatHallHomeActivity.openPublicChatHallPage(context);
|
PublicChatHallHomeActivity.openPublicChatHallPage(context);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RouterType.BINDING_ALI_PAY_ACCOUNT:
|
|
||||||
if (AuthModel.get().getCurrentUid() > 0) {
|
|
||||||
WithdrawModel.get().getWithdrawUserInfo(AuthModel.get().getCurrentUid())
|
|
||||||
.subscribe(withdrawInfo -> {
|
|
||||||
if (withdrawInfo != null) {
|
|
||||||
Intent intent = new Intent(context, BinderAlipayActivity.class);
|
|
||||||
Bundle mBundle = new Bundle();
|
|
||||||
mBundle.putSerializable("withdrawInfo", withdrawInfo);
|
|
||||||
intent.putExtras(mBundle);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case RouterType.BINDING_PHONE:
|
case RouterType.BINDING_PHONE:
|
||||||
AuthModel.get().isBindPhone()
|
AuthModel.get().isBindPhone()
|
||||||
.subscribe(new SingleObserver<String>() {
|
.subscribe(new SingleObserver<String>() {
|
||||||
|
@@ -1,231 +0,0 @@
|
|||||||
package com.chwl.app.ui.wallet;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.text.Editable;
|
|
||||||
import android.text.TextWatcher;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.Button;
|
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import androidx.core.content.ContextCompat;
|
|
||||||
|
|
||||||
import com.netease.nim.uikit.common.util.string.StringUtil;
|
|
||||||
import com.chwl.app.R;
|
|
||||||
import com.chwl.app.base.BaseActivity;
|
|
||||||
import com.chwl.app.ui.widget.password.PassWordFragment;
|
|
||||||
import com.chwl.core.pay.PayModel;
|
|
||||||
import com.chwl.core.pay.bean.WalletInfo;
|
|
||||||
import com.chwl.core.utils.SharedPreferenceUtils;
|
|
||||||
import com.chwl.core.utils.net.BeanObserver;
|
|
||||||
import com.chwl.library.utils.FormatUtils;
|
|
||||||
import com.chwl.library.utils.ResUtil;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author chenran
|
|
||||||
* @date 2017/10/2
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class ExchangeGoldActivity extends BaseActivity {
|
|
||||||
private TextView jewNumber;
|
|
||||||
private TextView goldNumber;
|
|
||||||
private EditText exchangeJewNumber;
|
|
||||||
private TextView exchangeGoldNumber;
|
|
||||||
// private TextView tvExchangeHammarNum;
|
|
||||||
private Button confirm;
|
|
||||||
private WalletInfo walletInfo;
|
|
||||||
private TextView exchangeGoldTips;
|
|
||||||
private TextView tvInputTip;
|
|
||||||
|
|
||||||
public static void start(Context context) {
|
|
||||||
if (context == null) return;
|
|
||||||
Intent intent = new Intent(context, ExchangeGoldActivity.class);
|
|
||||||
context.startActivity(intent);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.activity_exchange_gold);
|
|
||||||
initTitleBar(ResUtil.getString(R.string.ui_wallet_exchangegoldactivity_01));
|
|
||||||
walletInfo = PayModel.get().getCurrentWalletInfo();
|
|
||||||
initView();
|
|
||||||
updateView();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initView() {
|
|
||||||
tvInputTip = (TextView) findViewById(R.id.tv_input_tip);
|
|
||||||
jewNumber = (TextView) findViewById(R.id.gew_number);
|
|
||||||
goldNumber = (TextView) findViewById(R.id.gold_number);
|
|
||||||
exchangeJewNumber = (EditText) findViewById(R.id.gew_exchange_number);
|
|
||||||
exchangeGoldNumber = (TextView) findViewById(R.id.gold_exchange_number);
|
|
||||||
// tvExchangeHammarNum = findViewById(R.id.tv_hammar_exchange_number);
|
|
||||||
confirm = (Button) findViewById(R.id.confirm_exchange);
|
|
||||||
exchangeGoldTips = (TextView) findViewById(R.id.tv_exchange_gold_tips);
|
|
||||||
String tips = getString(R.string.exchange_gold_tips,
|
|
||||||
String.valueOf(SharedPreferenceUtils.getExchangeGoldRate()));
|
|
||||||
// tips = tips.replaceAll("\\n", "<br>");
|
|
||||||
exchangeGoldTips.setText(tips);
|
|
||||||
confirm.setOnClickListener(v -> {
|
|
||||||
String str = exchangeJewNumber.getText().toString();
|
|
||||||
if (isNumeric(str)) {
|
|
||||||
if (StringUtil.isEmpty(str)) {
|
|
||||||
toast(ResUtil.getString(R.string.ui_wallet_exchangegoldactivity_02));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int value = Integer.parseInt(str);
|
|
||||||
if (!isTenMultiple(value)) {
|
|
||||||
toast(ResUtil.getString(R.string.ui_wallet_exchangegoldactivity_03));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (walletInfo == null || value > walletInfo.getDiamondNum()) {
|
|
||||||
toast(ResUtil.getString(R.string.ui_wallet_exchangegoldactivity_04));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
PassWordFragment.newInstace(value, value / 1000 * 2).show(getSupportFragmentManager());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
exchangeJewNumber.addTextChangedListener(textWatcher);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateView() {
|
|
||||||
setWalletNum(walletInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setWalletNum(WalletInfo walletNum) {
|
|
||||||
if (walletNum != null) {
|
|
||||||
long value = (long) (walletNum.getDiamondNum() - walletNum.getDiamondNum() % 10);
|
|
||||||
int result = (int) (value * SharedPreferenceUtils.getExchangeGoldRate());
|
|
||||||
exchangeJewNumber.setHint(String.format("請輸入兌換的鉆石數量 (最多可兌換%1$s)", result + ""));
|
|
||||||
jewNumber.setText(getString(R.string.jewel_format, FormatUtils.formatBigDecimal(walletNum.getDiamondNum())));
|
|
||||||
goldNumber.setText(getString(R.string.gold_format, FormatUtils.formatBigDecimal(walletNum.getDiamondNum())));
|
|
||||||
exchangeGoldNumber.setText("0鉆石");
|
|
||||||
// tvExchangeHammarNum.setText("0錘子");
|
|
||||||
changeResultNumStyle();
|
|
||||||
PayModel.get().setCurrentWalletInfo(walletNum);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private TextWatcher textWatcher = new TextWatcher() {
|
|
||||||
@Override
|
|
||||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void afterTextChanged(Editable s) {
|
|
||||||
if (exchangeJewNumber.getText().toString().equals("0")) {
|
|
||||||
exchangeJewNumber.setText("");
|
|
||||||
}
|
|
||||||
boolean btnEnable = false;
|
|
||||||
String str = exchangeJewNumber.getText().toString();
|
|
||||||
if (!StringUtil.isEmpty(str) && isNumeric(str)) {
|
|
||||||
Long value = Long.parseLong(str);
|
|
||||||
if (isTenMultiple(value)) {
|
|
||||||
int result = (int) (value * SharedPreferenceUtils.getExchangeGoldRate());
|
|
||||||
exchangeGoldNumber.setText(result + "鉆石");
|
|
||||||
// tvExchangeHammarNum.setText((result/1000*2) + "錘子");
|
|
||||||
changeResultNumStyle();
|
|
||||||
if (walletInfo != null && value <= walletInfo.getDiamondNum()) {
|
|
||||||
btnEnable = true;
|
|
||||||
}
|
|
||||||
tvInputTip.setVisibility(View.GONE);
|
|
||||||
exchangeJewNumber.setTextColor(getResources().getColor(R.color.text_tertiary));
|
|
||||||
} else {
|
|
||||||
exchangeGoldNumber.setText("0鉆石");
|
|
||||||
// tvExchangeHammarNum.setText("0錘子");
|
|
||||||
changeResultNumStyle();
|
|
||||||
tvInputTip.setVisibility(View.VISIBLE);
|
|
||||||
exchangeJewNumber.setTextColor(getResources().getColor(R.color.color_FF3852));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
exchangeGoldNumber.setText("0鉆石");
|
|
||||||
// tvExchangeHammarNum.setText("0錘子");
|
|
||||||
changeResultNumStyle();
|
|
||||||
tvInputTip.setVisibility(View.GONE);
|
|
||||||
exchangeJewNumber.setTextColor(getResources().getColor(R.color.text_tertiary));
|
|
||||||
}
|
|
||||||
if (btnEnable) {
|
|
||||||
confirm.setEnabled(true);
|
|
||||||
confirm.setTextColor(ContextCompat.getColor(ExchangeGoldActivity.this, R.color.color_333333));
|
|
||||||
confirm.setBackground(getResources().getDrawable(R.drawable.shape_semi_round_gray_solid));
|
|
||||||
} else {
|
|
||||||
confirm.setEnabled(false);
|
|
||||||
confirm.setTextColor(ContextCompat.getColor(ExchangeGoldActivity.this, R.color.color_B3B3B3));
|
|
||||||
confirm.setBackground(getResources().getDrawable(R.drawable.shape_semi_round_grey_e5_solid));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
private boolean isTenMultiple(long number) {
|
|
||||||
long value = number % 10;
|
|
||||||
return value == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isNumeric(String str) {
|
|
||||||
for (int i = str.length(); --i >= 0; ) {
|
|
||||||
if (!Character.isDigit(str.charAt(i))) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void changeResultNumStyle() {
|
|
||||||
// if("0錘子".equals(tvExchangeHammarNum.getText().toString())){
|
|
||||||
// tvExchangeHammarNum.setTextColor(getResources().getColor(R.color.text_color_secondary));
|
|
||||||
// } else {
|
|
||||||
// tvExchangeHammarNum.setTextColor(getResources().getColor(R.color.text_color_primary));
|
|
||||||
// }
|
|
||||||
if ("0鉆石".equals(exchangeGoldNumber.getText().toString())) {
|
|
||||||
exchangeGoldNumber.setTextColor(getResources().getColor(R.color.text_color_secondary));
|
|
||||||
} else {
|
|
||||||
exchangeGoldNumber.setTextColor(getResources().getColor(R.color.text_color_primary));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onExchangeGold(WalletInfo walletInfo) {
|
|
||||||
getDialogManager().dismissDialog();
|
|
||||||
toast("兌換成功");
|
|
||||||
exchangeJewNumber.setText("");
|
|
||||||
if (walletInfo == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.walletInfo.setDiamondNum(walletInfo.getDiamondNum());
|
|
||||||
setWalletNum(walletInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onExchangeGoldFail(String error) {
|
|
||||||
getDialogManager().dismissDialog();
|
|
||||||
toast(error);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void commit(long value, int hammerNum, String pwd) {
|
|
||||||
getDialogManager().showProgressDialog(ExchangeGoldActivity.this, "請稍後...");
|
|
||||||
PayModel.get().exchangeGold((int) value, hammerNum, DESAndBase64(pwd))
|
|
||||||
.subscribe(new BeanObserver<WalletInfo>() {
|
|
||||||
@Override
|
|
||||||
public void onSuccess(WalletInfo info) {
|
|
||||||
onExchangeGold(info);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onErrorMsg(String error) {
|
|
||||||
onExchangeGoldFail(error);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onDestroy() {
|
|
||||||
super.onDestroy();
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,298 +0,0 @@
|
|||||||
package com.chwl.app.ui.wallet.sendgold;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.text.Editable;
|
|
||||||
import android.text.TextUtils;
|
|
||||||
import android.text.style.ForegroundColorSpan;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import androidx.recyclerview.widget.GridLayoutManager;
|
|
||||||
|
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
|
||||||
import com.trello.rxlifecycle3.android.ActivityEvent;
|
|
||||||
import com.chwl.app.R;
|
|
||||||
import com.chwl.app.base.BaseViewBindingActivity;
|
|
||||||
import com.chwl.app.bills.activities.ChargeBillsActivity;
|
|
||||||
import com.chwl.app.databinding.ActivitySendGoldBinding;
|
|
||||||
import com.chwl.app.ui.utils.ImageLoadUtils;
|
|
||||||
import com.chwl.app.ui.widget.TextWatcherSimple;
|
|
||||||
import com.chwl.app.ui.widget.password.PassWordFragment;
|
|
||||||
import com.chwl.app.ui.widget.password.PasswordEvent;
|
|
||||||
import com.chwl.app.ui.widget.recyclerview.decoration.GridSpacingItemDecoration;
|
|
||||||
import com.chwl.app.utils.RegexUtil;
|
|
||||||
import com.chwl.app.utils.SpannableBuilder;
|
|
||||||
import com.chwl.core.auth.AuthModel;
|
|
||||||
import com.chwl.core.pay.GoldGiveModel;
|
|
||||||
import com.chwl.core.pay.IGoldGiveModel;
|
|
||||||
import com.chwl.core.pay.PayModel;
|
|
||||||
import com.chwl.core.pay.bean.GiveInfo;
|
|
||||||
import com.chwl.core.pay.bean.WalletInfo;
|
|
||||||
import com.chwl.core.pay.event.GetWalletInfoEvent;
|
|
||||||
import com.chwl.core.pay.event.SendGoldSuccessEvent;
|
|
||||||
import com.chwl.core.user.UserModel;
|
|
||||||
import com.chwl.core.user.bean.UserInfo;
|
|
||||||
import com.chwl.core.utils.net.DontWarnObserver;
|
|
||||||
import com.chwl.library.utils.FormatUtils;
|
|
||||||
import com.chwl.library.utils.JavaUtil;
|
|
||||||
import com.chwl.library.utils.ResUtil;
|
|
||||||
import com.chwl.library.utils.SingleToastUtil;
|
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
|
||||||
import org.greenrobot.eventbus.ThreadMode;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* create by lvzebiao @2019/12/1
|
|
||||||
*/
|
|
||||||
public class SendGoldActivity extends BaseViewBindingActivity<ActivitySendGoldBinding> implements View.OnClickListener {
|
|
||||||
|
|
||||||
private IGoldGiveModel model = new GoldGiveModel();
|
|
||||||
|
|
||||||
private SendGoldListAdpater adapter;
|
|
||||||
|
|
||||||
private int sendGoldValue = 0;
|
|
||||||
|
|
||||||
private UserInfo doneeInfo;
|
|
||||||
|
|
||||||
public static void start(Context context) {
|
|
||||||
UserInfo userInfo = UserModel.get().getCacheLoginUserInfo();
|
|
||||||
if (userInfo == null) {
|
|
||||||
SingleToastUtil.showToast(ResUtil.getString(R.string.wallet_sendgold_sendgoldactivity_01));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!userInfo.isBindPhone() || !userInfo.isBindPaymentPwd()) {
|
|
||||||
SingleToastUtil.showToast(ResUtil.getString(R.string.wallet_sendgold_sendgoldactivity_02));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Intent intent = new Intent(context, SendGoldActivity.class);
|
|
||||||
context.startActivity(intent);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void init() {
|
|
||||||
initTitleBar(R.string.gold_give);
|
|
||||||
EventBus.getDefault().register(this);
|
|
||||||
//查询钱包
|
|
||||||
PayModel.get().getWalletInfo(AuthModel.get().getCurrentUid())
|
|
||||||
.subscribe();
|
|
||||||
initRvGoldList();
|
|
||||||
initView();
|
|
||||||
//获取钻石转赠列表
|
|
||||||
model.getGiveItemList()
|
|
||||||
.compose(bindUntilEvent(ActivityEvent.DESTROY))
|
|
||||||
.subscribe(new DontWarnObserver<List<GiveInfo>>() {
|
|
||||||
@Override
|
|
||||||
public void accept(List<GiveInfo> giveInfos, String error) {
|
|
||||||
super.accept(giveInfos, error);
|
|
||||||
if (error != null) {
|
|
||||||
toast(error);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
for (int i = 0; i < giveInfos.size(); i++) {
|
|
||||||
giveInfos.get(i).setSelected(i == 0);
|
|
||||||
}
|
|
||||||
adapter.setNewData(giveInfos);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initRvGoldList() {
|
|
||||||
binding.rvGold.setLayoutManager(new GridLayoutManager(context, 2));
|
|
||||||
binding.rvGold.addItemDecoration(new GridSpacingItemDecoration(context, 2, 15));
|
|
||||||
adapter = new SendGoldListAdpater();
|
|
||||||
binding.rvGold.setAdapter(adapter);
|
|
||||||
|
|
||||||
adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onItemClick(BaseQuickAdapter a, View view, int position) {
|
|
||||||
binding.etCustomInput.setText("");
|
|
||||||
binding.etCustomInput.clearFocus();
|
|
||||||
adapter.selectItem(position);
|
|
||||||
updateViewStatus();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initView() {
|
|
||||||
binding.etAccount.addTextChangedListener(new TextWatcherSimple() {
|
|
||||||
@Override
|
|
||||||
public void afterTextChanged(Editable s) {
|
|
||||||
updateViewStatus();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
binding.etCustomInput.clearFocus();
|
|
||||||
binding.etCustomInput.addTextChangedListener(new TextWatcherSimple() {
|
|
||||||
@Override
|
|
||||||
public void afterTextChanged(Editable s) {
|
|
||||||
adapter.clearAllSelected();
|
|
||||||
updateViewStatus();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
binding.btnGive.setOnClickListener(this);
|
|
||||||
binding.tvMyGiveRecord.setOnClickListener(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
||||||
public void onGetWalletInfo(GetWalletInfoEvent event) {
|
|
||||||
WalletInfo walletInfo = PayModel.get().getCurrentWalletInfo();
|
|
||||||
if (walletInfo == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
updateGoldRemain(walletInfo.chargeGoldNum);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateGoldRemain(double value) {
|
|
||||||
binding.tvWallGoldRemain.setText(FormatUtils.formatBigDecimal(value));
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateViewStatus() {
|
|
||||||
if (TextUtils.isEmpty(binding.etCustomInput.getText().toString())) {
|
|
||||||
binding.etCustomInput.setBackgroundResource(R.drawable.shape_gold_input_false);
|
|
||||||
} else {
|
|
||||||
binding.etCustomInput.setBackgroundResource(R.drawable.shape_gold_input_true);
|
|
||||||
}
|
|
||||||
if (TextUtils.isEmpty(binding.etAccount.getText().toString())) {
|
|
||||||
binding.btnGive.setEnabled(false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (adapter.hasSelectedItem()) {
|
|
||||||
binding.btnGive.setEnabled(true);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!TextUtils.isEmpty(binding.etCustomInput.getText().toString())) {
|
|
||||||
binding.btnGive.setEnabled(true);
|
|
||||||
} else {
|
|
||||||
binding.btnGive.setEnabled(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(View view) {
|
|
||||||
switch (view.getId()) {
|
|
||||||
case R.id.btn_give:
|
|
||||||
this.doneeInfo = null;
|
|
||||||
getDialogManager().showProgressDialog(context);
|
|
||||||
UserModel.get().getSimpleUser(binding.etAccount.getText().toString())
|
|
||||||
.compose(bindUntilEvent(ActivityEvent.DESTROY))
|
|
||||||
.subscribe(new DontWarnObserver<UserInfo>() {
|
|
||||||
@Override
|
|
||||||
public void accept(UserInfo info, String error) {
|
|
||||||
super.accept(info, error);
|
|
||||||
getDialogManager().dismissDialog();
|
|
||||||
if (error != null) {
|
|
||||||
toast(error);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
doneeInfo = info;
|
|
||||||
sendGoldValue = getSendGoldValue();
|
|
||||||
if (isValidSendValue()) {
|
|
||||||
handleConfirmSendGoldView(info);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
case R.id.tv_my_give_record:
|
|
||||||
startActivity(new Intent(context, ChargeBillsActivity.class));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void handleConfirmSendGoldView(UserInfo info) {
|
|
||||||
View confirmSendGoldView = View.inflate(context, R.layout.dialog_custom_confirm_send_gold, null);
|
|
||||||
ImageView ivAvatar = confirmSendGoldView.findViewById(R.id.iv_avatar);
|
|
||||||
TextView tvInfo = confirmSendGoldView.findViewById(R.id.tv_info);
|
|
||||||
TextView tvSendNumber = confirmSendGoldView.findViewById(R.id.tv_send_number);
|
|
||||||
|
|
||||||
ImageLoadUtils.loadAvatar(info.getAvatar(), ivAvatar);
|
|
||||||
tvInfo.setText(getString(R.string.send_gold_confirm_info, RegexUtil.getPrintableString(info.getNick()),
|
|
||||||
String.valueOf(info.getErbanNo())));
|
|
||||||
SpannableBuilder builder = new SpannableBuilder();
|
|
||||||
builder.append(ResUtil.getString(R.string.wallet_sendgold_sendgoldactivity_03))
|
|
||||||
.append(String.valueOf(sendGoldValue), new ForegroundColorSpan(getResources().getColor(R.color.color_FE4C62)))
|
|
||||||
.append(ResUtil.getString(R.string.wallet_sendgold_sendgoldactivity_04));
|
|
||||||
tvSendNumber.setText(builder.build());
|
|
||||||
getDialogManager().showOkCancelCustomDialog(confirmSendGoldView, false, () -> {
|
|
||||||
hideIME();
|
|
||||||
PassWordFragment.newInstance(PassWordFragment.TYPE_SEND_GOLD)
|
|
||||||
.show(getSupportFragmentManager());
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
||||||
public void onPasswordEvent(PasswordEvent event) {
|
|
||||||
if (TextUtils.isEmpty(event.getPassword())) {
|
|
||||||
toast(ResUtil.getString(R.string.wallet_sendgold_sendgoldactivity_05));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (event.getType() != PassWordFragment.TYPE_SEND_GOLD) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!isValidSendValue()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (doneeInfo == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
getDialogManager().showProgressDialog(context, "", false, false, null);
|
|
||||||
model.giveGold(doneeInfo.getUid(), sendGoldValue, event.getPassword())
|
|
||||||
.compose(bindUntilEvent(ActivityEvent.DESTROY))
|
|
||||||
.subscribe(new DontWarnObserver<Integer>() {
|
|
||||||
@Override
|
|
||||||
public void accept(Integer integer, String error) {
|
|
||||||
super.accept(integer, error);
|
|
||||||
getDialogManager().dismissDialog();
|
|
||||||
doneeInfo = null;
|
|
||||||
if (error != null) {
|
|
||||||
toast(error);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
toast(ResUtil.getString(R.string.wallet_sendgold_sendgoldactivity_06));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getSendGoldValue() {
|
|
||||||
int value;
|
|
||||||
String customInput = binding.etCustomInput.getText().toString();
|
|
||||||
if (!TextUtils.isEmpty(customInput)) {
|
|
||||||
value = JavaUtil.str2int(customInput);
|
|
||||||
} else {
|
|
||||||
value = adapter.getSelectItemValue();
|
|
||||||
}
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isValidSendValue() {
|
|
||||||
if (sendGoldValue <= 0) {
|
|
||||||
toast(ResUtil.getString(R.string.wallet_sendgold_sendgoldactivity_07));
|
|
||||||
}
|
|
||||||
return sendGoldValue > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
||||||
public void onSendGoldSuccessEvent(SendGoldSuccessEvent event) {
|
|
||||||
if (event.getData() == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
updateGoldRemain(event.getData());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onDestroy() {
|
|
||||||
EventBus.getDefault().unregister(this);
|
|
||||||
super.onDestroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void finish() {
|
|
||||||
hideIME();
|
|
||||||
super.finish();
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,77 +0,0 @@
|
|||||||
package com.chwl.app.ui.wallet.sendgold;
|
|
||||||
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
|
||||||
import com.chad.library.adapter.base.BaseViewHolder;
|
|
||||||
import com.chwl.app.R;
|
|
||||||
import com.chwl.core.pay.bean.GiveInfo;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* create by lvzebiao @2019/12/1
|
|
||||||
*/
|
|
||||||
public class SendGoldListAdpater extends BaseQuickAdapter<GiveInfo, BaseViewHolder> {
|
|
||||||
|
|
||||||
public SendGoldListAdpater() {
|
|
||||||
super(R.layout.item_give_gold_list);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void convert(BaseViewHolder baseViewHolder, GiveInfo item) {
|
|
||||||
if (item == null) return;
|
|
||||||
|
|
||||||
|
|
||||||
ImageView iv_gold = baseViewHolder.getView(R.id.iv_gold);
|
|
||||||
TextView tv_money_gold = baseViewHolder.getView(R.id.tv_money_gold);
|
|
||||||
|
|
||||||
tv_money_gold.setText(item.getGoldProdName());
|
|
||||||
baseViewHolder.getView(R.id.ll_gold_charge).setSelected(item.isSelected());
|
|
||||||
if (item.isSelected()) {
|
|
||||||
iv_gold.setImageResource(R.mipmap.ic_wallet_gold);
|
|
||||||
tv_money_gold.setTextColor(mContext.getResources().getColor(R.color.color_333333));
|
|
||||||
} else {
|
|
||||||
iv_gold.setImageResource(R.mipmap.ic_wallet_gold_unchecked);
|
|
||||||
tv_money_gold.setTextColor(mContext.getResources().getColor(R.color.color_999999));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean hasSelectedItem() {
|
|
||||||
List<GiveInfo> data = getData();
|
|
||||||
for (GiveInfo info : data) {
|
|
||||||
if (info.isSelected()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void clearAllSelected() {
|
|
||||||
List<GiveInfo> data = getData();
|
|
||||||
for (GiveInfo info : data) {
|
|
||||||
info.setSelected(false);
|
|
||||||
}
|
|
||||||
notifyDataSetChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void selectItem(int position) {
|
|
||||||
List<GiveInfo> data = getData();
|
|
||||||
for (int i = 0; i < data.size(); i++) {
|
|
||||||
data.get(i).setSelected(i == position);
|
|
||||||
}
|
|
||||||
notifyDataSetChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getSelectItemValue() {
|
|
||||||
List<GiveInfo> data = getData();
|
|
||||||
for (GiveInfo info : data) {
|
|
||||||
if (info.isSelected()) {
|
|
||||||
return info.getGoldNum();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -21,8 +21,6 @@ import com.netease.nim.uikit.common.util.log.LogUtil;
|
|||||||
import com.chwl.app.R;
|
import com.chwl.app.R;
|
||||||
import com.chwl.app.common.widget.dialog.DialogManager;
|
import com.chwl.app.common.widget.dialog.DialogManager;
|
||||||
import com.chwl.app.ui.setting.VerifyPhoneActivity;
|
import com.chwl.app.ui.setting.VerifyPhoneActivity;
|
||||||
import com.chwl.app.ui.wallet.ExchangeGoldActivity;
|
|
||||||
import com.chwl.app.ui.withdraw.WithdrawActivity;
|
|
||||||
import com.chwl.library.utils.codec.DESUtils;
|
import com.chwl.library.utils.codec.DESUtils;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
@@ -33,19 +31,10 @@ public class PassWordFragment extends DialogFragment {
|
|||||||
private static final String TAG = "PassWordFragment";
|
private static final String TAG = "PassWordFragment";
|
||||||
|
|
||||||
public final static int TYPE_DEFALUT = 0;
|
public final static int TYPE_DEFALUT = 0;
|
||||||
/**
|
|
||||||
* 钻石转赠
|
|
||||||
*/
|
|
||||||
public final static int TYPE_SEND_GOLD = 1;
|
|
||||||
|
|
||||||
public final static String EXTRA_TYPE = "extra_type";
|
public final static String EXTRA_TYPE = "extra_type";
|
||||||
|
|
||||||
private PasswordView mPassword;
|
private PasswordView mPassword;
|
||||||
private boolean isFullScreen;
|
|
||||||
private ExchangeGoldActivity goldActivity;
|
|
||||||
private WithdrawActivity withdrawActivity;
|
|
||||||
private long value;
|
|
||||||
private int hammerNum;
|
|
||||||
/**用于标识密码类型*/
|
/**用于标识密码类型*/
|
||||||
private int type = TYPE_DEFALUT;
|
private int type = TYPE_DEFALUT;
|
||||||
|
|
||||||
@@ -83,11 +72,6 @@ public class PassWordFragment extends DialogFragment {
|
|||||||
@Override
|
@Override
|
||||||
public void onAttach(Activity activity) {
|
public void onAttach(Activity activity) {
|
||||||
super.onAttach(activity);
|
super.onAttach(activity);
|
||||||
if (activity instanceof ExchangeGoldActivity) {
|
|
||||||
goldActivity = (ExchangeGoldActivity) activity;
|
|
||||||
} else if (activity instanceof WithdrawActivity) {
|
|
||||||
withdrawActivity = (WithdrawActivity) activity;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -146,8 +130,6 @@ public class PassWordFragment extends DialogFragment {
|
|||||||
|
|
||||||
private void init(View view) {
|
private void init(View view) {
|
||||||
if (getArguments() != null) {
|
if (getArguments() != null) {
|
||||||
value = getArguments().getLong("values");
|
|
||||||
hammerNum = getArguments().getInt("hammerNum");
|
|
||||||
type = getArguments().getInt(EXTRA_TYPE, TYPE_DEFALUT);
|
type = getArguments().getInt(EXTRA_TYPE, TYPE_DEFALUT);
|
||||||
}
|
}
|
||||||
mPassword = (PasswordView) view.findViewById(R.id.view_password);
|
mPassword = (PasswordView) view.findViewById(R.id.view_password);
|
||||||
@@ -171,11 +153,6 @@ public class PassWordFragment extends DialogFragment {
|
|||||||
public void onTextChanged(String psw) {
|
public void onTextChanged(String psw) {
|
||||||
if (mPassword.getPassword().length() == 6) {
|
if (mPassword.getPassword().length() == 6) {
|
||||||
dismiss();
|
dismiss();
|
||||||
if (goldActivity != null) {
|
|
||||||
goldActivity.commit(value, hammerNum, mPassword.getPassword());
|
|
||||||
} else if (withdrawActivity != null) {
|
|
||||||
withdrawActivity.commit(mPassword.getPassword());
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
EventBus.getDefault().post(new PasswordEvent().setType(type)
|
EventBus.getDefault().post(new PasswordEvent().setType(type)
|
||||||
.setPassword(
|
.setPassword(
|
||||||
|
@@ -1,245 +0,0 @@
|
|||||||
package com.chwl.app.ui.withdraw;
|
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.text.Editable;
|
|
||||||
import android.text.InputFilter;
|
|
||||||
import android.text.TextWatcher;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.Button;
|
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import com.netease.nim.uikit.StatusBarUtil;
|
|
||||||
import com.chwl.app.R;
|
|
||||||
import com.chwl.app.base.BaseActivity;
|
|
||||||
import com.chwl.app.ui.login.CodeDownTimer;
|
|
||||||
import com.chwl.core.auth.AuthModel;
|
|
||||||
import com.chwl.core.code.CodeType;
|
|
||||||
import com.chwl.core.user.UserModel;
|
|
||||||
import com.chwl.core.user.bean.UserInfo;
|
|
||||||
import com.chwl.core.utils.net.BeanObserver;
|
|
||||||
import com.chwl.core.withdraw.WithdrawModel;
|
|
||||||
import com.chwl.core.withdraw.bean.WithdrawInfo;
|
|
||||||
import com.chwl.library.utils.FormatUtils;
|
|
||||||
import com.chwl.library.utils.ResUtil;
|
|
||||||
|
|
||||||
import java.text.MessageFormat;
|
|
||||||
|
|
||||||
import io.reactivex.Single;
|
|
||||||
import io.reactivex.SingleObserver;
|
|
||||||
import io.reactivex.SingleSource;
|
|
||||||
import io.reactivex.disposables.Disposable;
|
|
||||||
import io.reactivex.functions.Function;
|
|
||||||
|
|
||||||
public class BinderAlipayActivity extends BaseActivity {
|
|
||||||
private EditText etAlipayAccount;
|
|
||||||
private EditText etAlipayName;
|
|
||||||
private EditText etSmsCode;
|
|
||||||
private ImageView ivNameDelete;
|
|
||||||
private ImageView ivCodeDelete;
|
|
||||||
private Button btnGetCode;
|
|
||||||
private Button btnBinder;
|
|
||||||
private Button btnBinderRquest;
|
|
||||||
private TextView tvSendSmsCodeResult;
|
|
||||||
|
|
||||||
private CodeDownTimer timer;
|
|
||||||
|
|
||||||
|
|
||||||
private TextWatcher textWatcher;
|
|
||||||
|
|
||||||
public static void start(Context context, WithdrawInfo withdrawInfo) {
|
|
||||||
Intent intent = new Intent(context, BinderAlipayActivity.class);
|
|
||||||
if (withdrawInfo != null) {
|
|
||||||
Bundle mBundle = new Bundle();
|
|
||||||
mBundle.putSerializable("withdrawInfo", withdrawInfo);
|
|
||||||
intent.putExtras(mBundle);
|
|
||||||
}
|
|
||||||
context.startActivity(intent);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void start(Context context) {
|
|
||||||
Intent intent = new Intent(context, BinderAlipayActivity.class);
|
|
||||||
context.startActivity(intent);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.activity_binder_alipay);
|
|
||||||
initWhiteTitleBar(ResUtil.getString(R.string.ui_withdraw_binderalipayactivity_01));
|
|
||||||
initView();
|
|
||||||
initData();
|
|
||||||
onSetListener();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onDestroy() {
|
|
||||||
super.onDestroy();
|
|
||||||
stopCountDownTimer();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void onSetListener() {
|
|
||||||
ivNameDelete.setOnClickListener(v -> etAlipayName.setText(""));
|
|
||||||
ivCodeDelete.setOnClickListener(v -> etSmsCode.setText(""));
|
|
||||||
//获取绑定支付宝验证码
|
|
||||||
btnGetCode.setOnClickListener(v -> {
|
|
||||||
startCountDownTimer();
|
|
||||||
StringBuffer phoneSB = new StringBuffer();
|
|
||||||
|
|
||||||
UserModel.get().getUserInfo(AuthModel.get().getCurrentUid())
|
|
||||||
.flatMap(new Function<UserInfo, SingleSource<String>>() {
|
|
||||||
@Override
|
|
||||||
public SingleSource<String> apply(UserInfo userInfo) throws Exception {
|
|
||||||
if (userInfo.isBindPhone()) {
|
|
||||||
String phone = userInfo.getPhone();
|
|
||||||
phoneSB.append(phone);
|
|
||||||
return AuthModel.get()
|
|
||||||
.sendLoginCode(phone, CodeType.BIND_ALI);
|
|
||||||
} else {
|
|
||||||
return Single.error(new Throwable(ResUtil.getString(R.string.ui_withdraw_binderalipayactivity_02)));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.compose(bindToLifecycle())
|
|
||||||
.subscribe(new SingleObserver<String>() {
|
|
||||||
@Override
|
|
||||||
public void onSubscribe(Disposable d) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSuccess(String s) {
|
|
||||||
String phoneMod = FormatUtils.formatPhoneNumWithPrivacy(phoneSB.toString(), 3, 7);
|
|
||||||
String msg = MessageFormat.format(getResources().getString(R.string.tips_bind_alipay_sms_code), phoneMod);
|
|
||||||
onGetSmsCode(msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onError(Throwable e) {
|
|
||||||
onGetSmsCodeFail(e.getMessage());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
tvSendSmsCodeResult.setText("");
|
|
||||||
});
|
|
||||||
|
|
||||||
//请求绑定支付宝
|
|
||||||
btnBinderRquest.setOnClickListener(v -> WithdrawModel.get().binderAlipay(
|
|
||||||
etAlipayAccount.getText().toString(),
|
|
||||||
etAlipayName.getText().toString(),
|
|
||||||
etSmsCode.getText().toString())
|
|
||||||
.subscribe(new BeanObserver<String>() {
|
|
||||||
@Override
|
|
||||||
public void onErrorMsg(String error) {
|
|
||||||
onBinderAlipayFail(error);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSuccess(String s) {
|
|
||||||
onBinderAlipay();
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
//输入框监听改变
|
|
||||||
textWatcher = new TextWatcher() {
|
|
||||||
@Override
|
|
||||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void afterTextChanged(Editable s) {
|
|
||||||
if (etAlipayAccount.getText() != null && etAlipayAccount.getText().length() > 0
|
|
||||||
&& etAlipayName.getText() != null && etAlipayName.getText().length() > 0
|
|
||||||
&& etSmsCode.getText() != null && etSmsCode.getText().length() > 0) {
|
|
||||||
btnBinder.setVisibility(View.GONE);
|
|
||||||
btnBinderRquest.setVisibility(View.VISIBLE);
|
|
||||||
} else {
|
|
||||||
btnBinder.setVisibility(View.VISIBLE);
|
|
||||||
btnBinderRquest.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
etAlipayAccount.addTextChangedListener(textWatcher);
|
|
||||||
etAlipayName.addTextChangedListener(textWatcher);
|
|
||||||
etSmsCode.addTextChangedListener(textWatcher);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onGetSmsCode(String msg) {
|
|
||||||
tvSendSmsCodeResult.setText(msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onGetSmsCodeFail(String error) {
|
|
||||||
toast(error);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressLint("CheckResult")
|
|
||||||
public void onBinderAlipay() {
|
|
||||||
UserModel.get().updateCurrentUserInfo().subscribe(userInfo -> {
|
|
||||||
toast(ResUtil.getString(R.string.ui_withdraw_binderalipayactivity_03));
|
|
||||||
finish();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onBinderAlipayFail(String error) {
|
|
||||||
toast(error);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initData() {
|
|
||||||
WithdrawInfo info = (WithdrawInfo) getIntent().getSerializableExtra("withdrawInfo");
|
|
||||||
if (info != null && info.isNotBoundPhone != null && !info.isNotBoundPhone) {
|
|
||||||
etAlipayAccount.setText(info.zxcAccount);
|
|
||||||
etAlipayName.setText(info.zxcAccountName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initView() {
|
|
||||||
etAlipayAccount = (EditText) findViewById(R.id.et_phone);
|
|
||||||
etAlipayName = (EditText) findViewById(R.id.et_name);
|
|
||||||
etSmsCode = (EditText) findViewById(R.id.et_smscode);
|
|
||||||
etSmsCode.setFilters(new InputFilter[]{new InputFilter.LengthFilter(5)});
|
|
||||||
ivNameDelete = findViewById(R.id.iv_name_delete);
|
|
||||||
ivCodeDelete = findViewById(R.id.iv_code_delete);
|
|
||||||
btnGetCode = (Button) findViewById(R.id.btn_get_code);
|
|
||||||
btnBinder = (Button) findViewById(R.id.btn_binder);
|
|
||||||
btnBinderRquest = (Button) findViewById(R.id.btn_binder_request);
|
|
||||||
tvSendSmsCodeResult = (TextView) findViewById(R.id.tv_send_sms_code_result);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void startCountDownTimer() {
|
|
||||||
stopCountDownTimer();
|
|
||||||
timer = new CodeDownTimer(btnGetCode, 60000, 1000);
|
|
||||||
timer.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void stopCountDownTimer() {
|
|
||||||
if (timer != null) {
|
|
||||||
timer.cancel();
|
|
||||||
timer = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected boolean needSteepStateBar() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void setStatusBar() {
|
|
||||||
super.setStatusBar();
|
|
||||||
StatusBarUtil.transparencyBar(this);
|
|
||||||
StatusBarUtil.StatusBarLightMode(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -1,441 +0,0 @@
|
|||||||
package com.chwl.app.ui.withdraw;
|
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.text.TextUtils;
|
|
||||||
import android.text.style.ForegroundColorSpan;
|
|
||||||
import android.view.View;
|
|
||||||
|
|
||||||
import androidx.recyclerview.widget.GridLayoutManager;
|
|
||||||
|
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
|
||||||
import com.trello.rxlifecycle3.android.ActivityEvent;
|
|
||||||
import com.chwl.app.R;
|
|
||||||
import com.chwl.app.base.BaseViewBindingActivity;
|
|
||||||
import com.chwl.app.base.TitleBar;
|
|
||||||
import com.chwl.app.bills.activities.WithdrawBillsActivity;
|
|
||||||
import com.chwl.app.common.widget.dialog.DialogManager;
|
|
||||||
import com.chwl.app.databinding.ActivityWithdrawBinding;
|
|
||||||
import com.chwl.app.ui.setting.ModifyPwdActivity;
|
|
||||||
import com.chwl.app.ui.wallet.adapter.WithdrawJewelAdapter;
|
|
||||||
import com.chwl.app.ui.webview.CommonWebViewActivity;
|
|
||||||
import com.chwl.app.ui.widget.password.PassWordFragment;
|
|
||||||
import com.chwl.app.ui.withdraw.bankcard.BindWithdrawBankCardActivity;
|
|
||||||
import com.chwl.app.utils.SpannableBuilder;
|
|
||||||
import com.chwl.core.UriProvider;
|
|
||||||
import com.chwl.core.auth.AuthModel;
|
|
||||||
import com.chwl.core.initial.bean.TaxInfo;
|
|
||||||
import com.chwl.core.user.UserModel;
|
|
||||||
import com.chwl.core.user.bean.UserInfo;
|
|
||||||
import com.chwl.core.utils.net.BeanObserver;
|
|
||||||
import com.chwl.core.withdraw.WithdrawModel;
|
|
||||||
import com.chwl.core.withdraw.bean.ExchangerInfo;
|
|
||||||
import com.chwl.core.withdraw.bean.RefreshInfo;
|
|
||||||
import com.chwl.core.withdraw.bean.WithdrawInfo;
|
|
||||||
import com.chwl.core.withdraw.bean.WithdrwaListInfo;
|
|
||||||
import com.chwl.library.utils.FormatUtils;
|
|
||||||
import com.chwl.library.utils.ListUtils;
|
|
||||||
import com.chwl.library.utils.ResUtil;
|
|
||||||
|
|
||||||
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 WithdrawActivity extends BaseViewBindingActivity<ActivityWithdrawBinding> {
|
|
||||||
|
|
||||||
private TitleBar mTitleBar;
|
|
||||||
public WithdrwaListInfo checkedPosition;
|
|
||||||
private WithdrawJewelAdapter mJewelAdapter;
|
|
||||||
private WithdrawInfo withdrawInfos = new WithdrawInfo();
|
|
||||||
|
|
||||||
private int withdrawAccountType = WithdrawInfo.ACCOUNT_TYPE_ALIPAY;
|
|
||||||
/**
|
|
||||||
* 如果成功加载提现信息,此字段才为true
|
|
||||||
*/
|
|
||||||
private boolean loadedWithdrawInfo = false;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void init() {
|
|
||||||
EventBus.getDefault().register(this);
|
|
||||||
initTitleBar(getString(R.string.withdraw));
|
|
||||||
initView();
|
|
||||||
setListener();
|
|
||||||
initData();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initData() {
|
|
||||||
binding.recyclerView.setLayoutManager(new GridLayoutManager(this, 3));
|
|
||||||
binding.recyclerView.setNestedScrollingEnabled(false);
|
|
||||||
mJewelAdapter = new WithdrawJewelAdapter();
|
|
||||||
mJewelAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onItemClick(BaseQuickAdapter baseQuickAdapter, View view, int position) {
|
|
||||||
List<WithdrwaListInfo> list = mJewelAdapter.getData();
|
|
||||||
if (ListUtils.isListEmpty(list)) return;
|
|
||||||
int size = list.size();
|
|
||||||
for (int i = 0; i < size; i++) {
|
|
||||||
list.get(i).isSelected = position == i;
|
|
||||||
}
|
|
||||||
mJewelAdapter.notifyDataSetChanged();
|
|
||||||
checkedPosition = list.get(position);
|
|
||||||
|
|
||||||
updateWithdrawView();
|
|
||||||
updateIncomeMoney();
|
|
||||||
if (isWithdraw()) {
|
|
||||||
binding.btnWithdraw.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
if (!loadedWithdrawInfo || withdrawInfos == null) {
|
|
||||||
toast(ResUtil.getString(R.string.ui_withdraw_withdrawactivity_01));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (checkedPosition == null) {
|
|
||||||
toast(ResUtil.getString(R.string.ui_withdraw_withdrawactivity_02));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!withdrawInfos.isBindAlipay()) {
|
|
||||||
getDialogManager().showOkCancelWithTitleDialog(ResUtil.getString(R.string.ui_withdraw_withdrawactivity_03), ResUtil.getString(R.string.ui_withdraw_withdrawactivity_04),
|
|
||||||
() -> BinderAlipayActivity.start(context, withdrawInfos));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!withdrawInfos.isBindBankCard()
|
|
||||||
&& checkedPosition.getCashNum() >= withdrawInfos.getBankCardMinAmount()) {
|
|
||||||
showBindBankCardDialog();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
UserInfo userInfo = UserModel.get().getCacheLoginUserInfo();
|
|
||||||
if (userInfo != null) {
|
|
||||||
if (userInfo.isBindPaymentPwd()) {
|
|
||||||
//发起兑换
|
|
||||||
getDialogManager().showOkCancelDialog(
|
|
||||||
ResUtil.getString(R.string.ui_withdraw_withdrawactivity_05) + checkedPosition.getCashProdName(),
|
|
||||||
true, new DialogManager.OkCancelDialogListener() {
|
|
||||||
@Override
|
|
||||||
public void onCancel() {
|
|
||||||
getDialogManager().dismissDialog();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onOk() {
|
|
||||||
getDialogManager().dismissDialog();
|
|
||||||
if (checkedPosition != null) {
|
|
||||||
PassWordFragment.newInstace(0).show(getSupportFragmentManager());
|
|
||||||
} else {
|
|
||||||
toast(ResUtil.getString(R.string.ui_withdraw_withdrawactivity_06));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
ModifyPwdActivity.start(WithdrawActivity.this, ModifyPwdActivity.FOGERT_PAY_PWD);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
binding.recyclerView.setAdapter(mJewelAdapter);
|
|
||||||
loadAlipayInfo();
|
|
||||||
loadRecyclerViewData();
|
|
||||||
|
|
||||||
//提示语
|
|
||||||
TaxInfo texInfo = WithdrawModel.get().getTaxInfo();
|
|
||||||
if (null != texInfo) {
|
|
||||||
binding.tvTip.setVisibility(View.VISIBLE);
|
|
||||||
binding.tvTip.setText(texInfo.getTips());
|
|
||||||
} else {
|
|
||||||
binding.tvTip.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressLint("CheckResult")
|
|
||||||
public void commit(String pwd) {
|
|
||||||
//1 提现到支付宝 3-提现到银行卡 如果是大额提现,只能 提现到银行卡
|
|
||||||
int paramType;
|
|
||||||
if (isBigMoneyWithdraw()) {
|
|
||||||
paramType = WithdrawInfo.ACCOUNT_TYPE_BANK_CARD;
|
|
||||||
} else {
|
|
||||||
paramType = withdrawAccountType;
|
|
||||||
}
|
|
||||||
WithdrawModel.get().requestExchange(
|
|
||||||
AuthModel.get().getCurrentUid(),
|
|
||||||
checkedPosition.cashProdId, DESAndBase64(pwd), paramType
|
|
||||||
).subscribe((exchangerInfo, throwable) -> {
|
|
||||||
if (throwable == null) {
|
|
||||||
onRequestExchange(exchangerInfo);
|
|
||||||
} else {
|
|
||||||
throwable.printStackTrace();
|
|
||||||
toast(throwable.getMessage());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadAlipayInfo() {
|
|
||||||
WithdrawModel.get().getWithdrawUserInfo(
|
|
||||||
AuthModel.get().getCurrentUid()
|
|
||||||
)
|
|
||||||
.compose(bindUntilEvent(ActivityEvent.DESTROY))
|
|
||||||
.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) {
|
|
||||||
loadedWithdrawInfo = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
loadedWithdrawInfo = true;
|
|
||||||
withdrawInfos = withdrawInfo;
|
|
||||||
binding.tvDiamondNums.setText(FormatUtils.formatBigDecimal(withdrawInfo.diamondNum));
|
|
||||||
|
|
||||||
withdrawAccountType = withdrawInfos.getDefaultWithdrawAccountType();
|
|
||||||
|
|
||||||
binding.tvWithdrawType.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
if (withdrawAccountType == WithdrawInfo.ACCOUNT_TYPE_ALIPAY) {
|
|
||||||
//切到银行卡
|
|
||||||
withdrawAccountType = WithdrawInfo.ACCOUNT_TYPE_BANK_CARD;
|
|
||||||
} else {
|
|
||||||
//切到支付宝
|
|
||||||
withdrawAccountType = WithdrawInfo.ACCOUNT_TYPE_ALIPAY;
|
|
||||||
}
|
|
||||||
|
|
||||||
updateWithdrawView();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
updateWithdrawView();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新提现信息 或者 选中提现item时 更新View显示
|
|
||||||
*/
|
|
||||||
private void updateWithdrawView() {
|
|
||||||
if (withdrawInfos == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!loadedWithdrawInfo) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (withdrawAccountType == WithdrawInfo.ACCOUNT_TYPE_BANK_CARD) {
|
|
||||||
binding.tvWithdrawType.setText(R.string.withdraw_type_alipay);
|
|
||||||
} else {
|
|
||||||
binding.tvWithdrawType.setText(R.string.withdraw_type_bank_card);
|
|
||||||
}
|
|
||||||
|
|
||||||
//切换按钮是否展示
|
|
||||||
binding.tvWithdrawType.setVisibility(View.VISIBLE);
|
|
||||||
//选中大额、没有绑卡、后台关闭 的情况下,不显示切换按钮
|
|
||||||
if (isBigMoneyWithdraw() || !withdrawInfos.isBindBankCard() || !withdrawInfos.isSwitchButtonShow()) {
|
|
||||||
binding.tvWithdrawType.setVisibility(View.INVISIBLE);
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.rlyBinderSucceed.setOnClickListener(null);
|
|
||||||
if (!isBindAliAccount()) {
|
|
||||||
binding.rlyBinder.setVisibility(View.VISIBLE);
|
|
||||||
binding.rlyBinderSucceed.setVisibility(View.GONE);
|
|
||||||
} else {
|
|
||||||
binding.rlyBinder.setVisibility(View.GONE);
|
|
||||||
binding.rlyBinderSucceed.setVisibility(View.VISIBLE);
|
|
||||||
binding.zhifubao.setImageResource(R.drawable.icon_zhifubao);
|
|
||||||
binding.tvUserZhifubao.setText(getString(R.string.withdraw_format_alipay_account, withdrawInfos.zxcAccount));
|
|
||||||
binding.tvUserZhifubaoName.setText(getString(R.string.withdraw_format_alipay_name, withdrawInfos.zxcAccountName));
|
|
||||||
|
|
||||||
//用户点击修改支付宝信息
|
|
||||||
binding.rlyBinderSucceed.setOnClickListener(v -> BinderAlipayActivity.start(context, withdrawInfos));
|
|
||||||
|
|
||||||
//大额提现显示银行卡,后台配置默认是银行卡时,也显示银行卡
|
|
||||||
if ((isBigMoneyWithdraw() || withdrawAccountType == WithdrawInfo.ACCOUNT_TYPE_BANK_CARD)
|
|
||||||
&& withdrawInfos.isBindBankCard()) {
|
|
||||||
binding.zhifubao.setImageResource(R.drawable.icon_withdraw_bank_card);
|
|
||||||
binding.tvUserZhifubao.setText(getString(R.string.withdraw_format_bank_card_account, withdrawInfos.getBankCardNum()));
|
|
||||||
binding.tvUserZhifubaoName.setText(getString(R.string.withdraw_format_bank_card_name, withdrawInfos.getBankCardName()));
|
|
||||||
//用户点击修改银行卡信息
|
|
||||||
binding.rlyBinderSucceed.setOnClickListener(v -> startActivity(new Intent(this, BindWithdrawBankCardActivity.class)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新手续费、收入金额
|
|
||||||
*/
|
|
||||||
private void updateIncomeMoney() {
|
|
||||||
if (checkedPosition == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.tvTaxMoney.setText(getString(R.string.withdraw_format_tax_money,
|
|
||||||
String.valueOf(checkedPosition.getWithdrawalFee())));
|
|
||||||
binding.tvIncomeMoney.setText(getString(R.string.withdraw_format_income_money,
|
|
||||||
String.valueOf(checkedPosition.getActualArrival())));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 判断是否大额提现
|
|
||||||
*/
|
|
||||||
private boolean isBigMoneyWithdraw() {
|
|
||||||
return loadedWithdrawInfo && withdrawInfos != null && checkedPosition != null &&
|
|
||||||
checkedPosition.getCashNum() >= withdrawInfos.getBankCardMinAmount();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否绑定支付宝
|
|
||||||
*/
|
|
||||||
private boolean isBindAliAccount() {
|
|
||||||
return withdrawInfos != null && !TextUtils.isEmpty(withdrawInfos.zxcAccount) && !withdrawInfos.zxcAccount.equals("null");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadRecyclerViewData() {
|
|
||||||
WithdrawModel.get().getWithdrawList()
|
|
||||||
.subscribe(new BeanObserver<List<WithdrwaListInfo>>() {
|
|
||||||
@Override
|
|
||||||
public void onSuccess(List<WithdrwaListInfo> withdrwaListInfos) {
|
|
||||||
onGetWithdrawList(withdrwaListInfos);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onErrorMsg(String error) {
|
|
||||||
onGetWithdrawListFail(error);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onGetWithdrawList(List<WithdrwaListInfo> withdrwaListInfo) {
|
|
||||||
if (withdrwaListInfo != null && withdrwaListInfo.size() > 0) {
|
|
||||||
mJewelAdapter.setNewData(withdrwaListInfo);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onGetWithdrawListFail(String error) {
|
|
||||||
toast(ResUtil.getString(R.string.ui_withdraw_withdrawactivity_07));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void setListener() {
|
|
||||||
//用户点击绑定支付宝
|
|
||||||
binding.rlyBinder.setOnClickListener(v -> {
|
|
||||||
//跳转绑定手机号码,绑定成功以后显示bindersucceed
|
|
||||||
BinderAlipayActivity.start(context, withdrawInfos);
|
|
||||||
});
|
|
||||||
|
|
||||||
binding.tvWithdrawRule.setOnClickListener(v -> CommonWebViewActivity.start(
|
|
||||||
context, UriProvider.IM_SERVER_URL + "/hiyoo/modules/guide/output.html"));
|
|
||||||
|
|
||||||
//切换类型
|
|
||||||
binding.tvWithdrawType.setVisibility(View.GONE);
|
|
||||||
binding.tvWithdrawType.setOnClickListener(v -> {
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isWithdraw() {
|
|
||||||
if (withdrawInfos == null || withdrawInfos.isNotBoundPhone == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!withdrawInfos.isNotBoundPhone) {
|
|
||||||
if (checkedPosition != null) {
|
|
||||||
//用户的钻石余额 > 选中金额的钻石数时
|
|
||||||
if (withdrawInfos.diamondNum >= checkedPosition.diamondNum) {
|
|
||||||
binding.btnWithdrawUn.setVisibility(View.GONE);
|
|
||||||
binding.btnWithdraw.setVisibility(View.VISIBLE);
|
|
||||||
} else {
|
|
||||||
binding.btnWithdrawUn.setVisibility(View.VISIBLE);
|
|
||||||
binding.btnWithdraw.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
//如果选中position不为空的时候
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void onRequestExchange(ExchangerInfo exchangerInfo) {
|
|
||||||
if (exchangerInfo != null) {
|
|
||||||
binding.tvDiamondNums.setText(FormatUtils.formatBigDecimal(exchangerInfo.diamondNum));
|
|
||||||
toast(ResUtil.getString(R.string.ui_withdraw_withdrawactivity_08));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initView() {
|
|
||||||
binding.tvWithdrawType.setVisibility(View.INVISIBLE);
|
|
||||||
binding.tvTaxMoney.setText("");
|
|
||||||
binding.tvIncomeMoney.setText("");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void initTitleBar(String title) {
|
|
||||||
mTitleBar = findViewById(R.id.title_bar);
|
|
||||||
if (mTitleBar != null) {
|
|
||||||
mTitleBar.setTitle(title);
|
|
||||||
mTitleBar.setImmersive(false);
|
|
||||||
mTitleBar.setTitleColor(getResources().getColor(R.color.black));
|
|
||||||
mTitleBar.setLeftImageResource(R.drawable.arrow_left);
|
|
||||||
mTitleBar.setLeftClickListener(v -> finish());
|
|
||||||
}
|
|
||||||
mTitleBar.setActionTextColor(getResources().getColor(R.color.text_tertiary));
|
|
||||||
mTitleBar.addAction(new TitleBar.TextAction(ResUtil.getString(R.string.ui_withdraw_withdrawactivity_09)) {
|
|
||||||
@Override
|
|
||||||
public void performAction(View view) {
|
|
||||||
startActivity(new Intent(getApplicationContext(), WithdrawBillsActivity.class));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
||||||
public void refreshEvent(RefreshInfo refreshInfo) {
|
|
||||||
loadAlipayInfo();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void showBindBankCardDialog() {
|
|
||||||
if (withdrawInfos == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
SpannableBuilder builder = new SpannableBuilder();
|
|
||||||
builder.append(ResUtil.getString(R.string.ui_withdraw_withdrawactivity_010))
|
|
||||||
.append(ResUtil.getString(R.string.ui_withdraw_withdrawactivity_011) + withdrawInfos.getBankCardMinAmount(),
|
|
||||||
new ForegroundColorSpan(getResources().getColor(R.color.color_FF3B30)))
|
|
||||||
.append(ResUtil.getString(R.string.ui_withdraw_withdrawactivity_012))
|
|
||||||
.append(ResUtil.getString(R.string.ui_withdraw_withdrawactivity_013),
|
|
||||||
new ForegroundColorSpan(getResources().getColor(R.color.color_FF3B30)));
|
|
||||||
getDialogManager().showOkCancelWithTitleDialog(builder.build(), ResUtil.getString(R.string.ui_withdraw_withdrawactivity_014),
|
|
||||||
() -> startActivity(new Intent(context, BindWithdrawBankCardActivity.class)));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onDestroy() {
|
|
||||||
super.onDestroy();
|
|
||||||
EventBus.getDefault().unregister(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -1,21 +0,0 @@
|
|||||||
package com.chwl.app.ui.withdraw;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.webkit.WebView;
|
|
||||||
|
|
||||||
import com.chwl.app.R;
|
|
||||||
import com.chwl.app.base.BaseActivity;
|
|
||||||
import com.chwl.core.UriProvider;
|
|
||||||
import com.chwl.library.utils.ResUtil;
|
|
||||||
|
|
||||||
public class WithdrawRuleActivity extends BaseActivity {
|
|
||||||
private WebView mWebView;
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.activity_withdraw_rule);
|
|
||||||
initTitleBar(ResUtil.getString(R.string.ui_withdraw_withdrawruleactivity_01));
|
|
||||||
mWebView = (WebView) findViewById(R.id.wv_view);
|
|
||||||
mWebView.loadUrl(UriProvider.IM_SERVER_URL+"/hiyoo/modules/guide/withdraw.html");
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,159 +0,0 @@
|
|||||||
package com.chwl.app.ui.withdraw.bankcard;
|
|
||||||
|
|
||||||
import android.text.Editable;
|
|
||||||
import android.text.TextUtils;
|
|
||||||
import android.view.View;
|
|
||||||
|
|
||||||
import com.trello.rxlifecycle3.android.ActivityEvent;
|
|
||||||
import com.chwl.app.R;
|
|
||||||
import com.chwl.app.base.BaseViewBindingActivity;
|
|
||||||
import com.chwl.app.databinding.ActivityBindWithdrawBankCardBinding;
|
|
||||||
import com.chwl.app.ui.login.CodeDownTimer;
|
|
||||||
import com.chwl.app.ui.widget.TextWatcherSimple;
|
|
||||||
import com.chwl.core.code.CodeModel;
|
|
||||||
import com.chwl.core.code.CodeType;
|
|
||||||
import com.chwl.core.user.UserModel;
|
|
||||||
import com.chwl.core.user.bean.UserInfo;
|
|
||||||
import com.chwl.core.utils.net.DontWarnObserver;
|
|
||||||
import com.chwl.core.withdraw.WithdrawModel;
|
|
||||||
import com.chwl.library.utils.ResUtil;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* create by lvzebiao @2019/12/24
|
|
||||||
*/
|
|
||||||
public class BindWithdrawBankCardActivity extends BaseViewBindingActivity<ActivityBindWithdrawBankCardBinding> {
|
|
||||||
|
|
||||||
private CodeDownTimer timer;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void init() {
|
|
||||||
initTitleBar(R.string.text_setting_bind_bank_card_account);
|
|
||||||
initView();
|
|
||||||
initListener();
|
|
||||||
initData();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initView() {
|
|
||||||
binding.etBankCardNumber.addTextChangedListener(new CustomTextWather());
|
|
||||||
binding.etBankCardName.addTextChangedListener(new CustomTextWather());
|
|
||||||
binding.etBankCardBindSmsCode.addTextChangedListener(new CustomTextWather());
|
|
||||||
UserInfo userInfo = UserModel.get().getCacheLoginUserInfo();
|
|
||||||
if (userInfo != null) {
|
|
||||||
String bankCardNumPlain = userInfo.getBankCardNumPlain();
|
|
||||||
if (!TextUtils.isEmpty(bankCardNumPlain)) {
|
|
||||||
binding.etBankCardNumber.setText(bankCardNumPlain);
|
|
||||||
binding.etBankCardNumber.setSelection(bankCardNumPlain.length());
|
|
||||||
}
|
|
||||||
String bankCardName = userInfo.getBankCardName();
|
|
||||||
if (!TextUtils.isEmpty(bankCardName)) {
|
|
||||||
binding.etBankCardName.setText(bankCardName);
|
|
||||||
binding.etBankCardName.setSelection(bankCardName.length());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initListener() {
|
|
||||||
binding.btnGetCode.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View view) {
|
|
||||||
UserInfo userInfo = UserModel.get().getCacheLoginUserInfo();
|
|
||||||
if (userInfo == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
String phone = userInfo.getPhone();
|
|
||||||
if (TextUtils.isEmpty(phone)) {
|
|
||||||
toast(ResUtil.getString(R.string.withdraw_bankcard_bindwithdrawbankcardactivity_01));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
getDialogManager().showProgressDialog(context, true);
|
|
||||||
CodeModel.get().sendCode(phone, CodeType.BIND_WITHDRAW_BANK_CARD)
|
|
||||||
.compose(bindUntilEvent(ActivityEvent.DESTROY))
|
|
||||||
.subscribe(new DontWarnObserver<String>() {
|
|
||||||
@Override
|
|
||||||
public void accept(String s, String error) {
|
|
||||||
super.accept(s, error);
|
|
||||||
getDialogManager().dismissDialog();
|
|
||||||
if (error != null) {
|
|
||||||
toast(error);
|
|
||||||
} else {
|
|
||||||
toast(s);
|
|
||||||
binding.tvCodeTips.setText(
|
|
||||||
getString(R.string.withdraw_bank_card_code_tips, phone));
|
|
||||||
startCountDownTimer();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
binding.tvBindBankCard.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View view) {
|
|
||||||
getDialogManager().showProgressDialog(context, true);
|
|
||||||
WithdrawModel.get().bindBankCard(
|
|
||||||
binding.etBankCardNumber.getText().toString(),
|
|
||||||
binding.etBankCardName.getText().toString(),
|
|
||||||
binding.etBankCardBindSmsCode.getText().toString()
|
|
||||||
)
|
|
||||||
.compose(bindUntilEvent(ActivityEvent.DESTROY))
|
|
||||||
.subscribe(new DontWarnObserver<String>() {
|
|
||||||
@Override
|
|
||||||
public void accept(String s, String error) {
|
|
||||||
super.accept(s, error);
|
|
||||||
getDialogManager().dismissDialog();
|
|
||||||
if (error != null) {
|
|
||||||
toast(error);
|
|
||||||
} else {
|
|
||||||
toast(ResUtil.getString(R.string.withdraw_bankcard_bindwithdrawbankcardactivity_02));
|
|
||||||
hideIME();
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initData() {
|
|
||||||
WithdrawModel.get().getBindBankCardTips()
|
|
||||||
.compose(bindUntilEvent(ActivityEvent.DESTROY))
|
|
||||||
.doOnSuccess(s -> {
|
|
||||||
binding.tvTipsWithdrawBankCard.setText(s);
|
|
||||||
})
|
|
||||||
.subscribe();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateViewStatus() {
|
|
||||||
boolean enable = !TextUtils.isEmpty(binding.etBankCardNumber.getText().toString())
|
|
||||||
&& !TextUtils.isEmpty(binding.etBankCardName.getText().toString())
|
|
||||||
&& !TextUtils.isEmpty(binding.etBankCardBindSmsCode.getText().toString());
|
|
||||||
binding.tvBindBankCard.setEnabled(enable);
|
|
||||||
}
|
|
||||||
|
|
||||||
private class CustomTextWather extends TextWatcherSimple {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void afterTextChanged(Editable s) {
|
|
||||||
updateViewStatus();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void startCountDownTimer() {
|
|
||||||
stopCountDownTimer();
|
|
||||||
timer = new CodeDownTimer(binding.btnGetCode, 60000, 1000);
|
|
||||||
timer.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void stopCountDownTimer() {
|
|
||||||
if (timer != null) {
|
|
||||||
timer.cancel();
|
|
||||||
timer = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onDestroy() {
|
|
||||||
super.onDestroy();
|
|
||||||
stopCountDownTimer();
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,137 +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:background="@color/white"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<com.chwl.app.base.TitleBar
|
|
||||||
android:id="@+id/title_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/et_bank_card_number"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/dp_20"
|
|
||||||
android:layout_marginTop="@dimen/dp_35"
|
|
||||||
android:layout_marginEnd="@dimen/dp_20"
|
|
||||||
android:gravity="start|center_vertical"
|
|
||||||
android:hint="@string/withdraw_hint_bank_card_num"
|
|
||||||
android:inputType="number"
|
|
||||||
android:paddingBottom="15dp"
|
|
||||||
android:textColor="@color/color_333333"
|
|
||||||
android:textColorHint="@color/color_b3b3b3"
|
|
||||||
android:textSize="@dimen/dp_15"
|
|
||||||
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="SpUsage" />
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/et_bank_card_name"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/dp_20"
|
|
||||||
android:layout_marginTop="@dimen/dp_35"
|
|
||||||
android:layout_marginEnd="@dimen/dp_20"
|
|
||||||
android:gravity="start|center_vertical"
|
|
||||||
android:hint="@string/withdraw_hint_bank_card_name"
|
|
||||||
android:paddingBottom="15dp"
|
|
||||||
android:textColor="@color/color_333333"
|
|
||||||
android:textColorHint="@color/color_b3b3b3"
|
|
||||||
android:textSize="@dimen/dp_15"
|
|
||||||
android:theme="@style/common_edittext_style"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/et_bank_card_number"
|
|
||||||
tools:ignore="SpUsage" />
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/et_bank_card_bind_sms_code"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/dp_20"
|
|
||||||
android:layout_marginTop="@dimen/dp_35"
|
|
||||||
android:layout_marginEnd="@dimen/dp_20"
|
|
||||||
android:gravity="start|center_vertical"
|
|
||||||
android:hint="@string/hint_bank_card_bind_sms_code"
|
|
||||||
android:inputType="number"
|
|
||||||
android:paddingBottom="15dp"
|
|
||||||
android:textColor="@color/color_333333"
|
|
||||||
android:textColorHint="@color/color_b3b3b3"
|
|
||||||
android:textSize="@dimen/dp_15"
|
|
||||||
android:theme="@style/common_edittext_style"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/et_bank_card_name"
|
|
||||||
tools:ignore="SpUsage" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_code_tips"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/dp_20"
|
|
||||||
android:layout_marginTop="@dimen/dp_18"
|
|
||||||
android:layout_marginEnd="@dimen/dp_20"
|
|
||||||
android:textColor="@color/color_FE4C62"
|
|
||||||
android:textSize="@dimen/sp_12"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/et_bank_card_bind_sms_code" />
|
|
||||||
|
|
||||||
<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_bank_card_bind_sms_code"
|
|
||||||
app:layout_constraintEnd_toEndOf="@id/et_bank_card_bind_sms_code"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/et_bank_card_bind_sms_code"
|
|
||||||
tools:ignore="SpUsage" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_bind_bank_card"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="43dp"
|
|
||||||
android:layout_marginStart="27.5dp"
|
|
||||||
android:layout_marginTop="90dp"
|
|
||||||
android:layout_marginEnd="27.5dp"
|
|
||||||
android:background="@drawable/selector_common_gray_appcolor_corner"
|
|
||||||
android:enabled="false"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="@string/withdraw_confirm_bind"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="@dimen/sp_16"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/et_bank_card_bind_sms_code"
|
|
||||||
tools:ignore="SpUsage" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_tips_withdraw_bank_card"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="24.5dp"
|
|
||||||
android:layout_marginTop="@dimen/dp_17"
|
|
||||||
android:layout_marginEnd="24.5dp"
|
|
||||||
android:textColor="@color/color_999999"
|
|
||||||
android:textSize="@dimen/dp_13"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_bind_bank_card"
|
|
||||||
tools:ignore="SpUsage" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@@ -1,202 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="@color/bg_normal_1c1b22"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<com.chwl.app.base.TitleBar
|
|
||||||
android:id="@+id/title_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/dp_30" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:background="@color/bg_secondary_2a2a39"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingLeft="32dp"
|
|
||||||
android:paddingRight="32dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:text="@string/layout_activity_binder_alipay_01"
|
|
||||||
android:textColor="@color/text_title_color"
|
|
||||||
android:textSize="14dp" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/et_phone"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="@null"
|
|
||||||
android:hint="@string/layout_activity_binder_alipay_02"
|
|
||||||
android:paddingLeft="15dp"
|
|
||||||
android:textColor="@color/text_normal_c6c6e9"
|
|
||||||
android:textColorHint="@color/text_hint_555574"
|
|
||||||
android:textCursorDrawable="@null"
|
|
||||||
android:textSize="@dimen/font_normal" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1px"
|
|
||||||
android:background="@color/line_353548" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/code_layout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:background="@color/bg_secondary_2a2a39"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingLeft="32dp"
|
|
||||||
android:paddingRight="32dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:text="@string/layout_activity_binder_alipay_03"
|
|
||||||
android:textColor="@color/text_title_color"
|
|
||||||
android:textSize="14dp" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/et_name"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@null"
|
|
||||||
android:hint="@string/layout_activity_binder_alipay_04"
|
|
||||||
android:paddingLeft="15dp"
|
|
||||||
android:textColor="@color/text_normal_c6c6e9"
|
|
||||||
android:textColorHint="@color/text_hint_555574"
|
|
||||||
android:textCursorDrawable="@null"
|
|
||||||
android:textSize="@dimen/font_normal" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/iv_name_delete"
|
|
||||||
android:layout_width="17dp"
|
|
||||||
android:layout_height="17dp"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:src="@drawable/ic_nick_delete" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1px"
|
|
||||||
android:background="@color/line_353548" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:background="@color/bg_secondary_2a2a39"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:paddingLeft="15dp"
|
|
||||||
android:text="@string/layout_activity_binder_alipay_05"
|
|
||||||
android:textColor="@color/text_normal_c6c6e9"
|
|
||||||
android:textSize="14dp"
|
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1px"
|
|
||||||
android:background="@color/line_353548" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@color/bg_secondary_2a2a39"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingLeft="32dp"
|
|
||||||
android:paddingRight="32dp">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="50dp">
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/et_smscode"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="@null"
|
|
||||||
android:hint="@string/layout_activity_binder_alipay_06"
|
|
||||||
android:inputType="number"
|
|
||||||
android:maxLength="5"
|
|
||||||
android:textColor="@color/text_normal_c6c6e9"
|
|
||||||
android:textColorHint="@color/text_hint_555574"
|
|
||||||
android:textCursorDrawable="@null"
|
|
||||||
android:textSize="@dimen/font_normal"
|
|
||||||
tools:text="123" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btn_get_code"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="29dp"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_centerInParent="true"
|
|
||||||
android:layout_marginLeft="@dimen/space_normal"
|
|
||||||
android:background="@color/transparent"
|
|
||||||
android:clickable="true"
|
|
||||||
android:text="@string/layout_activity_binder_alipay_07"
|
|
||||||
android:textColor="@color/appColor"
|
|
||||||
android:textSize="@dimen/font_small" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/iv_code_delete"
|
|
||||||
android:layout_width="17dp"
|
|
||||||
android:layout_height="17dp"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginRight="20dp"
|
|
||||||
android:layout_toLeftOf="@id/btn_get_code"
|
|
||||||
android:src="@drawable/ic_nick_delete" />
|
|
||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btn_binder"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:layout_marginLeft="32dp"
|
|
||||||
android:layout_marginTop="30dp"
|
|
||||||
android:layout_marginRight="32dp"
|
|
||||||
android:background="@drawable/base_selector_theme_30dp"
|
|
||||||
android:clickable="true"
|
|
||||||
android:text="@string/layout_activity_binder_alipay_08"
|
|
||||||
android:textColor="@color/base_selector_color_theme_btn"
|
|
||||||
android:textSize="@dimen/font_huge" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btn_binder_request"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:layout_marginLeft="32dp"
|
|
||||||
android:layout_marginTop="30dp"
|
|
||||||
android:layout_marginRight="32dp"
|
|
||||||
android:background="@drawable/base_selector_theme_30dp"
|
|
||||||
android:clickable="true"
|
|
||||||
android:text="@string/layout_activity_binder_alipay_09"
|
|
||||||
android:textColor="@color/base_selector_color_theme_btn"
|
|
||||||
android:textSize="@dimen/font_huge"
|
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_send_sms_code_result"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/dp_15"
|
|
||||||
android:layout_marginTop="@dimen/dp_10"
|
|
||||||
android:layout_marginEnd="@dimen/dp_15"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:textColor="@color/text_color_red"
|
|
||||||
android:textSize="@dimen/dp_16"
|
|
||||||
tools:text="@string/layout_activity_binder_alipay_010" />
|
|
||||||
</LinearLayout>
|
|
@@ -1,237 +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/color_F3F5FA"
|
|
||||||
tools:context=".earn.activity.EarnWithdrawActivity">
|
|
||||||
|
|
||||||
<com.chwl.app.base.TitleBar
|
|
||||||
android:id="@+id/title_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/dp_30"
|
|
||||||
android:background="@color/color_white"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/csWithdrawAccount"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="70dp"
|
|
||||||
android:layout_marginStart="@dimen/dp_15"
|
|
||||||
android:layout_marginTop="@dimen/dp_15"
|
|
||||||
android:layout_marginEnd="@dimen/dp_15"
|
|
||||||
android:background="@drawable/bg_gradient_5f8dfb_7a76fa_r9"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/title_bar">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvNoWithdraw"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/dp_15"
|
|
||||||
android:text="@string/no_withdrawal_account_is_attached"
|
|
||||||
android:textColor="@color/color_white"
|
|
||||||
android:textSize="@dimen/sp_16"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvSwift"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/dp_15"
|
|
||||||
android:text="@string/swift_code"
|
|
||||||
android:textColor="@color/color_white"
|
|
||||||
android:textSize="@dimen/sp_14"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/tvBankName"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvBankName"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/dp_15"
|
|
||||||
android:text="@string/bank_name"
|
|
||||||
android:textColor="@color/color_white"
|
|
||||||
android:textSize="@dimen/sp_14"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tvSwift" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Group
|
|
||||||
android:id="@+id/groupBind"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:constraint_referenced_ids="tvSwift,tvBankName" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="@dimen/dp_16"
|
|
||||||
android:src="@drawable/ic_withdraw_arrow"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/csConvertDetail"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/dp_15"
|
|
||||||
android:layout_marginTop="@dimen/dp_15"
|
|
||||||
android:layout_marginEnd="@dimen/dp_15"
|
|
||||||
android:background="@drawable/bg_ffffff_14"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/csWithdrawAccount">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvMyGold"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/dp_15"
|
|
||||||
android:layout_marginTop="@dimen/dp_15"
|
|
||||||
android:includeFontPadding="false"
|
|
||||||
android:text="@string/my_gold"
|
|
||||||
android:textColor="@color/color_1F1A4E"
|
|
||||||
android:textSize="@dimen/sp_16"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvWithdrawRecord"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="@dimen/dp_14"
|
|
||||||
android:drawablePadding="@dimen/dp_2"
|
|
||||||
android:text="@string/ui_withdraw_withdrawactivity_09"
|
|
||||||
android:textColor="@color/color_6D6B89"
|
|
||||||
android:textSize="@dimen/sp_13"
|
|
||||||
app:drawableEndCompat="@drawable/ic_withdraw_record_arrow"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/tvMyGold"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="@+id/tvMyGold" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/csMyGold"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="52dp"
|
|
||||||
android:layout_marginStart="@dimen/dp_14"
|
|
||||||
android:layout_marginTop="@dimen/dp_12"
|
|
||||||
android:layout_marginEnd="@dimen/dp_14"
|
|
||||||
android:background="@drawable/bg_gradient_dce6fd_d8e3fe_r8"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tvMyGold">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/ivGoldIcon"
|
|
||||||
android:layout_width="20dp"
|
|
||||||
android:layout_height="20dp"
|
|
||||||
android:layout_marginStart="@dimen/dp_16"
|
|
||||||
android:src="@drawable/ic_gold"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/edGold"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginStart="@dimen/dp_8"
|
|
||||||
android:layout_marginEnd="@dimen/dp_12"
|
|
||||||
android:background="@null"
|
|
||||||
android:digits="1234567890."
|
|
||||||
android:focusable="true"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:hint="@string/please_input_withdraw_gold"
|
|
||||||
android:inputType="number"
|
|
||||||
android:textColor="@color/color_1F1A4E"
|
|
||||||
android:textColorHint="@color/color_ADB9D9"
|
|
||||||
android:textSize="@dimen/sp_16"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/tvAll"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/ivGoldIcon" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvAll"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="@dimen/dp_16"
|
|
||||||
android:text="@string/all"
|
|
||||||
android:textColor="@color/color_9168FA"
|
|
||||||
android:textSize="@dimen/sp_16"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvWithdrawMsg"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/dp_14"
|
|
||||||
android:layout_marginTop="@dimen/dp_12"
|
|
||||||
android:layout_marginBottom="@dimen/dp_20"
|
|
||||||
android:includeFontPadding="false"
|
|
||||||
android:text="@string/number_of_withdrawals_in_remaining_weeks"
|
|
||||||
android:textColor="@color/color_6D6B89"
|
|
||||||
android:textSize="@dimen/sp_13"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/csMyGold" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvWithdrawNum"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/dp_12"
|
|
||||||
android:layout_marginBottom="@dimen/dp_20"
|
|
||||||
android:includeFontPadding="false"
|
|
||||||
android:textColor="@color/color_9168FA"
|
|
||||||
android:textSize="@dimen/sp_13"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/tvWithdrawMsg"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/csMyGold"
|
|
||||||
tools:text="0" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/dp_12"
|
|
||||||
android:layout_marginBottom="@dimen/dp_20"
|
|
||||||
android:includeFontPadding="false"
|
|
||||||
android:text="@string/time"
|
|
||||||
android:textColor="@color/color_6D6B89"
|
|
||||||
android:textSize="@dimen/sp_13"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/tvWithdrawNum"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/csMyGold" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvWithdraw"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="46dp"
|
|
||||||
android:layout_marginStart="@dimen/dp_15"
|
|
||||||
android:layout_marginTop="@dimen/dp_50"
|
|
||||||
android:layout_marginEnd="@dimen/dp_15"
|
|
||||||
android:background="@drawable/base_selector_theme_30dp"
|
|
||||||
android:enabled="false"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="@string/immediate_cash_withdrawal"
|
|
||||||
android:textColor="@color/base_selector_color_theme_btn"
|
|
||||||
android:textSize="@dimen/sp_16"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/csConvertDetail" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@@ -1,259 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="@color/color_F5F5F5"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<com.chwl.app.base.TitleBar
|
|
||||||
android:id="@+id/title_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="44dp"
|
|
||||||
android:background="#FFF8F5"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:paddingLeft="15dp"
|
|
||||||
android:paddingRight="25dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:src="@mipmap/ic_jewel_yellow" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginLeft="6dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="@string/layout_activity_exchange_gold_01"
|
|
||||||
android:textColor="@color/color_FFB606"
|
|
||||||
android:textSize="@dimen/font_normal" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/gew_number"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textColor="@color/color_FFB606"
|
|
||||||
android:textSize="@dimen/font_normal"
|
|
||||||
tools:text="0" />
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="44dp"
|
|
||||||
android:background="#FFF1F3"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:paddingLeft="15dp"
|
|
||||||
android:paddingRight="25dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:src="@mipmap/ic_wallet_gold_red" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginLeft="6dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="@string/layout_activity_exchange_gold_02"
|
|
||||||
android:textColor="#FF3852"
|
|
||||||
android:textSize="@dimen/font_normal" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/gold_number"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textColor="#FF3852"
|
|
||||||
android:textSize="@dimen/font_normal"
|
|
||||||
tools:text="0" />
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!--<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="44dp"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:background="@color/white">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/jew_number_img"
|
|
||||||
android:layout_width="19dp"
|
|
||||||
android:layout_height="17.5dp"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginLeft="20dp"
|
|
||||||
android:src="@drawable/icon_exchange_jew" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/gew_number"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginLeft="10dp"
|
|
||||||
android:layout_toRightOf="@id/jew_number_img"
|
|
||||||
android:textColor="@color/text_color_primary"
|
|
||||||
android:textSize="14dp" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:id="@+id/divider"
|
|
||||||
android:layout_width="1px"
|
|
||||||
android:layout_height="20dp"
|
|
||||||
android:layout_centerInParent="true"
|
|
||||||
android:background="#e6e6e6" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/gole_number_img"
|
|
||||||
android:layout_width="18dp"
|
|
||||||
android:layout_height="18dp"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginLeft="20dp"
|
|
||||||
android:layout_toRightOf="@id/divider"
|
|
||||||
android:src="@drawable/icon_exchange_gold" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/gold_number"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginLeft="10dp"
|
|
||||||
android:layout_toRightOf="@id/gole_number_img"
|
|
||||||
android:textColor="@color/text_color_primary"
|
|
||||||
android:textSize="14dp" />
|
|
||||||
</RelativeLayout>-->
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1.58"
|
|
||||||
android:background="@color/white">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/jew_exchange_number_img"
|
|
||||||
android:layout_width="19dp"
|
|
||||||
android:layout_height="17.5dp"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginLeft="20dp"
|
|
||||||
android:src="@drawable/icon_exchange_jew"
|
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/gew_exchange_number"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginLeft="15dp"
|
|
||||||
android:layout_toRightOf="@id/jew_exchange_number_img"
|
|
||||||
android:background="@null"
|
|
||||||
android:hint="@string/layout_activity_exchange_gold_03"
|
|
||||||
android:inputType="number"
|
|
||||||
android:maxLength="8"
|
|
||||||
android:textColor="@color/text_tertiary"
|
|
||||||
android:textColorHint="@color/text_color_secondary"
|
|
||||||
android:textCursorDrawable="@null"
|
|
||||||
android:textSize="@dimen/font_medium" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_input_tip"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:text="@string/layout_activity_exchange_gold_04"
|
|
||||||
android:textColor="@color/color_FF3852"
|
|
||||||
android:textSize="13sp"
|
|
||||||
android:visibility="gone" />
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_gravity="bottom"
|
|
||||||
android:background="@color/color_f0f0f0" />
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:background="@color/white">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/gold_exchange_number_img"
|
|
||||||
android:layout_width="18dp"
|
|
||||||
android:layout_height="18dp"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginRight="30dp"
|
|
||||||
android:src="@drawable/icon_exchange_gold"
|
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/gold_exchange_number"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginLeft="15dp"
|
|
||||||
android:textColor="@color/text_tertiary"
|
|
||||||
android:textSize="@dimen/font_medium"
|
|
||||||
tools:text="@string/layout_activity_exchange_gold_05" />
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_gravity="bottom"
|
|
||||||
android:background="@color/color_f0f0f0" />
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:background="@color/white"
|
|
||||||
android:visibility="gone">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_hammar_exchange_number"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginLeft="15dp"
|
|
||||||
android:textColor="@color/text_tertiary"
|
|
||||||
android:textSize="@dimen/font_medium"
|
|
||||||
tools:text="@string/layout_activity_exchange_gold_06" />
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_exchange_gold_tips"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:text="@string/exchange_gold_tips"
|
|
||||||
android:textColor="@color/text_color_secondary" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/confirm_exchange"
|
|
||||||
style="?android:attr/borderlessButtonStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:layout_marginLeft="63dp"
|
|
||||||
android:layout_marginTop="25dp"
|
|
||||||
android:layout_marginRight="63dp"
|
|
||||||
android:background="@drawable/shape_semi_round_grey_e5_solid"
|
|
||||||
android:enabled="false"
|
|
||||||
android:text="@string/layout_activity_exchange_gold_07"
|
|
||||||
android:textColor="@color/color_B3B3B3"
|
|
||||||
android:textSize="16dp" />
|
|
||||||
</LinearLayout>
|
|
@@ -1,108 +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"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="@color/white">
|
|
||||||
|
|
||||||
<com.chwl.app.base.TitleBar
|
|
||||||
android:id="@+id/title_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/dp_30"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/llSearch"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="32dp"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_marginLeft="15dp"
|
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:layout_marginRight="15dp"
|
|
||||||
android:background="@drawable/bg_search_user"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/title_bar">
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/etSearch"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:background="@android:color/transparent"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:inputType="number"
|
|
||||||
android:imeOptions="actionSearch"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:hint="@string/search_user_id"
|
|
||||||
android:paddingStart="@dimen/dp_15"
|
|
||||||
android:paddingEnd="@dimen/dp_15"
|
|
||||||
android:textColor="@color/color_1F1A4E"
|
|
||||||
android:textColorHint="@color/text_color_secondary"
|
|
||||||
android:textSize="@dimen/sp_12" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/mTvSearch"
|
|
||||||
android:text="@string/search"
|
|
||||||
android:textSize="@dimen/sp_14"
|
|
||||||
android:textColor="@color/base_color_theme_text"
|
|
||||||
android:paddingStart="@dimen/dp_20"
|
|
||||||
android:paddingEnd="@dimen/dp_20"
|
|
||||||
android:paddingTop="@dimen/dp_3"
|
|
||||||
android:paddingBottom="@dimen/dp_3"
|
|
||||||
android:layout_marginEnd="@dimen/dp_3"
|
|
||||||
android:background="@drawable/base_shape_theme_30dp"
|
|
||||||
android:layout_marginTop="@dimen/dp_3"
|
|
||||||
android:layout_marginBottom="@dimen/dp_3"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvLately"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/dp_15"
|
|
||||||
android:layout_marginTop="@dimen/dp_25"
|
|
||||||
android:text="@string/donation_record"
|
|
||||||
android:textColor="@color/color_1F1A4E"
|
|
||||||
android:textSize="@dimen/sp_16"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/llSearch" />
|
|
||||||
|
|
||||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
|
||||||
android:id="@+id/refreshLayout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:layout_marginBottom="@dimen/dp_20"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tvLately"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/tv_tip">
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/recyclerView"
|
|
||||||
android:overScrollMode="never"
|
|
||||||
android:scrollbars="none"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent" />
|
|
||||||
|
|
||||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout >
|
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_tip"
|
|
||||||
android:text="@string/displayed_three_month"
|
|
||||||
android:textSize="@dimen/sp_12"
|
|
||||||
android:textColor="@color/color_B3B3C3"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="@dimen/dp_40"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@@ -1,32 +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"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="@color/white">
|
|
||||||
|
|
||||||
<com.chwl.app.base.TitleBar
|
|
||||||
android:id="@+id/title_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/dp_30"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<com.chwl.app.ui.widget.magicindicator.MagicIndicator
|
|
||||||
android:id="@+id/magicIndicator"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="25dp"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginTop="@dimen/dp_10"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/title_bar"/>
|
|
||||||
|
|
||||||
<androidx.viewpager.widget.ViewPager
|
|
||||||
android:id="@+id/viewPagerDetail"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/magicIndicator"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@@ -1,61 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="@color/white"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:orientation="vertical"
|
|
||||||
tools:context=".pay.activity.GiveGoldSuccessActivity">
|
|
||||||
|
|
||||||
<com.chwl.app.base.TitleBar
|
|
||||||
android:id="@+id/title_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_marginTop="30dp"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:src="@drawable/ic_give_gold_success" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textColor="#ffea3b36"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:text="@string/layout_activity_give_gold_success_01" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvNickname"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="30dp"
|
|
||||||
android:textColor="#ff333333"
|
|
||||||
android:textSize="13sp"
|
|
||||||
tools:text="@string/layout_activity_give_gold_success_02" />
|
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvGold"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textColor="#ff333333"
|
|
||||||
android:textSize="28sp"
|
|
||||||
tools:text="@string/layout_activity_give_gold_success_03" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvSure"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:layout_marginStart="15dp"
|
|
||||||
android:layout_marginTop="60dp"
|
|
||||||
android:layout_marginEnd="15dp"
|
|
||||||
android:background="@drawable/common_btn_bg"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="@string/layout_activity_give_gold_success_04"
|
|
||||||
android:textColor="#ffffffff"
|
|
||||||
android:textSize="15sp" />
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
@@ -1,288 +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/white"
|
|
||||||
tools:context=".pay.activity.GiveGoldToUserActivity">
|
|
||||||
|
|
||||||
<com.chwl.app.base.TitleBar
|
|
||||||
android:id="@+id/title_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/dp_30"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<com.chwl.app.common.widget.CircleImageView
|
|
||||||
android:id="@+id/ivAvatar"
|
|
||||||
android:layout_width="80dp"
|
|
||||||
android:layout_height="80dp"
|
|
||||||
android:layout_marginStart="@dimen/dp_15"
|
|
||||||
android:layout_marginTop="@dimen/dp_15"
|
|
||||||
android:src="@drawable/default_avatar"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/title_bar" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvNickname"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/dp_10"
|
|
||||||
android:layout_marginTop="@dimen/dp_8"
|
|
||||||
android:textColor="#ff333333"
|
|
||||||
android:textSize="16sp"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/ivAvatar"
|
|
||||||
app:layout_constraintTop_toTopOf="@+id/ivAvatar"
|
|
||||||
tools:text="@string/layout_activity_give_gold_to_user_01" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvId"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginStart="@dimen/dp_10"
|
|
||||||
android:layout_marginTop="3dp"
|
|
||||||
android:textColor="#ff999999"
|
|
||||||
android:textSize="14sp"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/ivAvatar"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tvNickname"
|
|
||||||
tools:text="ID:123456" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/llTab"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginStart="@dimen/dp_15"
|
|
||||||
android:layout_marginTop="@dimen/dp_25"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/ivAvatar">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvDiamondTab"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/bg_common_select"
|
|
||||||
android:paddingStart="@dimen/dp_12"
|
|
||||||
android:paddingTop="@dimen/dp_7"
|
|
||||||
android:paddingEnd="@dimen/dp_12"
|
|
||||||
android:paddingBottom="@dimen/dp_7"
|
|
||||||
android:layout_marginEnd="@dimen/dp_18"
|
|
||||||
android:text="@string/me_clean_diamond"
|
|
||||||
android:textColor="@color/color_donation_btn"
|
|
||||||
android:textSize="@dimen/sp_14" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvGiftTab"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/bg_common_select"
|
|
||||||
android:paddingStart="@dimen/dp_12"
|
|
||||||
android:paddingTop="@dimen/dp_7"
|
|
||||||
android:paddingEnd="@dimen/dp_12"
|
|
||||||
android:paddingBottom="@dimen/dp_7"
|
|
||||||
android:text="@string/me_give_gift"
|
|
||||||
android:textColor="@color/color_donation_btn"
|
|
||||||
android:textSize="@dimen/sp_14" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/mIvDiamond"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/dp_15"
|
|
||||||
android:layout_marginTop="30dp"
|
|
||||||
android:src="@drawable/icon_diamond"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/llTab" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/mEditGold"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="@dimen/dp_15"
|
|
||||||
android:layout_marginBottom="-6dp"
|
|
||||||
android:background="@null"
|
|
||||||
android:gravity="end|bottom"
|
|
||||||
android:hint="0"
|
|
||||||
android:inputType="number"
|
|
||||||
android:digits="1234567890"
|
|
||||||
android:textColor="@color/color_1F1A4E"
|
|
||||||
android:textColorHint="@color/color_B3B3C3"
|
|
||||||
android:textSize="30sp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/mIvDiamond"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/mIvDiamond" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:id="@+id/mViewLine"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_marginStart="@dimen/dp_15"
|
|
||||||
android:layout_marginEnd="@dimen/dp_15"
|
|
||||||
android:background="@color/color_F7F7F7"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/mEditGold" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/mLiDiamond"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/dp_10"
|
|
||||||
android:layout_marginEnd="15dp"
|
|
||||||
android:gravity="center_vertical|end"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/mViewLine">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/mTvDiamond"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/my_diamond"
|
|
||||||
android:textColor="#ff999999"
|
|
||||||
android:textSize="13sp" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:src="@drawable/icon_diamond" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Group
|
|
||||||
android:id="@+id/groupDiamond"
|
|
||||||
android:visibility="visible"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:constraint_referenced_ids="mIvDiamond,mEditGold,mViewLine,mLiDiamond" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/llGiftList"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="290dp"
|
|
||||||
android:layout_marginTop="@dimen/dp_20"
|
|
||||||
android:layout_marginStart="@dimen/dp_15"
|
|
||||||
android:layout_marginEnd="@dimen/dp_15"
|
|
||||||
android:background="@drawable/bg_f3f5fa_r8"
|
|
||||||
android:orientation="vertical"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/mLiDiamond">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvEmptyTip"
|
|
||||||
android:text="@string/no_gift_now"
|
|
||||||
android:textSize="@dimen/sp_14"
|
|
||||||
android:textColor="@color/color_B3B3C3"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
|
||||||
|
|
||||||
<androidx.viewpager.widget.ViewPager
|
|
||||||
android:id="@+id/viewPagerEntrance"
|
|
||||||
android:layout_marginStart="@dimen/dp_4"
|
|
||||||
android:layout_marginEnd="@dimen/dp_4"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/magic_indicator_entrance"/>
|
|
||||||
|
|
||||||
<com.chwl.app.home.widget.MePageIndicatorView
|
|
||||||
android:id="@+id/magic_indicator_entrance"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginTop="2dp"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:background="@drawable/shape_me_indicator_bg"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/viewPagerEntrance"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/editGift"
|
|
||||||
android:layout_width="160dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/dp_20"
|
|
||||||
android:layout_marginEnd="@dimen/dp_15"
|
|
||||||
android:background="@null"
|
|
||||||
android:gravity="end|bottom"
|
|
||||||
android:hint="0"
|
|
||||||
android:inputType="number"
|
|
||||||
android:digits="1234567890"
|
|
||||||
android:text="1"
|
|
||||||
android:textColor="@color/color_1F1A4E"
|
|
||||||
android:textColorHint="@color/color_B3B3C3"
|
|
||||||
android:textSize="@dimen/sp_20"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/llGiftList" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvNum"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/me_num"
|
|
||||||
android:textColor="@color/color_B3B3C3"
|
|
||||||
android:textSize="@dimen/sp_11"
|
|
||||||
app:layout_constraintBaseline_toBaselineOf="@+id/editGift"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/editGift" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:id="@+id/viewGiftLine"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_marginTop="@dimen/dp_10"
|
|
||||||
android:background="@color/color_F7F7F7"
|
|
||||||
app:layout_constraintEnd_toEndOf="@+id/editGift"
|
|
||||||
app:layout_constraintStart_toStartOf="@+id/tvNum"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tvNum" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvAll"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/dp_10"
|
|
||||||
android:layout_marginEnd="@dimen/dp_15"
|
|
||||||
android:background="@drawable/bg_f3f5fa_r4"
|
|
||||||
android:paddingStart="@dimen/dp_6"
|
|
||||||
android:paddingTop="@dimen/dp_2"
|
|
||||||
android:paddingEnd="@dimen/dp_6"
|
|
||||||
android:paddingBottom="@dimen/dp_2"
|
|
||||||
android:text="@string/me_all"
|
|
||||||
android:textColor="@color/color_B3B3C3"
|
|
||||||
android:textSize="@dimen/sp_12"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/viewGiftLine" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Group
|
|
||||||
android:id="@+id/groupGift"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:constraint_referenced_ids="llGiftList,editGift,tvNum,viewGiftLine,tvAll" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvSure"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="46dp"
|
|
||||||
android:layout_marginStart="@dimen/dp_15"
|
|
||||||
android:layout_marginTop="50dp"
|
|
||||||
android:layout_marginEnd="@dimen/dp_15"
|
|
||||||
android:background="@drawable/base_selector_theme_30dp"
|
|
||||||
android:enabled="false"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="@string/sure"
|
|
||||||
android:textColor="@color/base_selector_color_theme_btn"
|
|
||||||
android:textSize="@dimen/sp_16"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tvAll" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@@ -1,211 +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/color_FAFAFA">
|
|
||||||
|
|
||||||
<com.chwl.app.base.TitleBar
|
|
||||||
android:id="@+id/title_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<ScrollView
|
|
||||||
android:id="@+id/sv_container"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:layout_marginBottom="@dimen/dp_33"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/btn_give"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/title_bar">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/ll_balance"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="78dp"
|
|
||||||
android:layout_marginStart="@dimen/dp_20"
|
|
||||||
android:layout_marginTop="30dp"
|
|
||||||
android:layout_marginEnd="@dimen/dp_20"
|
|
||||||
android:background="@drawable/bg_wallet_total"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingStart="15dp"
|
|
||||||
android:paddingEnd="15dp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/ll_left"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
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="@string/layout_activity_send_gold_01"
|
|
||||||
android:textColor="@color/color_333333"
|
|
||||||
android:textSize="14sp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_wall_gold_remain"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/ll_left"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="5dp"
|
|
||||||
android:gravity="end"
|
|
||||||
android:includeFontPadding="false"
|
|
||||||
android:textColor="@color/color_333333"
|
|
||||||
android:textSize="25sp"
|
|
||||||
tools:text="264.00" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:text="@string/layout_activity_send_gold_02"
|
|
||||||
android:textColor="@color/color_999999"
|
|
||||||
android:textSize="@dimen/dp_14"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_wall_gold_remain"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/ll_donee"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="55dp"
|
|
||||||
android:layout_marginStart="@dimen/dp_20"
|
|
||||||
android:layout_marginTop="@dimen/dp_15"
|
|
||||||
android:layout_marginEnd="@dimen/dp_20"
|
|
||||||
android:background="@drawable/bg_wallet_total"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/ll_balance">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_marginStart="18.5dp"
|
|
||||||
android:text="@string/donee"
|
|
||||||
android:textColor="@color/color_333333"
|
|
||||||
android:textSize="@dimen/sp_14"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/et_account"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginStart="17.5dp"
|
|
||||||
android:layout_marginEnd="@dimen/dp_10"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@color/transparent"
|
|
||||||
android:hint="@string/done_hint_input_phone_or_id"
|
|
||||||
android:inputType="number"
|
|
||||||
android:textColor="@color/color_333333"
|
|
||||||
android:textColorHint="@color/color_B3B3B3"
|
|
||||||
android:textSize="@dimen/sp_15" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_give_value"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/dp_20"
|
|
||||||
android:layout_marginTop="@dimen/dp_17"
|
|
||||||
android:text="@string/give_value"
|
|
||||||
android:textColor="@color/color_333333"
|
|
||||||
android:textSize="@dimen/sp_15"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/ll_donee" />
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/rv_gold"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/dp_20"
|
|
||||||
android:layout_marginTop="@dimen/dp_10"
|
|
||||||
android:layout_marginEnd="@dimen/dp_20"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_give_value" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/et_custom_input"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="51dp"
|
|
||||||
android:layout_marginStart="@dimen/dp_20"
|
|
||||||
android:layout_marginTop="@dimen/dp_8"
|
|
||||||
android:layout_marginEnd="@dimen/dp_20"
|
|
||||||
android:background="@drawable/shape_gold_input_false"
|
|
||||||
android:gravity="center"
|
|
||||||
android:hint="@string/custom_input"
|
|
||||||
android:inputType="number"
|
|
||||||
android:maxLength="7"
|
|
||||||
android:textColor="@color/color_333333"
|
|
||||||
android:textColorHint="@color/color_B3B3B3"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/rv_gold" />
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btn_give"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="43dp"
|
|
||||||
android:layout_marginStart="37.5dp"
|
|
||||||
android:layout_marginEnd="37.5dp"
|
|
||||||
android:layout_marginBottom="@dimen/dp_11"
|
|
||||||
android:background="@drawable/slt_btn_give"
|
|
||||||
android:enabled="false"
|
|
||||||
android:text="@string/give_immediately"
|
|
||||||
android:textColor="@color/color_slt_btn_give"
|
|
||||||
android:textSize="@dimen/sp_15"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/tv_my_give_record"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_my_give_record"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="@dimen/dp_15"
|
|
||||||
android:drawableEnd="@drawable/icon_donee_arrow"
|
|
||||||
android:drawablePadding="@dimen/dp_7"
|
|
||||||
android:padding="@dimen/dp_5"
|
|
||||||
android:text="@string/my_give_record"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@@ -1,280 +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"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="@color/white"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<com.chwl.app.base.TitleBar
|
|
||||||
android:id="@+id/title_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/rly_binder"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="75dp"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:background="@color/white"
|
|
||||||
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/zhifubao_un"
|
|
||||||
android:layout_width="42dp"
|
|
||||||
android:layout_height="42dp"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_marginLeft="15dp"
|
|
||||||
android:background="@drawable/icon_zhifubao_grey" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_marginLeft="67dp"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:text="@string/layout_activity_withdraw_01"
|
|
||||||
android:textColor="#666666"
|
|
||||||
android:textSize="15sp" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="end|center_vertical"
|
|
||||||
android:layout_marginRight="15dp"
|
|
||||||
android:background="@drawable/arrow_right" />
|
|
||||||
</FrameLayout>
|
|
||||||
<!--绑定成功后显示用户信息的控件,变为可见-->
|
|
||||||
<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"
|
|
||||||
tools:visibility="visible">
|
|
||||||
|
|
||||||
<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: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_zhifubao_name"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/layout_activity_withdraw_02"
|
|
||||||
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>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_withdraw_type"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="14.5dp"
|
|
||||||
android:drawableEnd="@drawable/icon_withdraw_type"
|
|
||||||
android:drawablePadding="4.5dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="@string/withdraw_type_alipay"
|
|
||||||
android:textColor="@color/color_999999"
|
|
||||||
android:textSize="@dimen/sp_13" />
|
|
||||||
|
|
||||||
<ScrollView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@color/white"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="74dp"
|
|
||||||
android:layout_height="72dp"
|
|
||||||
android:src="@drawable/wallet_jewel" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:text="@string/layout_activity_withdraw_03"
|
|
||||||
android:textColor="@color/text_tertiary"
|
|
||||||
android:textSize="@dimen/font_small" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_diamondNums"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="9dp"
|
|
||||||
android:textColor="@color/text_primary"
|
|
||||||
android:textSize="21sp"
|
|
||||||
tools:text="500" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/recyclerView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:background="@color/white" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="75dp"
|
|
||||||
android:layout_marginStart="@dimen/dp_20"
|
|
||||||
android:layout_marginTop="@dimen/dp_17"
|
|
||||||
android:layout_marginEnd="@dimen/dp_20"
|
|
||||||
android:background="@drawable/shape_gray_corner_12">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_real_income_text"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="15.5dp"
|
|
||||||
android:text="@string/withdraw_real_income"
|
|
||||||
android:textColor="@color/color_333333"
|
|
||||||
android:textSize="@dimen/sp_16"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/tv_tax_money"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintVertical_chainStyle="packed" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_tax_money"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/dp_6"
|
|
||||||
android:textColor="@color/color_999999"
|
|
||||||
android:textSize="@dimen/sp_13"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="@id/tv_real_income_text"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_real_income_text"
|
|
||||||
tools:text="@string/layout_activity_withdraw_04" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_income_money"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/dp_6"
|
|
||||||
android:layout_marginEnd="@dimen/dp_14"
|
|
||||||
android:textColor="@color/color_333333"
|
|
||||||
android:textSize="@dimen/sp_16"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
tools:text="@string/layout_activity_withdraw_05" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_tip"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginLeft="21dp"
|
|
||||||
android:layout_marginBottom="@dimen/dp_22"
|
|
||||||
android:layout_marginTop="@dimen/dp_20"
|
|
||||||
android:text="@string/withdraw_notice" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="70dp"
|
|
||||||
android:background="@color/white">
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btn_withdraw_un"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:layout_centerInParent="true"
|
|
||||||
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:text="@string/layout_activity_withdraw_06"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="@dimen/font_large" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btn_withdraw"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:layout_centerInParent="true"
|
|
||||||
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="@string/layout_activity_withdraw_07"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="16dp"
|
|
||||||
android:visibility="gone" />
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_withdraw_rule"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginBottom="36dp"
|
|
||||||
android:text="@string/layout_activity_withdraw_08" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
@@ -1,19 +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"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<com.chwl.app.base.TitleBar
|
|
||||||
android:id="@+id/title_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
|
|
||||||
<WebView
|
|
||||||
android:id="@+id/wv_view"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"></WebView>
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
@@ -1,10 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
<com.chwl.app.pay.password.GiveGoldPasswordView
|
|
||||||
android:id="@+id/give_gold_password_view"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"/>
|
|
||||||
</RelativeLayout>
|
|
@@ -1,22 +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">
|
|
||||||
|
|
||||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
|
||||||
android:id="@+id/refreshLayout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/recyclerView"
|
|
||||||
android:overScrollMode="never"
|
|
||||||
android:scrollbars="none"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent" />
|
|
||||||
|
|
||||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout >
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
@@ -1,22 +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">
|
|
||||||
|
|
||||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
|
||||||
android:id="@+id/refreshLayout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/recyclerView"
|
|
||||||
android:overScrollMode="never"
|
|
||||||
android:scrollbars="none"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent" />
|
|
||||||
|
|
||||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout >
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
@@ -1,57 +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_marginTop="@dimen/dp_20"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<com.chwl.app.common.widget.CircleImageView
|
|
||||||
android:id="@+id/iv_avatar"
|
|
||||||
android:layout_width="50dp"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:layout_marginStart="15dp"
|
|
||||||
android:src="@drawable/ic_give_diamond_detail"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_number"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:textColor="@color/color_1F1A4E"
|
|
||||||
android:textSize="@dimen/sp_14"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/tv_pay_diamond"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/iv_avatar"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/iv_avatar"
|
|
||||||
app:layout_constraintVertical_chainStyle="packed"
|
|
||||||
tools:text="1000" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_pay_diamond"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:textColor="@color/color_b3b3b3"
|
|
||||||
android:textSize="@dimen/sp_12"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/iv_avatar"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_number"
|
|
||||||
tools:text="@string/all_pay_diamond" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@id/tv_date"
|
|
||||||
android:textSize="@dimen/sp_12"
|
|
||||||
android:textColor="@color/color_B3B3C3"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="@dimen/dp_15"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
tools:text="2022-10.25 19:43:00"/>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@@ -1,55 +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="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:id="@+id/viewBg"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="@dimen/dp_72"
|
|
||||||
android:background="@drawable/bg_give_gift_bg_selector"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/ivGift"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:layout_marginStart="@dimen/dp_6"
|
|
||||||
android:layout_marginTop="@dimen/dp_7"
|
|
||||||
android:layout_marginEnd="@dimen/dp_6"
|
|
||||||
android:layout_marginBottom="@dimen/dp_9"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/viewBg"
|
|
||||||
app:layout_constraintEnd_toEndOf="@+id/viewBg"
|
|
||||||
app:layout_constraintStart_toStartOf="@+id/viewBg"
|
|
||||||
app:layout_constraintTop_toTopOf="@+id/viewBg" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvName"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/dp_6"
|
|
||||||
android:textColor="@color/color_6D6B89"
|
|
||||||
android:textSize="@dimen/sp_12"
|
|
||||||
app:layout_constraintEnd_toEndOf="@+id/viewBg"
|
|
||||||
app:layout_constraintStart_toStartOf="@+id/viewBg"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/viewBg"
|
|
||||||
tools:text="礼物名称" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvNum"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/dp_5"
|
|
||||||
android:textColor="@color/color_6D6B89"
|
|
||||||
android:textSize="@dimen/sp_12"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tvName"
|
|
||||||
tools:text="x1" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@@ -1,27 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:id="@+id/ll_gold_charge"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="51dp"
|
|
||||||
android:background="@drawable/selector_gold_price"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/iv_gold"
|
|
||||||
android:layout_width="28dp"
|
|
||||||
android:layout_height="28dp"
|
|
||||||
android:layout_marginStart="@dimen/dp_19"
|
|
||||||
tools:src="@mipmap/ic_wallet_gold_unchecked" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_money_gold"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="4.5dp"
|
|
||||||
android:textColor="@color/text_color_secondary"
|
|
||||||
android:textSize="16dp"
|
|
||||||
tools:text="8" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
@@ -1,54 +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_marginTop="@dimen/dp_20"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<com.chwl.app.common.widget.CircleImageView
|
|
||||||
android:id="@+id/iv_avatar"
|
|
||||||
android:layout_width="50dp"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:layout_marginStart="15dp"
|
|
||||||
android:src="@drawable/default_avatar"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_nickname"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:textColor="@color/color_1F1A4E"
|
|
||||||
android:textSize="@dimen/sp_14"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/tv_id"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/iv_avatar"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/iv_avatar"
|
|
||||||
app:layout_constraintVertical_chainStyle="packed"
|
|
||||||
tools:text="@string/layout_item_lately_give_01" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_id"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:textColor="@color/color_b3b3b3"
|
|
||||||
android:textSize="@dimen/sp_12"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/iv_avatar"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_nickname"
|
|
||||||
tools:text="ID:123456" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:src="@drawable/donation_arrow_right"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="@dimen/dp_15"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@@ -1,113 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<RelativeLayout 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="wrap_content"
|
|
||||||
android:background="@color/color_white">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/ll_main_password"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/img_close"
|
|
||||||
android:layout_width="22dp"
|
|
||||||
android:layout_height="22dp"
|
|
||||||
android:layout_gravity="end"
|
|
||||||
android:layout_marginTop="@dimen/dp_14"
|
|
||||||
android:layout_marginEnd="@dimen/dp_15"
|
|
||||||
android:background="@drawable/ic_pwd_close" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_title"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:text="@string/layout_view_give_gold_password_01"
|
|
||||||
android:textColor="@color/color_1F1A4E"
|
|
||||||
android:textSize="@dimen/sp_18" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_nickname"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:textColor="#333333"
|
|
||||||
android:textSize="13sp"
|
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_gold"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginTop="3dp"
|
|
||||||
android:drawableLeft="@drawable/ic_redpackage_bigdiamond"
|
|
||||||
android:drawablePadding="@dimen/dp_8"
|
|
||||||
android:gravity="center"
|
|
||||||
android:includeFontPadding="false"
|
|
||||||
android:textColor="#333333"
|
|
||||||
android:textSize="28sp"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:text="20000" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_rate"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:textColor="#333333"
|
|
||||||
android:textSize="10sp" />
|
|
||||||
|
|
||||||
<com.chwl.app.pay.widget.GridPasswordNoFocusView
|
|
||||||
android:id="@+id/view_password"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="46dp"
|
|
||||||
android:layout_marginLeft="16dp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_marginRight="16dp"
|
|
||||||
app:gpvGridColor="#ffffff"
|
|
||||||
app:gpvLineColor="@color/line_color"
|
|
||||||
app:gpvLineWidth="1dp"
|
|
||||||
app:gpvPasswordLength="6"
|
|
||||||
app:gpvPasswordType="numberPassword"
|
|
||||||
app:gpvTextColor="@color/color_000000"
|
|
||||||
app:gpvTextSize="25sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_forgetPwd"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="right"
|
|
||||||
android:layout_margin="13dp"
|
|
||||||
android:text="@string/layout_view_give_gold_password_02"
|
|
||||||
android:textColor="#EA3B36"
|
|
||||||
android:visibility="gone" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1px"
|
|
||||||
android:layout_above="@+id/view_keyboard"
|
|
||||||
android:background="@color/line_color" />
|
|
||||||
|
|
||||||
<com.chwl.app.ui.widget.password.PasswordKeyboardView
|
|
||||||
android:id="@+id/view_keyboard"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@id/ll_main_password"
|
|
||||||
android:background="#f0f0f0"
|
|
||||||
android:focusable="true"
|
|
||||||
android:focusableInTouchMode="true"
|
|
||||||
android:keyBackground="@color/white"
|
|
||||||
android:keyTextColor="#000000"
|
|
||||||
android:shadowColor="#00000000"
|
|
||||||
android:shadowRadius="4"
|
|
||||||
app:pkvDeleteBackgroundColor="#f0f0f0"
|
|
||||||
app:pkvDeleteDrawable="@mipmap/keyboard_backspace" />
|
|
||||||
</RelativeLayout>
|
|
@@ -1,64 +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"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="68dp"
|
|
||||||
android:background="@color/white"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingTop="@dimen/dp_20">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/llSearch"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="29dp"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_marginLeft="15dp"
|
|
||||||
android:layout_marginRight="15dp"
|
|
||||||
android:layout_weight="1.0"
|
|
||||||
android:background="@drawable/bg_search_edit"
|
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/search_icon"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginLeft="15dp"
|
|
||||||
android:src="@mipmap/icon_little_search" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/editSearch"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:background="@null"
|
|
||||||
android:hint="@string/search_hint"
|
|
||||||
android:maxLength="20"
|
|
||||||
android:text=""
|
|
||||||
android:textColor="@color/text_color_primary"
|
|
||||||
android:textColorHint="@color/text_color_secondary"
|
|
||||||
android:textSize="14sp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvCancel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:gravity="center"
|
|
||||||
android:paddingRight="15dp"
|
|
||||||
android:text="@string/cancel"
|
|
||||||
android:textColor="@color/grey"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/recyclerView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"/>
|
|
||||||
</LinearLayout>
|
|
Reference in New Issue
Block a user