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
891a2f5c
Commit
891a2f5c
authored
Aug 20, 2019
by
jianglx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改两个活动的海报页面
parent
aa25ac9f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
55 deletions
+67
-55
BillActivity.java
plugin_share/src/main/java/com/rv/share/BillActivity.java
+14
-13
WebViewActivity.java
plugin_share/src/main/java/com/rv/share/WebViewActivity.java
+8
-2
BillPresenter.java
...e/src/main/java/com/rv/share/presenter/BillPresenter.java
+18
-0
bg_btn_bill_save.xml
plugin_share/src/main/res/drawable/bg_btn_bill_save.xml
+1
-1
activity_bill.xml
plugin_share/src/main/res/layout/activity_bill.xml
+26
-39
No files found.
plugin_share/src/main/java/com/rv/share/BillActivity.java
View file @
891a2f5c
...
@@ -34,9 +34,9 @@ import butterknife.OnClick;
...
@@ -34,9 +34,9 @@ import butterknife.OnClick;
*/
*/
public
class
BillActivity
extends
BaseStatusActivity
<
BillPresenter
>
{
public
class
BillActivity
extends
BaseStatusActivity
<
BillPresenter
>
{
@BindView
(
R2
.
id
.
tv_back_title
)
//
@BindView(R2.id.tv_back_title)
TextView
tvBackTitle
;
//
TextView tvBackTitle;
@BindView
(
R2
.
id
.
btn_share
)
@BindView
(
R2
.
id
.
btn_share
_bill
)
Button
btnShare
;
Button
btnShare
;
@BindView
(
R2
.
id
.
ll_webview
)
@BindView
(
R2
.
id
.
ll_webview
)
CardView
llContent
;
CardView
llContent
;
...
@@ -50,11 +50,11 @@ public class BillActivity extends BaseStatusActivity<BillPresenter> {
...
@@ -50,11 +50,11 @@ public class BillActivity extends BaseStatusActivity<BillPresenter> {
return
intent
;
return
intent
;
}
}
@Override
//
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
//
protected void onCreate(Bundle savedInstanceState) {
super
.
onCreate
(
savedInstanceState
);
//
super.onCreate(savedInstanceState);
StatusBarUtil
.
setRootViewFitsSystemWindows
(
mActivity
,
false
);
//
StatusBarUtil.setRootViewFitsSystemWindows(mActivity, false);
}
//
}
@Override
@Override
protected
int
setLayout
()
{
protected
int
setLayout
()
{
...
@@ -66,7 +66,8 @@ public class BillActivity extends BaseStatusActivity<BillPresenter> {
...
@@ -66,7 +66,8 @@ public class BillActivity extends BaseStatusActivity<BillPresenter> {
protected
void
initView
(
Bundle
savedInstanceState
,
TitleView
titleView
,
Intent
intent
)
{
protected
void
initView
(
Bundle
savedInstanceState
,
TitleView
titleView
,
Intent
intent
)
{
url
=
intent
.
getStringExtra
(
"billUrl"
);
url
=
intent
.
getStringExtra
(
"billUrl"
);
titleView
.
setVisibility
(
View
.
GONE
);
titleView
.
setVisibility
(
View
.
VISIBLE
);
titleView
.
setTitle
(
"生成海报"
);
rvWebView
=
new
RvWebView
(
getApplicationContext
(),
listener
);
rvWebView
=
new
RvWebView
(
getApplicationContext
(),
listener
);
llContent
.
addView
(
rvWebView
);
llContent
.
addView
(
rvWebView
);
...
@@ -113,13 +114,13 @@ public class BillActivity extends BaseStatusActivity<BillPresenter> {
...
@@ -113,13 +114,13 @@ public class BillActivity extends BaseStatusActivity<BillPresenter> {
super
.
onDestroy
();
super
.
onDestroy
();
}
}
@OnClick
({
R2
.
id
.
tv_back_title
,
R2
.
id
.
btn_share
})
@OnClick
({
R2
.
id
.
btn_share_bill
,
R2
.
id
.
btn_save_bill
})
public
void
onViewClicked
(
View
view
)
{
public
void
onViewClicked
(
View
view
)
{
int
id
=
view
.
getId
();
int
id
=
view
.
getId
();
if
(
id
==
R
.
id
.
tv_back_title
)
{
if
(
id
==
R
.
id
.
btn_share_bill
)
{
finish
();
}
else
if
(
id
==
R
.
id
.
btn_share
)
{
preShare
();
preShare
();
}
else
if
(
id
==
R
.
id
.
btn_save_bill
)
{
mPresenter
.
saveBill
(
llContent
);
}
}
}
}
...
...
plugin_share/src/main/java/com/rv/share/WebViewActivity.java
View file @
891a2f5c
...
@@ -146,11 +146,17 @@ public class WebViewActivity extends BaseStatusActivity<WebViewPresenter> {
...
@@ -146,11 +146,17 @@ public class WebViewActivity extends BaseStatusActivity<WebViewPresenter> {
ivTitleRight
.
setImageResource
(
R
.
drawable
.
tourism_rv_rentingcar_icon_share
);
ivTitleRight
.
setImageResource
(
R
.
drawable
.
tourism_rv_rentingcar_icon_share
);
}
}
});
});
final
String
billUrl
=
RvFrameConfig
.
HOST
+
"/h5/appHtml/view/newPeoplePoster.html"
;
String
billUrl
=
null
;
if
(!
TextUtils
.
isEmpty
(
url
)
&&
url
.
contains
(
"invitationCourtesyShare.html"
))
{
billUrl
=
RvFrameConfig
.
HOST
+
"/h5/appHtml/view/poster.html"
;
}
else
if
(!
TextUtils
.
isEmpty
(
url
)
&&
url
.
contains
(
"newPeopleH5.html"
))
{
billUrl
=
RvFrameConfig
.
HOST
+
"/h5/appHtml/view/newPeoplePoster.html"
;
}
final
String
finalBillUrl
=
billUrl
;
ivTitleRight
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
ivTitleRight
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
mPresenter
.
showShareDialog
(
url
,
imgUrl
,
title
,
circleTitle
,
desc
,
b
illUrl
);
mPresenter
.
showShareDialog
(
url
,
imgUrl
,
title
,
circleTitle
,
desc
,
finalB
illUrl
);
}
}
});
});
}
}
...
...
plugin_share/src/main/java/com/rv/share/presenter/BillPresenter.java
View file @
891a2f5c
...
@@ -8,8 +8,10 @@ import android.support.v7.widget.CardView;
...
@@ -8,8 +8,10 @@ import android.support.v7.widget.CardView;
import
android.util.Log
;
import
android.util.Log
;
import
android.view.View
;
import
android.view.View
;
import
android.webkit.WebView
;
import
android.webkit.WebView
;
import
android.widget.Toast
;
import
com.ruiwenliu.wrapper.base.presenter.CommonPresenter
;
import
com.ruiwenliu.wrapper.base.presenter.CommonPresenter
;
import
com.rv.component.utils.ShareUtils
;
import
com.rv.component.utils.StorageUtils
;
import
com.rv.component.utils.StorageUtils
;
import
com.rv.share.view.ShareChoiceDialog
;
import
com.rv.share.view.ShareChoiceDialog
;
import
com.umeng.socialize.ShareAction
;
import
com.umeng.socialize.ShareAction
;
...
@@ -45,6 +47,22 @@ public class BillPresenter extends CommonPresenter {
...
@@ -45,6 +47,22 @@ public class BillPresenter extends CommonPresenter {
dialog
.
show
();
dialog
.
show
();
}
}
/*****
* 保存海报
* @param view
*/
public
void
saveBill
(
View
view
)
{
if
(
view
!=
null
)
{
Bitmap
bitmap
=
ShareUtils
.
viewConversionBitmap
(
view
);
File
file
=
null
;
if
(
bitmap
!=
null
)
{
file
=
ShareUtils
.
saveBitmapFile
(
getPresenterContext
(),
bitmap
);
}
if
(
file
!=
null
)
{
Toast
.
makeText
(
getPresenterContext
(),
"海报保存在"
+
file
.
getAbsolutePath
(),
Toast
.
LENGTH_LONG
).
show
();
}
}
}
/******
/******
* 分享地址
* 分享地址
* @param var1
* @param var1
...
...
plugin_share/src/main/res/drawable/bg_btn_bill_save.xml
View file @
891a2f5c
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
android:shape=
"rectangle"
>
<corners
android:radius=
"@dimen/size_
2
0"
/>
<corners
android:radius=
"@dimen/size_
3
0"
/>
<solid
android:color=
"@color/white"
/>
<solid
android:color=
"@color/white"
/>
</shape>
</shape>
\ No newline at end of file
plugin_share/src/main/res/layout/activity_bill.xml
View file @
891a2f5c
...
@@ -4,54 +4,41 @@
...
@@ -4,54 +4,41 @@
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=
"#F
E6E2F
"
android:background=
"#F
BE4B3
"
tools:context=
".BillActivity"
>
tools:context=
".BillActivity"
>
<com.ruiwenliu.wrapper.statusbar.StatusBarHeightView
android:id=
"@+id/ll_item_title"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
app:use_type=
"use_padding_top"
>
<TextView
android:id=
"@+id/tv_back_title"
android:layout_width=
"wrap_content"
android:layout_height=
"@dimen/size_40"
android:layout_alignParentLeft=
"true"
android:layout_alignParentTop=
"true"
android:layout_marginLeft=
"@dimen/dp_10"
android:drawableLeft=
"@drawable/rv_common_icon_back_white"
android:drawablePadding=
"@dimen/size_5"
android:gravity=
"center_vertical"
android:text=
"生成海报"
android:textColor=
"@color/white"
android:textSize=
"@dimen/text_18"
/>
</com.ruiwenliu.wrapper.statusbar.StatusBarHeightView>
<LinearLayout
<LinearLayout
android:id=
"@+id/ll_bottom"
android:id=
"@+id/ll_bottom"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentStart=
"true"
android:layout_alignParentBottom=
"true"
android:layout_alignParentBottom=
"true"
android:layout_marginBottom=
"@dimen/dp_10"
android:gravity=
"center"
android:gravity=
"center"
android:orientation=
"vertical"
>
android:orientation=
"horizontal"
android:paddingBottom=
"@dimen/size_15"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"分享海报,可以让好友一起参加啦~"
android:textColor=
"@color/gray_f5f5f5"
android:textSize=
"@dimen/sp_12"
/>
<Button
<Button
android:id=
"@+id/btn_s
hare
"
android:id=
"@+id/btn_s
ave_bill
"
android:layout_width=
"
match_parent
"
android:layout_width=
"
0dp
"
android:layout_height=
"@dimen/size_48"
android:layout_height=
"@dimen/size_48"
android:layout_marginLeft=
"@dimen/
dp_10
"
android:layout_marginLeft=
"@dimen/
size_15
"
android:layout_marginTop=
"@dimen/size_5"
android:layout_marginTop=
"@dimen/size_5"
android:layout_marginRight=
"@dimen/dp_10"
android:layout_marginRight=
"@dimen/dp_10"
android:layout_weight=
"1"
android:background=
"@drawable/bg_btn_bill_save"
android:gravity=
"center"
android:text=
"保存海报"
android:textColor=
"#FE9C36"
android:textSize=
"@dimen/sp_16"
/>
<Button
android:id=
"@+id/btn_share_bill"
android:layout_width=
"0dp"
android:layout_height=
"@dimen/size_48"
android:layout_marginLeft=
"@dimen/size_15"
android:layout_marginTop=
"@dimen/size_5"
android:layout_marginRight=
"@dimen/size_15"
android:layout_weight=
"1"
android:background=
"@drawable/shape_rv_bg_dark_yellow"
android:background=
"@drawable/shape_rv_bg_dark_yellow"
android:gravity=
"center"
android:gravity=
"center"
android:text=
"立即分享"
android:text=
"立即分享"
...
@@ -65,10 +52,10 @@
...
@@ -65,10 +52,10 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/ll_item_title"
android:layout_below=
"@id/ll_item_title"
android:layout_margin
Bottom=
"@dimen/size_100
"
android:layout_margin
Left=
"@dimen/size_15
"
android:layout_margin
Left=
"@dimen/dp_10
"
android:layout_margin
Top=
"@dimen/size_15
"
android:layout_margin
Top=
"@dimen/size_30
"
android:layout_margin
Right=
"@dimen/size_15
"
android:layout_margin
Right=
"@dimen/dp_1
0"
android:layout_margin
Bottom=
"@dimen/size_8
0"
android:background=
"@drawable/shape_rv_bg_bill"
android:background=
"@drawable/shape_rv_bg_bill"
android:orientation=
"vertical"
android:orientation=
"vertical"
app:cardCornerRadius=
"5dp"
/>
app:cardCornerRadius=
"5dp"
/>
...
...
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