add animation to "unread mentions" button + change design

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2025-01-08 17:20:40 +01:00
parent 9f5fa4aac2
commit 8d0c94834a
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B
3 changed files with 26 additions and 2 deletions

View File

@ -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
}

View 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>

View File

@ -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>