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
26302a31
Commit
26302a31
authored
Jan 27, 2017
by
Tiago Cunha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"revert"
parent
8b343180
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
27 deletions
+16
-27
RocketChatWidgets.java
...in/java/chat/rocket/android/widget/RocketChatWidgets.java
+16
-2
FrescoConfiguration.java
...hat/rocket/android/widget/fresco/FrescoConfiguration.java
+0
-25
No files found.
rocket-chat-android-widgets/src/main/java/chat/rocket/android/widget/RocketChatWidgets.java
View file @
26302a31
...
...
@@ -2,12 +2,26 @@ package chat.rocket.android.widget;
import
android.content.Context
;
import
chat.rocket.android.widget.fresco.FrescoConfiguration
;
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
chat.rocket.android.widget.fresco.ImageFormatConfigurator
;
import
okhttp3.OkHttpClient
;
public
class
RocketChatWidgets
{
public
static
void
initialize
(
Context
context
,
OkHttpClient
okHttpClient
)
{
FrescoConfiguration
.
initialize
(
context
,
okHttpClient
);
ImagePipelineConfig
config
=
OkHttpImagePipelineConfigFactory
.
newBuilder
(
context
,
okHttpClient
)
.
setDownsampleEnabled
(
true
)
.
setImageDecoderConfig
(
ImageFormatConfigurator
.
createImageDecoderConfig
())
.
build
();
DraweeConfig
.
Builder
draweeConfigBuilder
=
DraweeConfig
.
newBuilder
();
ImageFormatConfigurator
.
addCustomDrawableFactories
(
draweeConfigBuilder
);
Fresco
.
initialize
(
context
,
config
,
draweeConfigBuilder
.
build
());
}
}
rocket-chat-android-widgets/src/main/java/chat/rocket/android/widget/fresco/FrescoConfiguration.java
deleted
100644 → 0
View file @
8b343180
package
chat
.
rocket
.
android
.
widget
.
fresco
;
import
android.content.Context
;
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
okhttp3.OkHttpClient
;
public
class
FrescoConfiguration
{
public
static
void
initialize
(
Context
context
,
OkHttpClient
okHttpClient
)
{
ImagePipelineConfig
config
=
OkHttpImagePipelineConfigFactory
.
newBuilder
(
context
,
okHttpClient
)
.
setDownsampleEnabled
(
true
)
.
setImageDecoderConfig
(
ImageFormatConfigurator
.
createImageDecoderConfig
())
.
build
();
DraweeConfig
.
Builder
draweeConfigBuilder
=
DraweeConfig
.
newBuilder
();
ImageFormatConfigurator
.
addCustomDrawableFactories
(
draweeConfigBuilder
);
Fresco
.
initialize
(
context
,
config
,
draweeConfigBuilder
.
build
());
}
}
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