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
4b4a8ae9
Commit
4b4a8ae9
authored
Nov 12, 2019
by
jianglx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化会员中心
parent
f397f1d0
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
38 deletions
+35
-38
MemberRightItem.java
...ber/src/main/java/com/rv.member/view/MemberRightItem.java
+9
-7
activity_member.xml
plugin_member/src/main/res/layout/activity_member.xml
+10
-7
item_login_view.xml
plugin_member/src/main/res/layout/item_login_view.xml
+1
-3
view_member_compare.xml
plugin_member/src/main/res/layout/view_member_compare.xml
+3
-1
view_member_privilege.xml
plugin_member/src/main/res/layout/view_member_privilege.xml
+9
-14
view_member_right_item.xml
plugin_member/src/main/res/layout/view_member_right_item.xml
+3
-6
No files found.
plugin_member/src/main/java/com/rv.member/view/MemberRightItem.java
View file @
4b4a8ae9
...
@@ -35,18 +35,20 @@ public class MemberRightItem extends LinearLayout {
...
@@ -35,18 +35,20 @@ public class MemberRightItem extends LinearLayout {
addView
(
view
,
LinearLayout
.
LayoutParams
.
MATCH_PARENT
,
LayoutParams
.
WRAP_CONTENT
);
addView
(
view
,
LinearLayout
.
LayoutParams
.
MATCH_PARENT
,
LayoutParams
.
WRAP_CONTENT
);
}
}
public
void
setData
(
MemberListBean
.
MemberCard
memberCard
,
int
position
)
{
public
void
setData
(
MemberListBean
.
MemberCard
memberCard
,
int
position
)
{
if
(
memberCard
!=
null
)
{
if
(
memberCard
!=
null
)
{
this
.
tvMemberLevel
.
setText
(
TextUtils
.
isEmpty
(
memberCard
.
getName
())
?
" "
:
memberCard
.
getName
());
this
.
tvMemberLevel
.
setText
(
TextUtils
.
isEmpty
(
memberCard
.
getName
())
?
" "
:
memberCard
.
getName
());
this
.
tvMemberDiscount
.
setText
(
"永久"
+
(
memberCard
.
getDiscount
()
/
10
)
+
"折"
);
this
.
tvMemberDiscount
.
setText
(
"永久"
+
(
memberCard
.
getDiscount
()
/
10
)
+
"折"
);
if
(
memberCard
.
getDaysPrice
()
!=
null
){
SpannableStringBuilder
rentBuilder
=
new
SpannableStringBuilder
(
memberCard
.
getNumber
()
+
"天"
+
"\n 价值 ¥"
+
dealPrice
(
memberCard
.
getDaysPrice
()));
StringBuilder
builder
=
new
StringBuilder
(
memberCard
.
getNumber
()
+
"天"
);
if
(
memberCard
.
getDaysPrice
()
!=
null
)
{
builder
.
append
(
"\n 价值 ¥"
+
dealPrice
(
memberCard
.
getDaysPrice
()));
}
SpannableStringBuilder
rentBuilder
=
new
SpannableStringBuilder
(
builder
.
toString
());
String
rentText
=
rentBuilder
.
toString
();
String
rentText
=
rentBuilder
.
toString
();
rentBuilder
.
setSpan
(
new
ForegroundColorSpan
(
Color
.
parseColor
(
"#FF5050"
)),
rentText
.
indexOf
(
"¥"
),
rentBuilder
.
length
(),
Spanned
.
SPAN_EXCLUSIVE_EXCLUSIVE
);
rentBuilder
.
setSpan
(
new
ForegroundColorSpan
(
Color
.
parseColor
(
"#FF5050"
)),
rentText
.
indexOf
(
"¥"
),
rentBuilder
.
length
(),
Spanned
.
SPAN_EXCLUSIVE_EXCLUSIVE
);
this
.
tvMemberFreeDay
.
setText
(
rentBuilder
);
this
.
tvMemberFreeDay
.
setText
(
rentBuilder
);
}
}
}
if
(
position
%
2
!=
0
)
{
if
(
position
%
2
!=
0
)
{
setBackgroundColor
(
Color
.
parseColor
(
"#fff6e2"
));
setBackgroundColor
(
Color
.
parseColor
(
"#fff6e2"
));
...
@@ -54,7 +56,7 @@ public class MemberRightItem extends LinearLayout {
...
@@ -54,7 +56,7 @@ public class MemberRightItem extends LinearLayout {
}
}
private
String
dealPrice
(
BigDecimal
value
)
{
private
String
dealPrice
(
BigDecimal
value
)
{
if
(
value
==
null
)
return
""
;
if
(
value
==
null
)
return
""
;
BigDecimal
noZeros
=
value
.
stripTrailingZeros
();
BigDecimal
noZeros
=
value
.
stripTrailingZeros
();
return
noZeros
.
toPlainString
();
return
noZeros
.
toPlainString
();
}
}
...
...
plugin_member/src/main/res/layout/activity_member.xml
View file @
4b4a8ae9
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/size_20"
android:layout_marginTop=
"@dimen/size_20"
android:layout_marginBottom=
"@dimen/size_
2
0"
android:layout_marginBottom=
"@dimen/size_
3
0"
android:gravity=
"center"
android:gravity=
"center"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
<LinearLayout
<LinearLayout
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/size_
20
"
android:layout_marginTop=
"@dimen/size_
15
"
android:layout_marginRight=
"@dimen/dp_10"
android:layout_marginRight=
"@dimen/dp_10"
android:layout_marginBottom=
"@dimen/size_15"
android:layout_marginBottom=
"@dimen/size_15"
android:layout_weight=
"1"
android:layout_weight=
"1"
...
@@ -97,6 +97,7 @@
...
@@ -97,6 +97,7 @@
android:textSize=
"@dimen/text_14"
/>
android:textSize=
"@dimen/text_14"
/>
<TextView
<TextView
android:letterSpacing=
"0.1"
android:id=
"@+id/tv_member_discount_hint"
android:id=
"@+id/tv_member_discount_hint"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -128,7 +129,7 @@
...
@@ -128,7 +129,7 @@
<LinearLayout
<LinearLayout
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/size_
20
"
android:layout_marginTop=
"@dimen/size_
15
"
android:layout_marginRight=
"@dimen/dp_10"
android:layout_marginRight=
"@dimen/dp_10"
android:layout_marginBottom=
"@dimen/size_15"
android:layout_marginBottom=
"@dimen/size_15"
android:layout_weight=
"1"
android:layout_weight=
"1"
...
@@ -152,6 +153,7 @@
...
@@ -152,6 +153,7 @@
android:textSize=
"@dimen/text_14"
/>
android:textSize=
"@dimen/text_14"
/>
<TextView
<TextView
android:letterSpacing=
"0.1"
android:id=
"@+id/tv_member_free_day_hint"
android:id=
"@+id/tv_member_free_day_hint"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -174,7 +176,7 @@
...
@@ -174,7 +176,7 @@
android:layout_marginLeft=
"@dimen/dp_10"
android:layout_marginLeft=
"@dimen/dp_10"
android:layout_marginTop=
"@dimen/size_10"
android:layout_marginTop=
"@dimen/size_10"
android:layout_marginRight=
"@dimen/dp_10"
android:layout_marginRight=
"@dimen/dp_10"
android:layout_marginBottom=
"@dimen/size_
15
"
android:layout_marginBottom=
"@dimen/size_
20
"
android:background=
"@drawable/shape_rv_bg_member_rights"
android:background=
"@drawable/shape_rv_bg_member_rights"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
...
@@ -184,7 +186,7 @@
...
@@ -184,7 +186,7 @@
<LinearLayout
<LinearLayout
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/size_
20
"
android:layout_marginTop=
"@dimen/size_
15
"
android:layout_marginRight=
"@dimen/dp_10"
android:layout_marginRight=
"@dimen/dp_10"
android:layout_marginBottom=
"@dimen/size_15"
android:layout_marginBottom=
"@dimen/size_15"
android:layout_weight=
"1"
android:layout_weight=
"1"
...
@@ -210,6 +212,7 @@
...
@@ -210,6 +212,7 @@
<TextView
<TextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:letterSpacing=
"0.1"
android:text=
"会员可免费参加滴房车举办的各种沙龙讲座及户外活动,结识更多的房车爱好者"
android:text=
"会员可免费参加滴房车举办的各种沙龙讲座及户外活动,结识更多的房车爱好者"
android:textColor=
"#ff666666"
android:textColor=
"#ff666666"
android:textSize=
"@dimen/text_12"
/>
android:textSize=
"@dimen/text_12"
/>
...
@@ -231,8 +234,8 @@
...
@@ -231,8 +234,8 @@
<TextView
<TextView
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/size_
15
"
android:layout_marginTop=
"@dimen/size_
20
"
android:layout_marginBottom=
"@dimen/size_
2
0"
android:layout_marginBottom=
"@dimen/size_
3
0"
android:gravity=
"center"
android:gravity=
"center"
android:text=
"价值对比"
android:text=
"价值对比"
android:textColor=
"#ff171413"
android:textColor=
"#ff171413"
...
...
plugin_member/src/main/res/layout/item_login_view.xml
View file @
4b4a8ae9
...
@@ -45,9 +45,7 @@
...
@@ -45,9 +45,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"@dimen/dp_10"
android:layout_marginBottom=
"@dimen/dp_10"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
>
android:paddingLeft=
"@dimen/size_15"
android:paddingRight=
"@dimen/size_15"
>
<TextView
<TextView
android:id=
"@+id/tv_consume_record"
android:id=
"@+id/tv_consume_record"
...
...
plugin_member/src/main/res/layout/view_member_compare.xml
View file @
4b4a8ae9
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
tools:ignore=
"MissingDefaultResource"
>
<View
<View
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
...
plugin_member/src/main/res/layout/view_member_privilege.xml
View file @
4b4a8ae9
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:visibility=
"gone"
android:visibility=
"gone"
android:layout_marginBottom=
"@dimen/size_20"
android:weightSum=
"3"
>
android:weightSum=
"3"
>
<LinearLayout
<LinearLayout
...
@@ -30,14 +31,13 @@
...
@@ -30,14 +31,13 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"#333333"
android:textColor=
"#333333"
android:textSize=
"@dimen/
text_12
"
/>
android:textSize=
"@dimen/
sp_14
"
/>
<Button
<Button
android:id=
"@+id/btn_disount_use"
android:id=
"@+id/btn_disount_use"
android:layout_width=
"73dp"
android:layout_width=
"73dp"
android:layout_height=
"@dimen/size_28"
android:layout_height=
"@dimen/size_28"
android:layout_marginTop=
"@dimen/dp_10"
android:layout_marginTop=
"@dimen/dp_10"
android:layout_marginBottom=
"@dimen/size_8"
android:background=
"@drawable/shape_member_bg_btn_yellow"
android:background=
"@drawable/shape_member_bg_btn_yellow"
android:gravity=
"center"
android:gravity=
"center"
android:stateListAnimator=
"@null"
android:stateListAnimator=
"@null"
...
@@ -68,14 +68,13 @@
...
@@ -68,14 +68,13 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"#333333"
android:textColor=
"#333333"
android:textSize=
"@dimen/
text_12
"
/>
android:textSize=
"@dimen/
sp_14
"
/>
<Button
<Button
android:id=
"@+id/btn_freeday_use"
android:id=
"@+id/btn_freeday_use"
android:layout_width=
"@dimen/size_80"
android:layout_width=
"@dimen/size_80"
android:layout_height=
"@dimen/size_28"
android:layout_height=
"@dimen/size_28"
android:layout_marginTop=
"@dimen/dp_10"
android:layout_marginTop=
"@dimen/dp_10"
android:layout_marginBottom=
"@dimen/size_8"
android:background=
"@drawable/shape_member_bg_btn_yellow"
android:background=
"@drawable/shape_member_bg_btn_yellow"
android:gravity=
"center"
android:gravity=
"center"
android:stateListAnimator=
"@null"
android:stateListAnimator=
"@null"
...
@@ -105,13 +104,12 @@
...
@@ -105,13 +104,12 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/tv_outdoors_act"
android:text=
"@string/tv_outdoors_act"
android:textColor=
"#333333"
android:textColor=
"#333333"
android:textSize=
"@dimen/
text_12
"
/>
android:textSize=
"@dimen/
sp_14
"
/>
<Button
<Button
android:layout_width=
"@dimen/size_80"
android:layout_width=
"@dimen/size_80"
android:layout_height=
"@dimen/size_28"
android:layout_height=
"@dimen/size_28"
android:layout_marginTop=
"@dimen/dp_10"
android:layout_marginTop=
"@dimen/dp_10"
android:layout_marginBottom=
"@dimen/size_8"
android:background=
"@drawable/shape_rv_bg_member_top_grap"
android:background=
"@drawable/shape_rv_bg_member_top_grap"
android:enabled=
"false"
android:enabled=
"false"
android:gravity=
"center"
android:gravity=
"center"
...
@@ -127,15 +125,12 @@
...
@@ -127,15 +125,12 @@
<View
<View
android:id=
"@+id/view_line"
android:id=
"@+id/view_line"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"1px"
android:layout_height=
"15dp"
android:layout_marginLeft=
"@dimen/dp_10"
android:background=
"#F5F5F5"
/>
android:layout_marginTop=
"5dp"
android:layout_marginRight=
"@dimen/dp_10"
android:layout_marginBottom=
"@dimen/dp_10"
android:background=
"#eee"
/>
<GridView
<GridView
android:layout_marginTop=
"13dp"
android:id=
"@+id/gridview"
android:id=
"@+id/gridview"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -193,9 +188,9 @@
...
@@ -193,9 +188,9 @@
android:id=
"@+id/btn_buy"
android:id=
"@+id/btn_buy"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_40"
android:layout_height=
"@dimen/dp_40"
android:layout_marginLeft=
"@dimen/
size_2
0"
android:layout_marginLeft=
"@dimen/
dp_1
0"
android:layout_marginTop=
"@dimen/size_10"
android:layout_marginTop=
"@dimen/size_10"
android:layout_marginRight=
"@dimen/
size_2
0"
android:layout_marginRight=
"@dimen/
dp_1
0"
android:layout_marginBottom=
"@dimen/size_20"
android:layout_marginBottom=
"@dimen/size_20"
android:gravity=
"center"
android:gravity=
"center"
android:textColor=
"#714C37"
android:textColor=
"#714C37"
...
...
plugin_member/src/main/res/layout/view_member_right_item.xml
View file @
4b4a8ae9
...
@@ -10,9 +10,8 @@
...
@@ -10,9 +10,8 @@
android:layout_height=
"@dimen/size_80"
android:layout_height=
"@dimen/size_80"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:gravity=
"center"
android:gravity=
"center"
android:text=
"会员等级"
android:textColor=
"#666666"
android:textColor=
"#666666"
android:textSize=
"@dimen/
sp_16
"
/>
android:textSize=
"@dimen/
text_15
"
/>
<View
<View
android:layout_width=
"1px"
android:layout_width=
"1px"
...
@@ -25,9 +24,8 @@
...
@@ -25,9 +24,8 @@
android:layout_height=
"@dimen/size_80"
android:layout_height=
"@dimen/size_80"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:gravity=
"center"
android:gravity=
"center"
android:text=
"租车折扣"
android:textColor=
"#666666"
android:textColor=
"#666666"
android:textSize=
"@dimen/
sp_16
"
/>
android:textSize=
"@dimen/
text_15
"
/>
<View
<View
android:layout_width=
"1px"
android:layout_width=
"1px"
...
@@ -47,9 +45,8 @@
...
@@ -47,9 +45,8 @@
android:gravity=
"center"
android:gravity=
"center"
android:lines=
"2"
android:lines=
"2"
android:paddingTop=
"-20dp"
android:paddingTop=
"-20dp"
android:text=
"免费天数"
android:textColor=
"#666666"
android:textColor=
"#666666"
android:textSize=
"@dimen/
sp_16
"
/>
android:textSize=
"@dimen/
text_15
"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
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