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
e589605a
Commit
e589605a
authored
Feb 28, 2018
by
Lucio Maciel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix input when coming back from members list
parent
22f85b83
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
42 deletions
+33
-42
ChatRoomFragment.kt
.../java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
+6
-3
Animation.kt
...ain/java/chat/rocket/android/util/extensions/Animation.kt
+27
-39
No files found.
app/src/main/java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
View file @
e589605a
...
@@ -345,6 +345,11 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardPopup.Listener {
...
@@ -345,6 +345,11 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardPopup.Listener {
text_room_is_read_only
.
setVisible
(
true
)
text_room_is_read_only
.
setVisible
(
true
)
input_container
.
setVisible
(
false
)
input_container
.
setVisible
(
false
)
}
else
{
}
else
{
button_send
.
alpha
=
0f
button_send
.
setVisible
(
false
)
button_show_attachment_options
.
alpha
=
1f
button_show_attachment_options
.
setVisible
(
true
)
subscribeTextMessage
()
subscribeTextMessage
()
emojiKeyboardPopup
=
EmojiKeyboardPopup
(
activity
!!
,
activity
!!
.
findViewById
(
R
.
id
.
fragment_container
))
emojiKeyboardPopup
=
EmojiKeyboardPopup
(
activity
!!
,
activity
!!
.
findViewById
(
R
.
id
.
fragment_container
))
emojiKeyboardPopup
.
listener
=
this
emojiKeyboardPopup
.
listener
=
this
...
@@ -442,9 +447,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardPopup.Listener {
...
@@ -442,9 +447,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardPopup.Listener {
}
}
private
fun
unsubscribeTextMessage
()
{
private
fun
unsubscribeTextMessage
()
{
if
(!
compositeDisposable
.
isDisposed
)
{
compositeDisposable
.
clear
()
compositeDisposable
.
dispose
()
}
}
}
private
fun
setupComposeMessageButtons
(
charSequence
:
CharSequence
)
{
private
fun
setupComposeMessageButtons
(
charSequence
:
CharSequence
)
{
...
...
app/src/main/java/chat/rocket/android/util/extensions/Animation.kt
View file @
e589605a
...
@@ -2,6 +2,7 @@ package chat.rocket.android.util.extensions
...
@@ -2,6 +2,7 @@ package chat.rocket.android.util.extensions
import
android.view.View
import
android.view.View
import
android.view.ViewAnimationUtils
import
android.view.ViewAnimationUtils
import
android.view.animation.AccelerateInterpolator
import
android.view.animation.DecelerateInterpolator
import
android.view.animation.DecelerateInterpolator
fun
View
.
rotateBy
(
value
:
Float
,
duration
:
Long
=
100
)
{
fun
View
.
rotateBy
(
value
:
Float
,
duration
:
Long
=
100
)
{
...
@@ -11,58 +12,45 @@ fun View.rotateBy(value: Float, duration: Long = 100) {
...
@@ -11,58 +12,45 @@ fun View.rotateBy(value: Float, duration: Long = 100) {
.
start
()
.
start
()
}
}
fun
View
.
fadeIn
(
start
:
Float
=
0f
,
end
:
Float
=
1f
,
duration
:
Long
=
200
)
{
fun
View
.
fadeIn
(
startValue
:
Float
=
0f
,
finishValue
:
Float
=
1f
,
duration
:
Long
=
200
)
{
// already at end alpha, just set visible and return
if
(
alpha
==
finishValue
)
{
if
(
alpha
==
end
)
{
setVisible
(
true
)
setVisible
(
true
)
return
return
}
}
val
animation
=
animate
()
animate
()
.
alpha
(
end
)
.
alpha
(
startValue
)
.
setDuration
(
duration
)
.
setDuration
(
duration
)
.
setInterpolator
(
DecelerateInterpolator
())
.
setInterpolator
(
DecelerateInterpolator
())
if
(
start
!=
alpha
)
{
.
withEndAction
(
{
animate
()
animate
()
.
alpha
(
start
)
.
alpha
(
finishValue
)
.
setDuration
(
duration
/
2
)
// half the time, so the entire animation runs on duration
.
setDuration
(
duration
)
.
setInterpolator
(
DecelerateInterpolator
())
.
setInterpolator
(
AccelerateInterpolator
()).
start
()
.
withEndAction
{
}).
start
()
animation
.
setDuration
(
duration
/
2
).
start
()
}.
start
()
}
else
{
animation
.
start
()
}
setVisible
(
true
)
setVisible
(
true
)
}
}
fun
View
.
fadeOut
(
start
:
Float
=
1f
,
end
:
Float
=
0f
,
duration
:
Long
=
200
)
{
fun
View
.
fadeOut
(
start
Value
:
Float
=
1f
,
finishValue
:
Float
=
0f
,
duration
:
Long
=
200
)
{
if
(
alpha
==
end
)
{
if
(
alpha
==
finishValue
)
{
setVisible
(
false
)
setVisible
(
false
)
return
return
}
}
val
animation
=
animate
()
animate
()
.
alpha
(
end
)
.
alpha
(
startValue
)
.
setDuration
(
duration
)
.
setDuration
(
duration
)
.
setInterpolator
(
DecelerateInterpolator
())
.
setInterpolator
(
DecelerateInterpolator
())
.
withEndAction
{
.
withEndAction
({
setVisible
(
false
)
}
if
(
start
!=
alpha
)
{
animate
()
animate
()
.
alpha
(
start
)
.
alpha
(
finishValue
)
.
setDuration
(
duration
/
2
)
// half the time, so the entire animation runs on duration
.
setDuration
(
duration
)
.
setInterpolator
(
DecelerateInterpolator
())
.
setInterpolator
(
AccelerateInterpolator
()).
start
()
.
withEndAction
{
}).
start
()
animation
.
setDuration
(
duration
/
2
).
start
()
}.
start
()
}
else
{
animation
.
start
()
}
}
setVisible
(
false
)
}
fun
View
.
circularRevealOrUnreveal
(
centerX
:
Int
,
centerY
:
Int
,
startRadius
:
Float
,
endRadius
:
Float
,
duration
:
Long
=
200
)
{
fun
View
.
circularRevealOrUnreveal
(
centerX
:
Int
,
centerY
:
Int
,
startRadius
:
Float
,
endRadius
:
Float
,
duration
:
Long
=
200
)
{
val
anim
=
ViewAnimationUtils
.
createCircularReveal
(
this
,
centerX
,
centerY
,
startRadius
,
endRadius
)
val
anim
=
ViewAnimationUtils
.
createCircularReveal
(
this
,
centerX
,
centerY
,
startRadius
,
endRadius
)
...
...
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