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
e525a0e9
Commit
e525a0e9
authored
Aug 01, 2019
by
jianglx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改推广有礼分享出去的接口,修改banner的跳转方法
parent
1998a035
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
15 deletions
+60
-15
HomeFragment.java
...java/com/rv/home/rv/module/ui/main/home/HomeFragment.java
+8
-15
HomePresenter.java
.../home/rv/module/ui/main/home/presenter/HomePresenter.java
+52
-0
icon_share.jpg
plugin_share/src/main/res/drawable-xhdpi/icon_share.jpg
+0
-0
icon_share.png
plugin_share/src/main/res/drawable-xhdpi/icon_share.png
+0
-0
No files found.
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/HomeFragment.java
View file @
e525a0e9
...
@@ -70,6 +70,7 @@ import com.rv.home.rv.module.ui.main.home.bean.ListsBean;
...
@@ -70,6 +70,7 @@ import com.rv.home.rv.module.ui.main.home.bean.ListsBean;
import
com.rv.home.rv.module.ui.main.home.bean.OrderDataBean
;
import
com.rv.home.rv.module.ui.main.home.bean.OrderDataBean
;
import
com.rv.home.rv.module.ui.main.home.bean.SelectedActivitiesBean
;
import
com.rv.home.rv.module.ui.main.home.bean.SelectedActivitiesBean
;
import
com.rv.home.rv.module.ui.main.home.bean.ShopListBean
;
import
com.rv.home.rv.module.ui.main.home.bean.ShopListBean
;
import
com.rv.home.rv.module.ui.main.home.presenter.HomePresenter
;
import
com.yuyife.banner.Banner
;
import
com.yuyife.banner.Banner
;
import
com.yuyife.banner.BannerConfig
;
import
com.yuyife.banner.BannerConfig
;
import
com.yuyife.banner.listener.OnBannerListener
;
import
com.yuyife.banner.listener.OnBannerListener
;
...
@@ -91,7 +92,7 @@ import io.reactivex.functions.Consumer;
...
@@ -91,7 +92,7 @@ import io.reactivex.functions.Consumer;
/**
/**
* 首页
* 首页
*/
*/
public
class
HomeFragment
extends
BaseFragment
<
Common
Presenter
>
implements
ObservableScrollView
.
ScrollViewListener
,
SimpleRefreshLayout
.
OnSimpleRefreshListener
{
public
class
HomeFragment
extends
BaseFragment
<
Home
Presenter
>
implements
ObservableScrollView
.
ScrollViewListener
,
SimpleRefreshLayout
.
OnSimpleRefreshListener
{
Unbinder
unbinder
;
Unbinder
unbinder
;
@BindView
(
R2
.
id
.
ll_layout_renting_a_car
)
@BindView
(
R2
.
id
.
ll_layout_renting_a_car
)
LinearLayout
llLayoutRentingACar
;
LinearLayout
llLayoutRentingACar
;
...
@@ -305,12 +306,7 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
...
@@ -305,12 +306,7 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
SelectedActivitiesBean
.
SelectedActivityItem
item
=
(
SelectedActivitiesBean
.
SelectedActivityItem
)
adapter
.
getItem
(
position
);
SelectedActivitiesBean
.
SelectedActivityItem
item
=
(
SelectedActivitiesBean
.
SelectedActivityItem
)
adapter
.
getItem
(
position
);
if
(
item
!=
null
&&
!
TextUtils
.
isEmpty
(
item
.
getUrl
())
&&
!
TextUtils
.
isEmpty
(
item
.
getName
()))
{
if
(
item
!=
null
&&
!
TextUtils
.
isEmpty
(
item
.
getUrl
())
&&
!
TextUtils
.
isEmpty
(
item
.
getName
()))
{
ComponentName
componentName
=
new
ComponentName
(
getActivity
(),
"com.rv.share.WebViewActivity"
);
mPresenter
.
toTarget
(
getActivity
(),
item
.
getUrl
(),
item
.
getName
());
Intent
intent
=
new
Intent
();
intent
.
setComponent
(
componentName
);
intent
.
putExtra
(
"url"
,
item
.
getUrl
());
intent
.
putExtra
(
"title"
,
item
.
getName
());
startActivity
(
intent
);
}
}
}
}
});
});
...
@@ -922,12 +918,9 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
...
@@ -922,12 +918,9 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
if
(
listsBanners
.
size
()
>
0
)
{
if
(
listsBanners
.
size
()
>
0
)
{
BeanHomeBanner
.
DataBean
bean
=
listsBanners
.
get
(
position
);
BeanHomeBanner
.
DataBean
bean
=
listsBanners
.
get
(
position
);
ComponentName
componentName
=
new
ComponentName
(
getActivity
(),
"com.rv.share.WebViewActivity"
);
if
(
bean
!=
null
&&
!
TextUtils
.
isEmpty
(
bean
.
getUrl
()))
{
Intent
intent
=
new
Intent
();
mPresenter
.
toTarget
(
getActivity
(),
bean
.
getUrl
(),
bean
.
getTitle
());
intent
.
setComponent
(
componentName
);
}
intent
.
putExtra
(
"url"
,
bean
.
getUrl
());
intent
.
putExtra
(
"title"
,
bean
.
getTitle
());
startActivity
(
intent
);
}
}
/* if (localImages != null && localImages.size() > 0) {
/* if (localImages != null && localImages.size() > 0) {
...
@@ -969,8 +962,8 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
...
@@ -969,8 +962,8 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
}
}
}
else
{
}
else
{
headTvGetShop
.
setText
(
""
);
headTvGetShop
.
setText
(
""
);
la
tLatitude
=
0
;
ge
tLatitude
=
0
;
lon
Longitude
=
0
;
get
Longitude
=
0
;
headTvOutShop
.
setText
(
""
);
headTvOutShop
.
setText
(
""
);
outLatitude
=
0
;
outLatitude
=
0
;
outLongitude
=
0
;
outLongitude
=
0
;
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/presenter/HomePresenter.java
0 → 100644
View file @
e525a0e9
package
com
.
rv
.
home
.
rv
.
module
.
ui
.
main
.
home
.
presenter
;
import
android.content.ComponentName
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.text.TextUtils
;
import
com.rv.home.rv.module.basic.presenter.CommonPresenter
;
public
class
HomePresenter
extends
CommonPresenter
{
/******
* 打开目标页面
* @param context
* @param url
* @param title
*/
public
void
toTarget
(
Context
context
,
String
url
,
String
title
)
{
if
(
url
.
startsWith
(
"http"
))
{
ComponentName
componentName
=
new
ComponentName
(
context
,
"com.rv.share.WebViewActivity"
);
Intent
intent
=
new
Intent
();
intent
.
setComponent
(
componentName
);
intent
.
putExtra
(
"url"
,
url
);
intent
.
putExtra
(
"title"
,
title
);
context
.
startActivity
(
intent
);
}
else
if
(
url
.
startsWith
(
"app:"
))
{
String
target
=
null
;
String
[]
params
=
null
;
if
(
url
.
contains
(
"?"
))
{
target
=
url
.
substring
(
url
.
indexOf
(
":"
)
+
1
,
url
.
indexOf
(
"?"
));
String
paramsString
=
url
.
substring
(
url
.
indexOf
(
"?"
)
+
1
);
params
=
paramsString
.
split
(
"&"
);
}
else
{
target
=
url
.
substring
(
url
.
indexOf
(
":"
)
+
1
);
}
if
(!
TextUtils
.
isEmpty
(
target
))
{
ComponentName
componentName
=
new
ComponentName
(
context
,
target
);
Intent
intent
=
new
Intent
();
intent
.
setComponent
(
componentName
);
if
(
params
!=
null
&&
params
.
length
>
0
)
{
for
(
String
param
:
params
)
{
String
[]
values
=
param
.
split
(
"="
);
if
(
values
.
length
==
2
)
{
intent
.
putExtra
(
values
[
0
],
values
[
1
]);
}
}
}
context
.
startActivity
(
intent
);
}
}
}
}
plugin_share/src/main/res/drawable-xhdpi/icon_share.jpg
deleted
100644 → 0
View file @
1998a035
49.1 KB
plugin_share/src/main/res/drawable-xhdpi/icon_share.png
0 → 100644
View file @
e525a0e9
18.3 KB
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