adding some animations at lists appearing

This commit is contained in:
tibbi
2021-11-18 21:22:52 +01:00
parent d41b6bbe97
commit 8530bad54f
5 changed files with 14 additions and 0 deletions

View File

@ -108,6 +108,10 @@ class ContactsFragment(context: Context, attributeSet: AttributeSet) : MyViewPag
}.apply {
fragment_list.adapter = this
}
if (context.areSystemAnimationsEnabled) {
fragment_list.scheduleLayoutAnimation()
}
} else {
(currAdapter as ContactsAdapter).updateItems(contacts)
}

View File

@ -85,6 +85,10 @@ class FavoritesFragment(context: Context, attributeSet: AttributeSet) : MyViewPa
}.apply {
fragment_list.adapter = this
}
if (context.areSystemAnimationsEnabled) {
fragment_list.scheduleLayoutAnimation()
}
} else {
(currAdapter as ContactsAdapter).updateItems(contacts)
}

View File

@ -102,6 +102,10 @@ class RecentsFragment(context: Context, attributeSet: AttributeSet) : MyViewPage
}.apply {
recents_list.adapter = this
}
if (context.areSystemAnimationsEnabled) {
recents_list.scheduleLayoutAnimation()
}
} else {
(currAdapter as RecentCallsAdapter).updateItems(recents)
}

View File

@ -40,6 +40,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:layoutAnimation="@anim/layout_animation"
android:scrollbars="none"
app:layoutManager="com.simplemobiletools.commons.views.MyLinearLayoutManager" />

View File

@ -38,6 +38,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:layoutAnimation="@anim/layout_animation"
android:scrollbars="none"
app:layoutManager="com.simplemobiletools.commons.views.MyLinearLayoutManager" />