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
582d8df9
Commit
582d8df9
authored
Aug 09, 2019
by
jianglx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改推广有礼
parent
fa666144
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
48 deletions
+60
-48
ShareActivity.java
plugin_share/src/main/java/com/rv/share/ShareActivity.java
+18
-5
SharePresenter.java
.../src/main/java/com/rv/share/presenter/SharePresenter.java
+1
-1
activity_reative_bill.xml
plugin_share/src/main/res/layout/activity_reative_bill.xml
+20
-23
activity_share.xml
plugin_share/src/main/res/layout/activity_share.xml
+21
-19
No files found.
plugin_share/src/main/java/com/rv/share/ShareActivity.java
View file @
582d8df9
package
com
.
rv
.
share
;
package
com
.
rv
.
share
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.graphics.Typeface
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.text.SpannableStringBuilder
;
import
android.text.Spanned
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.text.style.TextAppearanceSpan
;
import
android.view.View
;
import
android.view.View
;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
import
android.widget.TextView
;
import
android.widget.TextView
;
...
@@ -14,6 +18,7 @@ import com.ruiwenliu.wrapper.base.BaseBean;
...
@@ -14,6 +18,7 @@ import com.ruiwenliu.wrapper.base.BaseBean;
import
com.ruiwenliu.wrapper.util.glide.GlideManager
;
import
com.ruiwenliu.wrapper.util.glide.GlideManager
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.rv.component.utils.Cookie
;
import
com.rv.component.utils.Cookie
;
import
com.rv.component.utils.DisplayUtil
;
import
com.rv.home.rv.module.ApiConfig
;
import
com.rv.home.rv.module.ApiConfig
;
import
com.rv.home.rv.module.basic.BaseStatusActivity
;
import
com.rv.home.rv.module.basic.BaseStatusActivity
;
import
com.rv.share.bean.PersonShareBean
;
import
com.rv.share.bean.PersonShareBean
;
...
@@ -65,9 +70,18 @@ public class ShareActivity extends BaseStatusActivity<SharePresenter> {
...
@@ -65,9 +70,18 @@ public class ShareActivity extends BaseStatusActivity<SharePresenter> {
}
}
private
void
setView
(
PersonShareBean
.
PersonShareInfo
data
)
{
private
void
setView
(
PersonShareBean
.
PersonShareInfo
data
)
{
tvAmount
.
setText
(
data
.
getTotalIncome
()
+
"元"
);
tvPersonInval
.
setText
(
data
.
getInviteNumber
()
+
"人"
);
SpannableStringBuilder
spanBuilder
=
new
SpannableStringBuilder
(
data
.
getTotalIncome
()
+
"元"
);
tvPersonUse
.
setText
(
data
.
getActivatedNumber
()
+
"人"
);
spanBuilder
.
setSpan
(
new
TextAppearanceSpan
(
null
,
Typeface
.
BOLD
,
DisplayUtil
.
sp2px
(
this
,
18
),
null
,
null
),
0
,
data
.
getTotalIncome
().
toString
().
length
(),
Spanned
.
SPAN_EXCLUSIVE_INCLUSIVE
);
tvAmount
.
setText
(
spanBuilder
);
SpannableStringBuilder
spanBuilder1
=
new
SpannableStringBuilder
(
data
.
getInviteNumber
()
+
"人"
);
spanBuilder1
.
setSpan
(
new
TextAppearanceSpan
(
null
,
Typeface
.
BOLD
,
DisplayUtil
.
sp2px
(
this
,
18
),
null
,
null
),
0
,
String
.
valueOf
(
data
.
getInviteNumber
()).
length
(),
Spanned
.
SPAN_EXCLUSIVE_INCLUSIVE
);
tvPersonInval
.
setText
(
spanBuilder1
);
SpannableStringBuilder
spanBuilder2
=
new
SpannableStringBuilder
(
data
.
getActivatedNumber
()
+
"人"
);
spanBuilder2
.
setSpan
(
new
TextAppearanceSpan
(
null
,
Typeface
.
BOLD
,
DisplayUtil
.
sp2px
(
this
,
18
),
null
,
null
),
0
,
String
.
valueOf
(
data
.
getActivatedNumber
()).
length
(),
Spanned
.
SPAN_EXCLUSIVE_INCLUSIVE
);
tvPersonUse
.
setText
(
spanBuilder2
);
if
(
TextUtils
.
isEmpty
(
data
.
getLeaderHeadUrl
())
&&
TextUtil
.
isEmpty
(
data
.
getLeaderUsername
()))
{
if
(
TextUtils
.
isEmpty
(
data
.
getLeaderHeadUrl
())
&&
TextUtil
.
isEmpty
(
data
.
getLeaderUsername
()))
{
((
View
)
tvParentPhone
.
getParent
().
getParent
()).
setVisibility
(
View
.
INVISIBLE
);
((
View
)
tvParentPhone
.
getParent
().
getParent
()).
setVisibility
(
View
.
INVISIBLE
);
}
else
{
}
else
{
...
@@ -112,8 +126,7 @@ public class ShareActivity extends BaseStatusActivity<SharePresenter> {
...
@@ -112,8 +126,7 @@ public class ShareActivity extends BaseStatusActivity<SharePresenter> {
int
id
=
view
.
getId
();
int
id
=
view
.
getId
();
if
(
TextUtils
.
isEmpty
(
shareUrl
))
{
if
(
TextUtils
.
isEmpty
(
shareUrl
))
{
String
code
=
Cookie
.
getStringValue
(
getApplicationContext
(),
SPConstance
.
USER_JSON_CODE
,
""
);
String
code
=
Cookie
.
getStringValue
(
getApplicationContext
(),
SPConstance
.
USER_JSON_CODE
,
""
);
shareUrl
=
RvFrameConfig
.
HOST_H5_DETAIL
+
"/h5/appHtml/view/newPeopleH5.html?code="
+
code
+
"&userName="
+
Cookie
.
getStringValue
(
getApplicationContext
(),
SPConstance
.
USER_JSON_NAME
)
shareUrl
=
RvFrameConfig
.
HOST_H5_DETAIL
+
"/h5/appHtml/view/newPeopleH5.html?code="
+
code
;
+
"&headUrl="
+
Cookie
.
getStringValue
(
getApplicationContext
(),
SPConstance
.
USER_JSON_HEADERURL
,
""
);
}
}
if
(
id
==
R
.
id
.
tv_weixin
)
{
if
(
id
==
R
.
id
.
tv_weixin
)
{
mPresenter
.
shareWx
(
shareUrl
,
"新人专享大礼包,快去领!"
,
" "
);
mPresenter
.
shareWx
(
shareUrl
,
"新人专享大礼包,快去领!"
,
" "
);
...
...
plugin_share/src/main/java/com/rv/share/presenter/SharePresenter.java
View file @
582d8df9
...
@@ -27,7 +27,7 @@ import com.umeng.socialize.media.UMWeb;
...
@@ -27,7 +27,7 @@ import com.umeng.socialize.media.UMWeb;
public
class
SharePresenter
extends
CommonPresenter
{
public
class
SharePresenter
extends
CommonPresenter
{
private
ShareAction
shareAction
=
null
;
private
ShareAction
shareAction
=
null
;
private
int
drawableSize
=
5
0
;
private
int
drawableSize
=
7
0
;
private
String
mUrl
=
null
;
private
String
mUrl
=
null
;
private
String
mTitle
=
null
;
private
String
mTitle
=
null
;
private
String
mDescript
=
null
;
private
String
mDescript
=
null
;
...
...
plugin_share/src/main/res/layout/activity_reative_bill.xml
View file @
582d8df9
...
@@ -27,27 +27,30 @@
...
@@ -27,27 +27,30 @@
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#F9D993"
>
android:background=
"#F9D993"
>
<ScrollView
<android.support.v7.widget.CardView
android:id=
"@+id/ll_bill_content"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"13dp"
android:layout_gravity=
"top"
android:layout_marginLeft=
"10dp"
android:layout_marginTop=
"@dimen/size_15"
android:layout_marginTop=
"@dimen/size_15"
android:layout_marginRight=
"1
3
dp"
android:layout_marginRight=
"1
0
dp"
android:layout_marginBottom=
"@dimen/size_70"
android:layout_marginBottom=
"@dimen/size_70"
android:scrollbars=
"none"
>
android:background=
"@color/white"
app:cardCornerRadius=
"5dp"
>
<android.support.v7.widget.CardView
<ScrollView
android:id=
"@+id/ll_bill_content"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"top"
android:layout_marginLeft=
"@dimen/size_10"
android:background=
"@color/white"
android:layout_marginTop=
"@dimen/size_10"
app:cardCornerRadius=
"5dp"
>
android:layout_marginRight=
"@dimen/size_10"
android:layout_marginBottom=
"@dimen/size_10"
android:scrollbars=
"none"
>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_margin=
"@dimen/size_10"
android:gravity=
"center_horizontal"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
...
@@ -59,14 +62,10 @@
...
@@ -59,14 +62,10 @@
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_10"
android:layout_marginTop=
"@dimen/dp_10"
android:layout_marginTop=
"@dimen/size_20"
android:layout_marginRight=
"@dimen/size_10"
android:layout_marginBottom=
"@dimen/size_15"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<com.base.utils.ui.image.round.RoundImageView
<com.base.utils.ui.image.round.RoundImageView
android:id=
"@+id/ring_header"
android:id=
"@+id/ring_header"
android:layout_width=
"@dimen/size_50"
android:layout_width=
"@dimen/size_50"
...
@@ -98,7 +97,7 @@
...
@@ -98,7 +97,7 @@
<LinearLayout
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"
match_par
ent"
android:layout_height=
"
wrap_cont
ent"
android:layout_gravity=
"right"
android:layout_gravity=
"right"
android:layout_marginLeft=
"@dimen/text_10"
android:layout_marginLeft=
"@dimen/text_10"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
...
@@ -112,19 +111,17 @@
...
@@ -112,19 +111,17 @@
<ImageView
<ImageView
android:id=
"@+id/img_qrcode"
android:id=
"@+id/img_qrcode"
android:layout_width=
"@dimen/size_
6
0"
android:layout_width=
"@dimen/size_
7
0"
android:layout_height=
"@dimen/size_
6
0"
android:layout_height=
"@dimen/size_
7
0"
android:layout_marginLeft=
"@dimen/size_20"
android:layout_marginLeft=
"@dimen/size_20"
android:src=
"@drawable/icon_share_wx"
/>
android:src=
"@drawable/icon_share_wx"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
</android.support.v7.widget.CardView>
<!--</LinearLayout>-->
</android.support.v7.widget.CardView>
<!--</LinearLayout>-->
</ScrollView>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
...
plugin_share/src/main/res/layout/activity_share.xml
View file @
582d8df9
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#ff
e5d0
"
android:background=
"#ff
b74b
"
android:gravity=
"center_horizontal"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
android:orientation=
"vertical"
...
@@ -45,9 +45,9 @@
...
@@ -45,9 +45,9 @@
<android.support.v7.widget.CardView
<android.support.v7.widget.CardView
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_1
5
"
android:layout_marginLeft=
"@dimen/size_1
0
"
android:layout_marginTop=
"@dimen/size_10"
android:layout_marginRight=
"@dimen/size_1
5
"
android:layout_marginRight=
"@dimen/size_1
0
"
android:layout_marginBottom=
"@dimen/size_10"
android:layout_marginBottom=
"@dimen/size_10"
android:background=
"@color/white"
android:background=
"@color/white"
app:cardCornerRadius=
"5dp"
>
app:cardCornerRadius=
"5dp"
>
...
@@ -63,14 +63,15 @@
...
@@ -63,14 +63,15 @@
android:layout_marginLeft=
"@dimen/dp_10"
android:layout_marginLeft=
"@dimen/dp_10"
android:layout_marginTop=
"@dimen/dp_10"
android:layout_marginTop=
"@dimen/dp_10"
android:text=
"分享方式"
android:text=
"分享方式"
android:textColor=
"@color/
black
"
android:textColor=
"@color/
colorMain
"
android:textSize=
"@dimen/text_18"
android:textSize=
"@dimen/text_18"
android:textStyle=
"bold"
/>
android:textStyle=
"bold"
/>
<LinearLayout
<LinearLayout
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_
15
"
android:layout_marginBottom=
"@dimen/size_15"
android:layout_marginBottom=
"@dimen/size_15"
android:gravity=
"center"
android:gravity=
"center"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
...
@@ -82,7 +83,7 @@
...
@@ -82,7 +83,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:drawableTop=
"@drawable/icon_share_weixin"
android:drawableTop=
"@drawable/icon_share_weixin"
android:drawablePadding=
"@dimen/size_
10
"
android:drawablePadding=
"@dimen/size_
5
"
android:gravity=
"center"
android:gravity=
"center"
android:text=
"微信"
/>
android:text=
"微信"
/>
...
@@ -92,7 +93,7 @@
...
@@ -92,7 +93,7 @@
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:drawablePadding=
"@dimen/size_
10
"
android:drawablePadding=
"@dimen/size_
5
"
android:drawableTop=
"@drawable/icon_share_wx_circle"
android:drawableTop=
"@drawable/icon_share_wx_circle"
android:gravity=
"center"
android:gravity=
"center"
android:text=
"朋友圈"
/>
android:text=
"朋友圈"
/>
...
@@ -104,7 +105,7 @@
...
@@ -104,7 +105,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:drawableTop=
"@drawable/icon_share_code"
android:drawableTop=
"@drawable/icon_share_code"
android:drawablePadding=
"@dimen/size_
10
"
android:drawablePadding=
"@dimen/size_
5
"
android:gravity=
"center"
android:gravity=
"center"
android:text=
"邀请码"
/>
android:text=
"邀请码"
/>
...
@@ -113,7 +114,7 @@
...
@@ -113,7 +114,7 @@
android:id=
"@+id/tv_more"
android:id=
"@+id/tv_more"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:drawablePadding=
"@dimen/size_
10
"
android:drawablePadding=
"@dimen/size_
5
"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:drawableTop=
"@drawable/icon_share_more"
android:drawableTop=
"@drawable/icon_share_more"
android:gravity=
"center"
android:gravity=
"center"
...
@@ -129,8 +130,8 @@
...
@@ -129,8 +130,8 @@
<android.support.v7.widget.CardView
<android.support.v7.widget.CardView
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_1
5
"
android:layout_marginLeft=
"@dimen/size_1
0
"
android:layout_marginRight=
"@dimen/size_1
5
"
android:layout_marginRight=
"@dimen/size_1
0
"
android:layout_marginBottom=
"@dimen/size_10"
android:layout_marginBottom=
"@dimen/size_10"
android:background=
"@color/white"
android:background=
"@color/white"
app:cardCornerRadius=
"5dp"
>
app:cardCornerRadius=
"5dp"
>
...
@@ -153,8 +154,9 @@
...
@@ -153,8 +154,9 @@
android:layout_alignParentLeft=
"true"
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
android:layout_centerVertical=
"true"
android:text=
"我的推广"
android:text=
"我的推广"
android:textColor=
"#000000"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/text_15"
/>
android:textSize=
"@dimen/text_18"
android:textStyle=
"bold"
/>
<TextView
<TextView
android:id=
"@+id/tv_more_detail"
android:id=
"@+id/tv_more_detail"
...
@@ -266,8 +268,8 @@
...
@@ -266,8 +268,8 @@
<android.support.v7.widget.CardView
<android.support.v7.widget.CardView
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"48dp"
android:layout_height=
"48dp"
android:layout_marginLeft=
"@dimen/size_1
5
"
android:layout_marginLeft=
"@dimen/size_1
0
"
android:layout_marginRight=
"@dimen/size_1
5
"
android:layout_marginRight=
"@dimen/size_1
0
"
android:layout_marginBottom=
"@dimen/size_10"
android:layout_marginBottom=
"@dimen/size_10"
android:background=
"@color/white"
android:background=
"@color/white"
app:cardCornerRadius=
"5dp"
>
app:cardCornerRadius=
"5dp"
>
...
@@ -283,9 +285,9 @@
...
@@ -283,9 +285,9 @@
android:layout_centerVertical=
"true"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"@dimen/dp_10"
android:layout_marginLeft=
"@dimen/dp_10"
android:text=
"我的推广人"
android:text=
"我的推广人"
android:textColor=
"
#000000
"
android:textColor=
"
@color/colorMain
"
android:textSize=
"@dimen/text_15"
android:textSize=
"@dimen/text_15"
android:textStyle=
"bold"
/>
android:textStyle=
"bold"
/>
<TextView
<TextView
android:id=
"@+id/tv_parent_phone"
android:id=
"@+id/tv_parent_phone"
...
...
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