mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
properly refresh thumbnails at changing column count
This commit is contained in:
parent
435a7693e5
commit
048acd9b03
4 changed files with 6 additions and 2 deletions
|
@ -259,11 +259,13 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
private fun increaseColumnCount() {
|
||||
config.dirColumnCnt = ++(directories_grid.layoutManager as GridLayoutManager).spanCount
|
||||
invalidateOptionsMenu()
|
||||
directories_grid.adapter.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
private fun reduceColumnCount() {
|
||||
config.dirColumnCnt = --(directories_grid.layoutManager as GridLayoutManager).spanCount
|
||||
invalidateOptionsMenu()
|
||||
directories_grid.adapter.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
private fun isPickImageIntent(intent: Intent) = isPickIntent(intent) && (hasImageContentData(intent) || isImageType(intent))
|
||||
|
|
|
@ -335,11 +335,13 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
private fun increaseColumnCount() {
|
||||
config.mediaColumnCnt = ++(media_grid.layoutManager as GridLayoutManager).spanCount
|
||||
invalidateOptionsMenu()
|
||||
media_grid.adapter.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
private fun reduceColumnCount() {
|
||||
config.mediaColumnCnt = --(media_grid.layoutManager as GridLayoutManager).spanCount
|
||||
invalidateOptionsMenu()
|
||||
media_grid.adapter.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
private fun isSetWallpaperIntent() = intent.getBooleanExtra(SET_WALLPAPER_INTENT, false)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/dir_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="1px">
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/media_item_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="1px">
|
||||
|
||||
|
|
Loading…
Reference in a new issue