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
a9e41de1
Commit
a9e41de1
authored
Feb 20, 2018
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add function fadeIn and fadeOut (instead of having fadeInOrOut(...))
parent
e74569bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
+17
-6
Animation.kt
...ain/java/chat/rocket/android/util/extensions/Animation.kt
+17
-6
No files found.
app/src/main/java/chat/rocket/android/util/extensions/Animation.kt
View file @
a9e41de1
...
...
@@ -12,7 +12,7 @@ fun View.rotateBy(value: Float, duration: Long = 200) {
.
start
()
}
fun
View
.
fadeIn
OrOut
(
startValue
:
Float
,
finishValue
:
Float
,
duration
:
Long
=
200
)
{
fun
View
.
fadeIn
(
startValue
:
Float
,
finishValue
:
Float
,
duration
:
Long
=
200
)
{
animate
()
.
alpha
(
startValue
)
.
setDuration
(
duration
)
...
...
@@ -24,11 +24,22 @@ fun View.fadeInOrOut(startValue: Float, finishValue: Float, duration: Long = 200
.
setInterpolator
(
AccelerateInterpolator
()).
start
()
}).
start
()
if
(
startValue
>
finishValue
)
{
setVisible
(
false
)
}
else
{
setVisible
(
true
)
}
setVisible
(
true
)
}
fun
View
.
fadeOut
(
startValue
:
Float
,
finishValue
:
Float
,
duration
:
Long
=
200
)
{
animate
()
.
alpha
(
startValue
)
.
setDuration
(
duration
)
.
setInterpolator
(
DecelerateInterpolator
())
.
withEndAction
({
animate
()
.
alpha
(
finishValue
)
.
setDuration
(
duration
)
.
setInterpolator
(
AccelerateInterpolator
()).
start
()
}).
start
()
setVisible
(
false
)
}
fun
View
.
circularRevealOrUnreveal
(
centerX
:
Int
,
centerY
:
Int
,
startRadius
:
Float
,
endRadius
:
Float
,
duration
:
Long
=
600
)
{
...
...
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