add animations to listviews

This commit is contained in:
tibbi 2021-03-07 22:59:57 +01:00
parent fa41371209
commit 463c0ed719
4 changed files with 12 additions and 0 deletions

View File

@ -1206,6 +1206,10 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
runOnUiThread {
directories_grid.adapter = this
setupScrollDirection()
if (config.viewTypeFolders == VIEW_TYPE_LIST) {
directories_grid.scheduleLayoutAnimation()
}
}
}
measureRecyclerViewContent(dirsToShow)

View File

@ -420,6 +420,12 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
setupZoomListener(mZoomListener)
media_grid.adapter = this
}
val viewType = config.getFolderViewType(if (mShowAll) SHOW_ALL else mPath)
if (viewType == VIEW_TYPE_LIST) {
media_grid.scheduleLayoutAnimation()
}
setupLayoutManager()
handleGridSpacing()
measureRecyclerViewContent(mMedia)

View File

@ -52,6 +52,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/directories_switch_searching"
android:layoutAnimation="@anim/layout_animation"
android:scrollbars="none"
app:layoutManager="com.simplemobiletools.commons.views.MyGridLayoutManager"
app:spanCount="@integer/directory_columns_vertical_scroll" />

View File

@ -40,6 +40,7 @@
android:id="@+id/media_grid"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layoutAnimation="@anim/layout_animation"
android:scrollbars="none"
app:layoutManager="com.simplemobiletools.commons.views.MyGridLayoutManager"
app:spanCount="@integer/media_columns_vertical_scroll" />