Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
Sobot_module_Dev
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
sobot_android
Sobot_module_Dev
Commits
4972db66
Commit
4972db66
authored
Jul 03, 2024
by
郭倩芳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
相册 预览
parent
a550d96c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
SobotMediaLoader.java
...album/src/main/java/com/sobot/album/SobotMediaLoader.java
+10
-1
PreviewView.java
...rc/main/java/com/sobot/album/app/preview/PreviewView.java
+7
-0
No files found.
sobot_album/src/main/java/com/sobot/album/SobotMediaLoader.java
View file @
4972db66
...
...
@@ -31,5 +31,13 @@ public class SobotMediaLoader implements AlbumLoader {
SobotBitmapUtil
.
display
(
imageView
.
getContext
(),
uri
,
imageView
);
}
}
public
static
void
loadImg
(
ImageView
imageView
,
AlbumFile
albumFile
)
{
if
(
albumFile
!=
null
)
{
if
(
albumFile
.
getUri
()
!=
null
)
{
SobotBitmapUtil
.
display
(
imageView
.
getContext
(),
albumFile
.
getUri
()
,
imageView
);
}
else
{
SobotBitmapUtil
.
display
(
imageView
.
getContext
(),
albumFile
.
getPath
(),
imageView
);
}
}
}
}
\ No newline at end of file
sobot_album/src/main/java/com/sobot/album/app/preview/PreviewView.java
View file @
4972db66
...
...
@@ -17,6 +17,7 @@ package com.sobot.album.app.preview;
import
android.app.Activity
;
import
android.net.Uri
;
import
android.os.Handler
;
import
android.text.SpannableStringBuilder
;
import
android.text.Spanned
;
import
android.text.style.ForegroundColorSpan
;
...
...
@@ -124,8 +125,14 @@ public class PreviewView<Data> extends Contract.GalleryView<Data> implements Vie
@Override
public
void
setCurrentItem
(
int
position
)
{
new
Handler
().
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
mViewPager
.
setCurrentItem
(
position
);
}
});
}
@Override
public
void
setDurationDisplay
(
boolean
display
)
{
...
...
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