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
f357428d
Commit
f357428d
authored
Aug 06, 2019
by
jianglx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
积分签到
parent
730c239d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
23 deletions
+45
-23
ShareImageActivity.java
...om/rv/home/rv/module/ui/main/home/ShareImageActivity.java
+2
-1
rv_act_share_image.xml
module_home/src/main/res/layout/rv_act_share_image.xml
+2
-2
TravelDetailsActivity.java
...main/java/com/rv/tourism/other/TravelDetailsActivity.java
+37
-16
Actions.java
plugin_points/src/main/java/com/rv/points/Actions.java
+4
-4
No files found.
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/ShareImageActivity.java
View file @
f357428d
...
...
@@ -116,7 +116,7 @@ public class ShareImageActivity extends SwipeBackActivity<CommonPresenter> {
}
@OnClick
({
R2
.
id
.
img_title_left
,
R2
.
id
.
tv_share
})
@OnClick
({
R2
.
id
.
img_title_left
,
R2
.
id
.
tv_share
,
R2
.
id
.
iv_code
})
public
void
onViewClicked
(
View
view
)
{
int
i
=
view
.
getId
();
if
(
i
==
R
.
id
.
img_title_left
)
{
...
...
@@ -126,6 +126,7 @@ public class ShareImageActivity extends SwipeBackActivity<CommonPresenter> {
if
(
rlBody
!=
null
&&
getViewBitmap
(
rlBody
)
!=
null
)
{
initShare
(
getViewBitmap
(
rlBody
));
}
}
else
if
(
i
==
R
.
id
.
iv_code
)
{
}
}
...
...
module_home/src/main/res/layout/rv_act_share_image.xml
View file @
f357428d
...
...
@@ -149,8 +149,8 @@
<ImageView
android:id=
"@+id/iv_code"
android:layout_width=
"@dimen/size_
6
0"
android:layout_height=
"@dimen/size_
6
0"
android:layout_width=
"@dimen/size_
8
0"
android:layout_height=
"@dimen/size_
8
0"
android:layout_marginLeft=
"@dimen/size_30"
android:scaleType=
"centerCrop"
/>
...
...
module_tourism/src/main/java/com/rv/tourism/other/TravelDetailsActivity.java
View file @
f357428d
...
...
@@ -9,6 +9,7 @@ import android.net.Uri;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
android.view.View
;
import
android.webkit.JavascriptInterface
;
import
android.webkit.WebChromeClient
;
...
...
@@ -123,11 +124,11 @@ public class TravelDetailsActivity extends BaseStatusActivity<TourismPresenter>
protected
void
initView
(
Bundle
savedInstanceState
,
TitleView
titleView
,
Intent
intent
)
{
showTitle
(
false
);
tvTitleCenter
.
setText
(
"旅游详情"
);
webUrl
=
TourismApi
.
TRAVEL_DETAILS
+
"?id="
+
id
;
webUrl
=
TourismApi
.
TRAVEL_DETAILS
+
"?id="
+
id
;
initWeb
();
initRxbus
();
if
(!
TextUtils
.
isEmpty
(
name
)
&&
!
TextUtils
.
isEmpty
(
url
))
{
initShare
(
webUrl
+
"&shareType=app"
,
name
,
""
,
url
);
initShare
(
webUrl
+
"&shareType=app"
,
name
,
""
,
url
);
}
mWebView
.
loadUrl
(
"JavaScript:getTourStock()"
);
// Android调用h5
...
...
@@ -143,6 +144,18 @@ public class TravelDetailsActivity extends BaseStatusActivity<TourismPresenter>
llItemBottom
.
setVisibility
(
View
.
GONE
);
}
});
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
M
)
{
mWebView
.
setOnScrollChangeListener
(
new
View
.
OnScrollChangeListener
()
{
@Override
public
void
onScrollChange
(
View
v
,
int
scrollX
,
int
scrollY
,
int
oldScrollX
,
int
oldScrollY
)
{
Log
.
d
(
"scroll"
,
"scrollX="
+
scrollX
);
Log
.
d
(
"scroll"
,
"scrollY="
+
scrollY
);
Log
.
d
(
"scroll"
,
"oldScrollX="
+
oldScrollX
);
Log
.
d
(
"scroll"
,
"oldScrollY="
+
oldScrollY
);
}
});
}
}
@OnClick
({
R2
.
id
.
iv_back
,
R2
.
id
.
tv_appointment
,
R2
.
id
.
iv_collect
,
R2
.
id
.
iv_share
,
R2
.
id
.
tv_customer_service
})
...
...
@@ -334,10 +347,9 @@ public class TravelDetailsActivity extends BaseStatusActivity<TourismPresenter>
mWebView
.
setWebChromeClient
(
new
WebChromeClient
()
{
@Override
public
void
onProgressChanged
(
WebView
view
,
int
newProgress
)
{
if
(
newProgress
==
100
)
{
if
(
newProgress
==
100
)
{
pbProgress
.
setVisibility
(
View
.
GONE
);
//加载完网页进度条消失
}
else
{
}
else
{
pbProgress
.
setVisibility
(
View
.
VISIBLE
);
//开始加载网页时显示进度条
pbProgress
.
setProgress
(
newProgress
);
//设置进度值
}
...
...
@@ -357,11 +369,11 @@ public class TravelDetailsActivity extends BaseStatusActivity<TourismPresenter>
if
(
snsPlatform
.
mShowWord
.
equals
(
"生成海报"
))
{
ARouter
.
getInstance
()
.
build
(
Constance
.
ACTIVITY_URL_SHAREIMAGE
)
.
withString
(
"icon"
,
url
)
.
withString
(
"name"
,
name
)
.
withString
(
"keyword"
,
content
)
.
withDouble
(
"price"
,
price
)
.
withString
(
"url"
,
webUrl
)
.
withString
(
"icon"
,
url
)
.
withString
(
"name"
,
name
)
.
withString
(
"keyword"
,
content
)
.
withDouble
(
"price"
,
price
)
.
withString
(
"url"
,
webUrl
)
.
navigation
();
}
else
if
(
snsPlatform
.
mShowWord
.
equals
(
"复制链接"
))
{
copyText
();
...
...
@@ -375,7 +387,7 @@ public class TravelDetailsActivity extends BaseStatusActivity<TourismPresenter>
if
(
platform
.
name
().
equals
(
"WEIXIN_FAVORITE"
))
{
showToast
(
" 收藏成功啦"
);
showToast
(
" 收藏成功啦"
);
}
else
{
if
(
platform
!=
SHARE_MEDIA
.
MORE
&&
platform
!=
SHARE_MEDIA
.
SMS
...
...
@@ -459,16 +471,25 @@ public class TravelDetailsActivity extends BaseStatusActivity<TourismPresenter>
beanOrderParam
=
new
Gson
().
fromJson
(
orderJson
,
new
TypeToken
<
BeanOrderParam
>()
{
}.
getType
());
if
(
Integer
.
valueOf
(
beanOrderParam
.
getAdultNum
())
<
Integer
.
valueOf
(
beanOrderParam
.
getChildNum
())){
if
(
Integer
.
valueOf
(
beanOrderParam
.
getAdultNum
())
<
Integer
.
valueOf
(
beanOrderParam
.
getChildNum
()))
{
showToast
(
"成人数要大于或等于儿童数"
);
}
else
if
(
Integer
.
valueOf
(
beanOrderParam
.
getAdultNum
())
==
0
)
{
}
else
if
(
Integer
.
valueOf
(
beanOrderParam
.
getAdultNum
())
==
0
)
{
showToast
(
"成人数不能为空!"
);
}
else
{
}
else
{
startActivity
(
TravelerConfirmOrderActivity
.
getIntent
(
mActivity
,
beanOrderParam
));
}
}
}
@JavascriptInterface
public
void
showTop
(
int
state
)
{
if
(
state
==
0
)
{
}
else
{
}
}
}
private
void
getTourDetail
()
{
...
...
@@ -576,7 +597,7 @@ public class TravelDetailsActivity extends BaseStatusActivity<TourismPresenter>
if
(
myClipboard
==
null
)
{
myClipboard
=
(
ClipboardManager
)
getSystemService
(
CLIPBOARD_SERVICE
);
}
ClipData
myClip
=
ClipData
.
newPlainText
(
"text"
,
webUrl
+
"&shareType=app"
);
ClipData
myClip
=
ClipData
.
newPlainText
(
"text"
,
webUrl
+
"&shareType=app"
);
myClipboard
.
setPrimaryClip
(
myClip
);
showToast
(
"复制成功!"
);
}
...
...
plugin_points/src/main/java/com/rv/points/Actions.java
View file @
f357428d
...
...
@@ -88,10 +88,10 @@ public class Actions {
* @param context
*/
public
void
bindwechat
(
Context
context
)
{
//
if (listener == null) {
//
listener = new RvUMAuthListener(context);
//
}
//
UMShareAPI.get(context).getPlatformInfo((Activity) context, SHARE_MEDIA.WEIXIN, listener);
if
(
listener
==
null
)
{
listener
=
new
RvUMAuthListener
(
context
);
}
UMShareAPI
.
get
(
context
).
getPlatformInfo
((
Activity
)
context
,
SHARE_MEDIA
.
WEIXIN
,
listener
);
}
/*****
...
...
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