forked from GitHub-Mirror/riotX-android
faster animation for quick reply
This commit is contained in:
parent
64bee91f7a
commit
5438207fba
@ -269,10 +269,9 @@ class RoomDetailFragment :
|
|||||||
?: "", event.senderName, composerLayout.composerRelatedMessageAvatar)
|
?: "", event.senderName, composerLayout.composerRelatedMessageAvatar)
|
||||||
|
|
||||||
composerLayout.composerEditText.setSelection(composerLayout.composerEditText.text.length)
|
composerLayout.composerEditText.setSelection(composerLayout.composerEditText.text.length)
|
||||||
composerLayout.expand {
|
composerLayout.expand()
|
||||||
focusComposerAndShowKeyboard()
|
focusComposerAndShowKeyboard()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
|
@ -57,6 +57,7 @@ class TextComposerView @JvmOverloads constructor(context: Context, attrs: Attrib
|
|||||||
|
|
||||||
var currentConstraintSetId: Int = -1
|
var currentConstraintSetId: Int = -1
|
||||||
|
|
||||||
|
private val animationDuration = 100L
|
||||||
|
|
||||||
init {
|
init {
|
||||||
inflate(context, R.layout.merge_composer_layout, this)
|
inflate(context, R.layout.merge_composer_layout, this)
|
||||||
@ -73,7 +74,7 @@ class TextComposerView @JvmOverloads constructor(context: Context, attrs: Attrib
|
|||||||
currentConstraintSetId = R.layout.constraint_set_composer_layout_compact
|
currentConstraintSetId = R.layout.constraint_set_composer_layout_compact
|
||||||
if (animate) {
|
if (animate) {
|
||||||
val transition = AutoTransition()
|
val transition = AutoTransition()
|
||||||
// transition.duration = 5000
|
transition.duration = animationDuration
|
||||||
transition.addListener(object : Transition.TransitionListener {
|
transition.addListener(object : Transition.TransitionListener {
|
||||||
|
|
||||||
override fun onTransitionEnd(transition: Transition) {
|
override fun onTransitionEnd(transition: Transition) {
|
||||||
@ -105,7 +106,7 @@ class TextComposerView @JvmOverloads constructor(context: Context, attrs: Attrib
|
|||||||
currentConstraintSetId = R.layout.constraint_set_composer_layout_expanded
|
currentConstraintSetId = R.layout.constraint_set_composer_layout_expanded
|
||||||
if (animate) {
|
if (animate) {
|
||||||
val transition = AutoTransition()
|
val transition = AutoTransition()
|
||||||
// transition.duration = 5000
|
transition.duration = animationDuration
|
||||||
transition.addListener(object : Transition.TransitionListener {
|
transition.addListener(object : Transition.TransitionListener {
|
||||||
|
|
||||||
override fun onTransitionEnd(transition: Transition) {
|
override fun onTransitionEnd(transition: Transition) {
|
||||||
|
Loading…
Reference in New Issue
Block a user