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
9b84aab8
Commit
9b84aab8
authored
Jan 04, 2024
by
zhengnw@sobot.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widget 1.1.7 Fresco 加载本地图片
parent
45395773
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
6 deletions
+18
-6
build.gradle
sobot_common/build.gradle
+3
-3
sobot-common-publish-mavencentral.gradle
sobot_common/sobot-common-publish-mavencentral.gradle
+1
-1
sobot-picture-publish-mavencentral.gradle
sobot_pictureframe/sobot-picture-publish-mavencentral.gradle
+1
-1
SobotFrescoImageLoader.java
...n/java/com/sobot/pictureframe/SobotFrescoImageLoader.java
+13
-1
No files found.
sobot_common/build.gradle
View file @
9b84aab8
...
@@ -11,7 +11,7 @@ android {
...
@@ -11,7 +11,7 @@ android {
//这里就是打jar包
//这里就是打jar包
task
makeJar
(
type:
Copy
)
{
task
makeJar
(
type:
Copy
)
{
//删除旧的jar包
//删除旧的jar包
delete
'build/libs/sobot_common_1.5.
0
.jar'
delete
'build/libs/sobot_common_1.5.
1
.jar'
//原地址
//原地址
from
(
'build/intermediates/packaged-classes/release/'
)
from
(
'build/intermediates/packaged-classes/release/'
)
//导出jar包的地址
//导出jar包的地址
...
@@ -19,7 +19,7 @@ android {
...
@@ -19,7 +19,7 @@ android {
//包含的jar包
//包含的jar包
include
(
'classes.jar'
)
include
(
'classes.jar'
)
//重命名jar包为mysdk
//重命名jar包为mysdk
rename
(
'classes.jar'
,
'sobot_common_1.5.
0
.jar'
)
rename
(
'classes.jar'
,
'sobot_common_1.5.
1
.jar'
)
}
}
makeJar
.
dependsOn
(
build
)
makeJar
.
dependsOn
(
build
)
}
}
...
@@ -34,7 +34,7 @@ dependencies {
...
@@ -34,7 +34,7 @@ dependencies {
api
'com.sobot.library:utils:1.1.3'
api
'com.sobot.library:utils:1.1.3'
api
'com.sobot.library:picture_x:1.1.
5
'
api
'com.sobot.library:picture_x:1.1.
7
'
api
'com.sobot.library:net:1.2.2'
api
'com.sobot.library:net:1.2.2'
api
'com.sobot.library:gson:1.1.1'
api
'com.sobot.library:gson:1.1.1'
}
}
...
...
sobot_common/sobot-common-publish-mavencentral.gradle
View file @
9b84aab8
...
@@ -12,7 +12,7 @@ task androidSourcesJar(type: Jar) {
...
@@ -12,7 +12,7 @@ task androidSourcesJar(type: Jar) {
ext
{
ext
{
PUBLISH_GROUP_ID
=
"com.sobot.library"
//项目包名
PUBLISH_GROUP_ID
=
"com.sobot.library"
//项目包名
PUBLISH_ARTIFACT_ID
=
'sobotcommon_x'
//项目名
PUBLISH_ARTIFACT_ID
=
'sobotcommon_x'
//项目名
PUBLISH_VERSION
=
'1.5.
0
'
//版本号
PUBLISH_VERSION
=
'1.5.
1
'
//版本号
}
}
...
...
sobot_pictureframe/sobot-picture-publish-mavencentral.gradle
View file @
9b84aab8
...
@@ -12,7 +12,7 @@ task androidSourcesJar(type: Jar) {
...
@@ -12,7 +12,7 @@ task androidSourcesJar(type: Jar) {
ext
{
ext
{
PUBLISH_GROUP_ID
=
"com.sobot.library"
//项目包名
PUBLISH_GROUP_ID
=
"com.sobot.library"
//项目包名
PUBLISH_ARTIFACT_ID
=
'picture_x'
//项目名
PUBLISH_ARTIFACT_ID
=
'picture_x'
//项目名
PUBLISH_VERSION
=
'1.1.
6
'
//版本号
PUBLISH_VERSION
=
'1.1.
7
'
//版本号
}
}
...
...
sobot_pictureframe/src/main/java/com/sobot/pictureframe/SobotFrescoImageLoader.java
View file @
9b84aab8
...
@@ -21,6 +21,8 @@ import com.facebook.imagepipeline.request.ImageRequest;
...
@@ -21,6 +21,8 @@ import com.facebook.imagepipeline.request.ImageRequest;
import
com.facebook.imagepipeline.request.ImageRequestBuilder
;
import
com.facebook.imagepipeline.request.ImageRequestBuilder
;
import
com.sobot.chat.imageloader.SobotImageLoader
;
import
com.sobot.chat.imageloader.SobotImageLoader
;
import
java.io.File
;
public
class
SobotFrescoImageLoader
extends
SobotImageLoader
{
public
class
SobotFrescoImageLoader
extends
SobotImageLoader
{
@Override
@Override
public
void
displayImage
(
Context
context
,
final
ImageView
imageView
,
final
String
path
,
@DrawableRes
int
loadingResId
,
@DrawableRes
int
failResId
,
int
width
,
int
height
,
final
SobotDisplayImageListener
listener
)
{
public
void
displayImage
(
Context
context
,
final
ImageView
imageView
,
final
String
path
,
@DrawableRes
int
loadingResId
,
@DrawableRes
int
failResId
,
int
width
,
int
height
,
final
SobotDisplayImageListener
listener
)
{
...
@@ -30,7 +32,17 @@ public class SobotFrescoImageLoader extends SobotImageLoader {
...
@@ -30,7 +32,17 @@ public class SobotFrescoImageLoader extends SobotImageLoader {
if
(
imageView
==
null
)
{
if
(
imageView
==
null
)
{
return
;
return
;
}
}
ImageRequestBuilder
builder
=
ImageRequestBuilder
.
newBuilderWithSource
(
Uri
.
parse
(
path
));
ImageRequestBuilder
builder
;
if
(
path
.
startsWith
(
"http"
))
{
builder
=
ImageRequestBuilder
.
newBuilderWithSource
(
Uri
.
parse
(
path
));
}
else
{
File
file
=
new
File
(
path
);
if
(
file
!=
null
)
{
builder
=
ImageRequestBuilder
.
newBuilderWithSource
(
Uri
.
fromFile
(
file
));
}
else
{
builder
=
ImageRequestBuilder
.
newBuilderWithSource
(
Uri
.
parse
(
path
));
}
}
if
(
width
>
0
&&
height
>
0
)
{
if
(
width
>
0
&&
height
>
0
)
{
builder
.
setResizeOptions
(
new
ResizeOptions
(
width
,
height
));
builder
.
setResizeOptions
(
new
ResizeOptions
(
width
,
height
));
}
}
...
...
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