Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RvApp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lify
RvApp
Commits
22ba4eae
Commit
22ba4eae
authored
Oct 16, 2019
by
linfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
钱包优化
parent
459c8b69
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
26 deletions
+58
-26
selector_rv_button_yellow_circle.xml
...rc/main/res/drawable/selector_rv_button_yellow_circle.xml
+7
-0
shape_rv_bg_shallow_dark_yellow_circle2.xml
.../res/drawable/shape_rv_bg_shallow_dark_yellow_circle2.xml
+5
-0
colors.xml
component_resource/src/main/res/values/colors.xml
+1
-0
WithdrawActivity.java
.../main/java/com/xxrv/wallet/activity/WithdrawActivity.java
+43
-25
activity_withdraw.xml
plugin_wallet/src/main/res/layout/activity_withdraw.xml
+2
-1
No files found.
component_resource/src/main/res/drawable/selector_rv_button_yellow_circle.xml
0 → 100644
View file @
22ba4eae
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@drawable/shape_rv_bg_shallow_dark_yellow_circle"
android:state_selected=
"true"
/>
<item
android:drawable=
"@drawable/shape_rv_bg_shallow_dark_yellow_circle2"
android:state_selected=
"false"
/>
</selector>
\ No newline at end of file
component_resource/src/main/res/drawable/shape_rv_bg_shallow_dark_yellow_circle2.xml
0 → 100644
View file @
22ba4eae
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"50dp"
/>
<solid
android:color=
"@color/gray_50FFB74B"
/>
</shape>
\ No newline at end of file
component_resource/src/main/res/values/colors.xml
View file @
22ba4eae
...
...
@@ -30,6 +30,7 @@
<color
name=
"gray_BA58EB"
>
#BA58EB
</color>
<color
name=
"gray_FBB336"
>
#FBB336
</color>
<color
name=
"gray_FFB74B"
>
#FFB74B
</color>
<color
name=
"gray_50FFB74B"
>
#40FFB74B
</color>
<color
name=
"gray_F96363"
>
#F96363
</color>
<color
name=
"gray_50ffffff"
>
#50ffffff
</color>
<color
name=
"gray_707070"
>
#707070
</color>
...
...
plugin_wallet/src/main/java/com/xxrv/wallet/activity/WithdrawActivity.java
View file @
22ba4eae
...
...
@@ -3,6 +3,7 @@ package com.xxrv.wallet.activity;
import
android.content.Context
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.text.Editable
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.widget.EditText
;
...
...
@@ -17,6 +18,7 @@ import com.frame.rv.config.RvFrameConfig;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.base.BaseStatusActivity
;
import
com.ruiwenliu.wrapper.util.ViewHolder
;
import
com.ruiwenliu.wrapper.util.listener.TextChangedListener
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.rv.home.rv.module.ApiConfig
;
import
com.xxrv.wallet.R
;
...
...
@@ -56,11 +58,13 @@ public class WithdrawActivity extends BaseStatusActivity<WalletPresenter> {
ImageView
ivAccountNumberIcon
;
@BindView
(
R2
.
id
.
tv_account_number
)
TextView
tvAccountNumber
;
@BindView
(
R2
.
id
.
tv_item_withdraw
)
TextView
tvItemWithdraw
;
private
String
accountNumber
;
private
String
withdrawalAmount
;
private
List
<
AccountNumberListBean
.
DataBean
>
accountNumberList
;
private
AccountNumberListBean
.
DataBean
selectAccountNumber
;
private
String
balance
;
public
static
Intent
getIntent
(
Context
context
,
String
balance
)
{
...
...
@@ -76,7 +80,36 @@ public class WithdrawActivity extends BaseStatusActivity<WalletPresenter> {
@Override
protected
void
initView
(
Bundle
savedInstanceState
,
TitleView
titleView
,
Intent
intent
)
{
titleView
.
setTitle
(
"提现"
);
tvHint
.
setText
(
"当前账户余额"
+
intent
.
getStringExtra
(
"balance"
)
+
"元"
);
balance
=
intent
.
getStringExtra
(
"balance"
);
tvHint
.
setText
(
"当前账户余额"
+
balance
+
"元"
);
etWithdrawalAmount
.
addTextChangedListener
(
new
TextChangedListener
()
{
@Override
public
void
afterTextChanged
(
Editable
s
)
{
super
.
afterTextChanged
(
s
);
String
withdrawalAmount
=
etWithdrawalAmount
.
getText
().
toString
();
if
(
withdrawalAmount
.
length
()
>
0
)
{
tvItemWithdraw
.
setEnabled
(
true
);
tvItemWithdraw
.
setSelected
(
true
);
if
(
Double
.
valueOf
(
withdrawalAmount
)
>
Double
.
valueOf
(
balance
))
{
tvHint
.
setText
(
"提现金额不能超过账户余额,当前账户余额"
+
balance
+
"元"
);
tvHint
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
colorBg
));
}
else
{
tvHint
.
setText
(
"当前账户余额"
+
balance
+
"元"
);
tvHint
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
textGray
));
}
}
else
{
tvItemWithdraw
.
setEnabled
(
false
);
tvItemWithdraw
.
setSelected
(
false
);
tvHint
.
setText
(
"当前账户余额"
+
balance
+
"元"
);
tvHint
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
textGray
));
}
}
});
}
@Override
...
...
@@ -105,22 +138,16 @@ public class WithdrawActivity extends BaseStatusActivity<WalletPresenter> {
mPresenter
.
getDataHead
(
RvFrameConfig
.
HOST
,
2
,
WalletApi
.
HTTP_URL_WALLET_RULE
,
WithdrawalRulesBean
.
class
,
headMap
,
true
);
}
/**
* 获取支付账号列表
*/
private
void
getAliPayList
()
{
Map
<
String
,
Object
>
headMap
=
new
LinkedHashMap
<>();
if
(
OkGoUtil
.
getToken
()
!=
null
)
headMap
.
put
(
"Authorization"
,
OkGoUtil
.
getToken
());
mPresenter
.
getDataHead
(
RvFrameConfig
.
HOST
,
1
,
WalletApi
.
HTTP_URL_WALLET_WXAPLIPAYLIST
,
AlipayListBean
.
class
,
headMap
,
true
);
@Override
public
void
onShowError
(
String
errorMsg
,
int
errorType
)
{
super
.
onShowError
(
errorMsg
,
errorType
);
tvHint
.
setText
(
errorMsg
+
",当前账户余额"
+
balance
+
"元"
);
tvHint
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
colorBg
));
}
@Override
public
void
onShowResult
(
int
requestType
,
BaseBean
result
)
{
switch
(
requestType
)
{
case
1
:
getAlipay
((
AlipayListBean
)
result
);
break
;
case
2
:
setWithdrawalRules
((
WithdrawalRulesBean
)
result
);
break
;
...
...
@@ -175,7 +202,9 @@ public class WithdrawActivity extends BaseStatusActivity<WalletPresenter> {
public
void
helper
(
ViewHolder
helper
)
{
super
.
helper
(
helper
);
helper
.
setText
(
R
.
id
.
tv_pay_amount
,
withdrawalAmount
+
"元"
);
helper
.
setText
(
R
.
id
.
tv_account_number
,
accountNumber
);
if
(
selectAccountNumber
!=
null
)
{
helper
.
setText
(
R
.
id
.
tv_account_number
,
selectAccountNumber
.
getNickname
());
}
helper
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
...
...
@@ -203,12 +232,6 @@ public class WithdrawActivity extends BaseStatusActivity<WalletPresenter> {
}
}
private
void
getAlipay
(
AlipayListBean
bean
)
{
if
(
bean
.
getData
()
!=
null
&&
bean
.
getData
().
size
()
>
0
)
{
// etAccountNumber.setText(bean.getData().get(0).getTxAlipay());
// etAccountNumber.setSelection(bean.getData().get(0).getTxAlipay().length());
}
}
@OnClick
({
R2
.
id
.
tv_item_withdraw
,
R2
.
id
.
tv_item_withdrawal_rules
,
R2
.
id
.
ll_item_select_account_number
})
public
void
onViewClicked
(
View
view
)
{
...
...
@@ -284,11 +307,6 @@ public class WithdrawActivity extends BaseStatusActivity<WalletPresenter> {
* 提现
*/
private
void
showHint
()
{
// accountNumber = etAccountNumber.getText().toString().trim();
// if (TextUtils.isEmpty(accountNumber)) {
// showToast("帐户不能为空!");
// return;
// }
withdrawalAmount
=
etWithdrawalAmount
.
getText
().
toString
().
trim
();
if
(
TextUtils
.
isEmpty
(
withdrawalAmount
))
{
...
...
plugin_wallet/src/main/res/layout/activity_withdraw.xml
View file @
22ba4eae
...
...
@@ -121,7 +121,8 @@
android:layout_marginLeft=
"@dimen/size_20"
android:layout_marginTop=
"@dimen/size_50"
android:layout_marginRight=
"@dimen/size_20"
android:background=
"@drawable/shape_rv_bg_shallow_dark_yellow_circle"
android:background=
"@drawable/selector_rv_button_yellow_circle"
android:enabled=
"false"
android:gravity=
"center"
android:text=
"提现"
android:textColor=
"@color/colorWrite"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment