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
f387f5e0
Commit
f387f5e0
authored
Aug 08, 2019
by
linfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修复
parent
11c8560c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
+15
-3
ActivityImageBrowseInt.java
.../com/ruiwenliu/wrapper/browse/ActivityImageBrowseInt.java
+7
-1
ActivityImageBrowseUrl.java
.../com/ruiwenliu/wrapper/browse/ActivityImageBrowseUrl.java
+6
-1
DetailPatActivity.java
...main/java/com/xxfc/discovery/other/DetailPatActivity.java
+2
-1
No files found.
RvWrapper/src/main/java/com/ruiwenliu/wrapper/browse/ActivityImageBrowseInt.java
View file @
f387f5e0
...
...
@@ -36,6 +36,7 @@ import java.util.List;
public
class
ActivityImageBrowseInt
extends
BaseActivity
{
final
public
static
String
KEY_IMAGE
=
"image"
;
final
public
static
String
KEY_BACKGROUND
=
"background"
;
final
public
static
String
KEY_SELECTPOSITION
=
"select"
;
FrameLayout
root
;
ViewPager
viewPager
;
...
...
@@ -58,6 +59,9 @@ public class ActivityImageBrowseInt extends BaseActivity {
@Override
public
void
onData
()
{
fragmentImageBrowseList
=
new
ArrayList
<>();
int
select
=
getIntent
().
getIntExtra
(
ActivityImageBrowseInt
.
KEY_SELECTPOSITION
,
0
);
int
background
=
getIntent
().
getIntExtra
(
ActivityImageBrowseInt
.
KEY_BACKGROUND
,
0
);
if
(
background
!=
0
)
{
root
.
setBackgroundColor
(
ContextCompat
.
getColor
(
baseContext
,
background
));
...
...
@@ -87,7 +91,7 @@ public class ActivityImageBrowseInt extends BaseActivity {
}
});
viewPager
.
setCurrentItem
(
0
);
if
(
fragmentImageBrowseList
.
size
()
>=
2
)
{
recyclerView
.
setVisibility
(
View
.
VISIBLE
);
LinearLayoutManager
linearLayoutManager
=
new
LinearLayoutManager
(
baseContext
);
...
...
@@ -96,6 +100,8 @@ public class ActivityImageBrowseInt extends BaseActivity {
adapterRecyclerViewIndicator
=
new
AdapterRecyclerViewIndicator
();
recyclerView
.
setAdapter
(
adapterRecyclerViewIndicator
);
}
viewPager
.
setCurrentItem
(
select
);
}
@Override
...
...
RvWrapper/src/main/java/com/ruiwenliu/wrapper/browse/ActivityImageBrowseUrl.java
View file @
f387f5e0
...
...
@@ -37,6 +37,7 @@ import java.util.List;
public
class
ActivityImageBrowseUrl
extends
BaseActivity
{
final
public
static
String
KEY_IMAGE
=
"image"
;
final
public
static
String
KEY_BACKGROUND
=
"background"
;
final
public
static
String
KEY_SELECTPOSITION
=
"select"
;
FrameLayout
root
;
ViewPager
viewPager
;
...
...
@@ -60,6 +61,8 @@ public class ActivityImageBrowseUrl extends BaseActivity {
public
void
onData
()
{
fragmentImageBrowseList
=
new
ArrayList
<>();
int
select
=
getIntent
().
getIntExtra
(
ActivityImageBrowseInt
.
KEY_SELECTPOSITION
,
0
);
int
background
=
getIntent
().
getIntExtra
(
ActivityImageBrowseInt
.
KEY_BACKGROUND
,
0
);
if
(
background
!=
0
)
{
root
.
setBackgroundColor
(
ContextCompat
.
getColor
(
baseContext
,
background
));
...
...
@@ -89,7 +92,7 @@ public class ActivityImageBrowseUrl extends BaseActivity {
}
});
viewPager
.
setCurrentItem
(
0
);
if
(
fragmentImageBrowseList
.
size
()
>=
2
)
{
recyclerView
.
setVisibility
(
View
.
VISIBLE
);
LinearLayoutManager
linearLayoutManager
=
new
LinearLayoutManager
(
baseContext
);
...
...
@@ -98,6 +101,8 @@ public class ActivityImageBrowseUrl extends BaseActivity {
adapterRecyclerViewIndicator
=
new
AdapterRecyclerViewIndicator
();
recyclerView
.
setAdapter
(
adapterRecyclerViewIndicator
);
}
viewPager
.
setCurrentItem
(
select
);
}
@Override
...
...
module_discovery/src/main/java/com/xxfc/discovery/other/DetailPatActivity.java
View file @
f387f5e0
...
...
@@ -260,13 +260,14 @@ public class DetailPatActivity extends BaseStatusActivity<DiscoveryPresenter> {
}
@JavascriptInterface
public
void
showImage
(
String
imageJson
)
{
public
void
showImage
(
int
selectPosition
,
String
imageJson
)
{
if
(!
TextUtil
.
isEmpty
(
imageJson
))
{
List
<
String
>
imagesList
=
new
Gson
().
fromJson
(
imageJson
,
new
TypeToken
<
List
<
String
>>()
{
}.
getType
());
Bundle
bundle
=
new
Bundle
();
bundle
.
putInt
(
ActivityImageBrowseUrl
.
KEY_BACKGROUND
,
R
.
color
.
colorPrimary
);
bundle
.
putInt
(
ActivityImageBrowseUrl
.
KEY_SELECTPOSITION
,
selectPosition
);
bundle
.
putStringArrayList
(
ActivityImageBrowseUrl
.
KEY_IMAGE
,
(
ArrayList
<
String
>)
imagesList
);
IntentUtil
.
startActivity
(
mActivity
,
ActivityImageBrowseUrl
.
class
,
bundle
);
}
...
...
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