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
ea41faf1
Commit
ea41faf1
authored
Oct 03, 2017
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update FrescoHelper.kt
parent
0bd93ca7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
FrescoHelper.kt
...in/java/chat/rocket/android/widget/helper/FrescoHelper.kt
+4
-0
No files found.
rocket-chat-android-widgets/src/main/java/chat/rocket/android/widget/helper/FrescoHelper.kt
View file @
ea41faf1
...
@@ -6,7 +6,9 @@ import android.support.graphics.drawable.VectorDrawableCompat
...
@@ -6,7 +6,9 @@ import android.support.graphics.drawable.VectorDrawableCompat
import
chat.rocket.android.widget.R
import
chat.rocket.android.widget.R
import
com.facebook.drawee.backends.pipeline.Fresco
import
com.facebook.drawee.backends.pipeline.Fresco
import
com.facebook.drawee.drawable.ProgressBarDrawable
import
com.facebook.drawee.drawable.ProgressBarDrawable
import
com.facebook.drawee.drawable.ScalingUtils
import
com.facebook.drawee.generic.GenericDraweeHierarchy
import
com.facebook.drawee.generic.GenericDraweeHierarchy
import
com.facebook.drawee.generic.RoundingParams
import
com.facebook.drawee.view.SimpleDraweeView
import
com.facebook.drawee.view.SimpleDraweeView
object
FrescoHelper
{
object
FrescoHelper
{
...
@@ -31,6 +33,8 @@ object FrescoHelper {
...
@@ -31,6 +33,8 @@ object FrescoHelper {
val
hierarchy
:
GenericDraweeHierarchy
=
draweeView
.
hierarchy
val
hierarchy
:
GenericDraweeHierarchy
=
draweeView
.
hierarchy
hierarchy
.
setPlaceholderImage
(
VectorDrawableCompat
.
create
(
draweeView
.
resources
,
R
.
drawable
.
image_dummy
,
null
))
hierarchy
.
setPlaceholderImage
(
VectorDrawableCompat
.
create
(
draweeView
.
resources
,
R
.
drawable
.
image_dummy
,
null
))
hierarchy
.
setFailureImage
(
VectorDrawableCompat
.
create
(
draweeView
.
resources
,
R
.
drawable
.
image_error
,
null
))
hierarchy
.
setFailureImage
(
VectorDrawableCompat
.
create
(
draweeView
.
resources
,
R
.
drawable
.
image_error
,
null
))
hierarchy
.
roundingParams
=
RoundingParams
().
setCornersRadii
(
5F
,
5F
,
5F
,
5F
)
hierarchy
.
actualImageScaleType
=
ScalingUtils
.
ScaleType
.
FIT_XY
hierarchy
.
setProgressBarImage
(
ProgressBarDrawable
())
hierarchy
.
setProgressBarImage
(
ProgressBarDrawable
())
val
controller
=
Fresco
.
newDraweeControllerBuilder
()
val
controller
=
Fresco
.
newDraweeControllerBuilder
()
...
...
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