mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +00:00
Fade in on up navigation
This commit is contained in:
parent
a95387d147
commit
9fed3bc0a3
2 changed files with 13 additions and 0 deletions
|
@ -471,6 +471,13 @@ public class FragmentMessages extends FragmentBase {
|
||||||
do {
|
do {
|
||||||
Long key = adapter.getKeyAtPosition(pos);
|
Long key = adapter.getKeyAtPosition(pos);
|
||||||
if (key != null && isExpanded(key)) {
|
if (key != null && isExpanded(key)) {
|
||||||
|
int first = llm.findFirstVisibleItemPosition();
|
||||||
|
View child = rvMessage.getChildAt(pos - (first < 0 ? 0 : first));
|
||||||
|
if (child != null) {
|
||||||
|
Animation animation = AnimationUtils.loadAnimation(getContext(), R.anim.fade_in_fast);
|
||||||
|
child.startAnimation(animation);
|
||||||
|
}
|
||||||
|
|
||||||
rvMessage.scrollToPosition(pos);
|
rvMessage.scrollToPosition(pos);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
6
app/src/main/res/anim/fade_in_fast.xml
Normal file
6
app/src/main/res/anim/fade_in_fast.xml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:duration="@android:integer/config_shortAnimTime"
|
||||||
|
android:fromAlpha="0.0"
|
||||||
|
android:interpolator="@android:anim/decelerate_interpolator"
|
||||||
|
android:toAlpha="1.0" />
|
Loading…
Reference in a new issue