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