mirror of
https://github.com/nextcloud/talk-android
synced 2025-01-18 21:18:15 +00:00
add animation to "unread mentions" button + change design
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
9f5fa4aac2
commit
8d0c94834a
@ -33,6 +33,7 @@ import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import android.view.animation.AnimationUtils
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.Toast
|
||||
@ -1071,6 +1072,8 @@ class ConversationsListActivity :
|
||||
nextUnreadConversationScrollPosition = position
|
||||
if (!binding.newMentionPopupBubble.isShown) {
|
||||
binding.newMentionPopupBubble.visibility = View.VISIBLE
|
||||
val popupAnimation = AnimationUtils.loadAnimation(this, R.anim.popup_animation)
|
||||
binding.newMentionPopupBubble.startAnimation(popupAnimation)
|
||||
}
|
||||
return@subscribe
|
||||
}
|
||||
|
21
app/src/main/res/anim/popup_animation.xml
Normal file
21
app/src/main/res/anim/popup_animation.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Nextcloud Talk - Android Client
|
||||
~
|
||||
~ SPDX-FileCopyrightText: 2025 Marcel Hibbe <dev@mhibbe.de>
|
||||
~ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:interpolator="@android:anim/accelerate_decelerate_interpolator">
|
||||
<scale
|
||||
android:duration="300"
|
||||
android:fromXScale="0.7"
|
||||
android:fromYScale="0.7"
|
||||
android:pivotX="50%"
|
||||
android:pivotY="50%"
|
||||
android:toXScale="1.0"
|
||||
android:toYScale="1.0" />
|
||||
<alpha
|
||||
android:duration="300"
|
||||
android:fromAlpha="0.0"
|
||||
android:toAlpha="1.0" />
|
||||
</set>
|
@ -253,9 +253,8 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/newMentionPopupBubble"
|
||||
android:theme="@style/Button.Primary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="bottom|center"
|
||||
android:layout_marginStart="88dp"
|
||||
android:layout_marginTop="16dp"
|
||||
@ -266,6 +265,7 @@
|
||||
app:background="@color/colorPrimary"
|
||||
app:cornerRadius="@dimen/button_corner_radius"
|
||||
app:icon="@drawable/ic_baseline_arrow_downward_24px"
|
||||
app:iconPadding="@dimen/standard_padding"
|
||||
style="@style/Widget.AppTheme.Button.ElevatedButton"/>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
Loading…
Reference in New Issue
Block a user