add animations to listviews
This commit is contained in:
parent
fa41371209
commit
463c0ed719
4 changed files with 12 additions and 0 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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" />
|
||||
|
|
|
@ -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" />
|
||||
|
|
Loading…
Reference in a new issue