Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
AloqaIM-Android
Commits
10a85320
Commit
10a85320
authored
Jul 19, 2017
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Fresco version (fix breaking changes, add additional features and fresco's log settings).
parent
1a6b375c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
6 deletions
+18
-6
build.gradle
rocket-chat-android-widgets/build.gradle
+1
-1
RocketChatWidgets.java
...in/java/chat/rocket/android/widget/RocketChatWidgets.java
+15
-3
ColorImage.java
...in/java/chat/rocket/android/widget/fresco/ColorImage.java
+1
-1
SvgDecoder.java
...in/java/chat/rocket/android/widget/fresco/SvgDecoder.java
+1
-1
No files found.
rocket-chat-android-widgets/build.gradle
View file @
10a85320
...
...
@@ -33,7 +33,7 @@ android {
}
ext
{
frescoVersion
=
'1.
3
.0'
frescoVersion
=
'1.
4
.0'
rxbindingVersion
=
'2.0.0'
}
...
...
rocket-chat-android-widgets/src/main/java/chat/rocket/android/widget/RocketChatWidgets.java
View file @
10a85320
...
...
@@ -2,24 +2,36 @@ package chat.rocket.android.widget;
import
android.content.Context
;
import
chat.rocket.android.widget.fresco.CustomImageFormatConfigurator
;
import
com.facebook.common.logging.FLog
;
import
com.facebook.drawee.backends.pipeline.DraweeConfig
;
import
com.facebook.drawee.backends.pipeline.Fresco
;
import
com.facebook.imagepipeline.backends.okhttp3.OkHttpImagePipelineConfigFactory
;
import
com.facebook.imagepipeline.core.ImagePipelineConfig
;
import
com.facebook.imagepipeline.listener.RequestListener
;
import
com.facebook.imagepipeline.listener.RequestLoggingListener
;
import
java.util.HashSet
;
import
java.util.Set
;
import
okhttp3.OkHttpClient
;
public
class
RocketChatWidgets
{
public
static
void
initialize
(
Context
context
,
OkHttpClient
okHttpClient
)
{
ImagePipelineConfig
config
=
OkHttpImagePipelineConfigFactory
FLog
.
setMinimumLoggingLevel
(
FLog
.
VERBOSE
);
Set
<
RequestListener
>
listeners
=
new
HashSet
<>();
listeners
.
add
(
new
RequestLoggingListener
());
ImagePipelineConfig
imagePipelineConfig
=
OkHttpImagePipelineConfigFactory
.
newBuilder
(
context
,
okHttpClient
)
.
set
DownsampleEnabled
(
true
)
.
set
RequestListeners
(
listeners
)
.
setImageDecoderConfig
(
CustomImageFormatConfigurator
.
createImageDecoderConfig
())
.
setDownsampleEnabled
(
true
)
.
experiment
().
setBitmapPrepareToDraw
(
true
)
.
experiment
().
setPartialImageCachingEnabled
(
true
)
.
build
();
DraweeConfig
.
Builder
draweeConfigBuilder
=
DraweeConfig
.
newBuilder
();
CustomImageFormatConfigurator
.
addCustomDrawableFactories
(
draweeConfigBuilder
);
Fresco
.
initialize
(
context
,
c
onfig
,
draweeConfigBuilder
.
build
());
Fresco
.
initialize
(
context
,
imagePipelineC
onfig
,
draweeConfigBuilder
.
build
());
}
}
\ No newline at end of file
rocket-chat-android-widgets/src/main/java/chat/rocket/android/widget/fresco/ColorImage.java
View file @
10a85320
...
...
@@ -5,7 +5,7 @@ import android.graphics.drawable.Drawable;
import
android.support.annotation.ColorInt
;
import
android.support.v4.graphics.ColorUtils
;
import
com.facebook.common.internal.ByteStreams
;
import
com.facebook.
drawee.backends.pipelin
e.DrawableFactory
;
import
com.facebook.
imagepipeline.drawabl
e.DrawableFactory
;
import
com.facebook.imageformat.ImageFormat
;
import
com.facebook.imageformat.ImageFormatCheckerUtils
;
import
com.facebook.imagepipeline.common.ImageDecodeOptions
;
...
...
rocket-chat-android-widgets/src/main/java/chat/rocket/android/widget/fresco/SvgDecoder.java
View file @
10a85320
...
...
@@ -5,7 +5,7 @@ import android.graphics.drawable.Drawable;
import
android.graphics.drawable.PictureDrawable
;
import
com.caverock.androidsvg.SVG
;
import
com.caverock.androidsvg.SVGParseException
;
import
com.facebook.
drawee.backends.pipelin
e.DrawableFactory
;
import
com.facebook.
imagepipeline.drawabl
e.DrawableFactory
;
import
com.facebook.imageformat.ImageFormat
;
import
com.facebook.imageformat.ImageFormatCheckerUtils
;
import
com.facebook.imagepipeline.common.ImageDecodeOptions
;
...
...
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