mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
update some counts of default columns
This commit is contained in:
parent
1402de7a3d
commit
a2e9c53d8e
8 changed files with 18 additions and 12 deletions
|
@ -161,7 +161,7 @@ class Config(context: Context) : BaseConfig(context) {
|
||||||
set(showMedia) = prefs.edit().putInt(SHOW_MEDIA, showMedia).apply()
|
set(showMedia) = prefs.edit().putInt(SHOW_MEDIA, showMedia).apply()
|
||||||
|
|
||||||
var dirColumnCnt: Int
|
var dirColumnCnt: Int
|
||||||
get() = prefs.getInt(getDirectoryColumnsField(), context.resources.getInteger(R.integer.directory_columns))
|
get() = prefs.getInt(getDirectoryColumnsField(), context.resources.getInteger(R.integer.directory_columns_vertical_scroll))
|
||||||
set(dirColumnCnt) = prefs.edit().putInt(getDirectoryColumnsField(), dirColumnCnt).apply()
|
set(dirColumnCnt) = prefs.edit().putInt(getDirectoryColumnsField(), dirColumnCnt).apply()
|
||||||
|
|
||||||
private fun getDirectoryColumnsField(): String {
|
private fun getDirectoryColumnsField(): String {
|
||||||
|
@ -170,7 +170,7 @@ class Config(context: Context) : BaseConfig(context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var mediaColumnCnt: Int
|
var mediaColumnCnt: Int
|
||||||
get() = prefs.getInt(getMediaColumnsField(), context.resources.getInteger(R.integer.media_columns))
|
get() = prefs.getInt(getMediaColumnsField(), context.resources.getInteger(R.integer.media_columns_vertical_scroll))
|
||||||
set(mediaColumnCnt) = prefs.edit().putInt(getMediaColumnsField(), mediaColumnCnt).apply()
|
set(mediaColumnCnt) = prefs.edit().putInt(getMediaColumnsField(), mediaColumnCnt).apply()
|
||||||
|
|
||||||
private fun getMediaColumnsField(): String {
|
private fun getMediaColumnsField(): String {
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:scrollbars="none"
|
android:scrollbars="none"
|
||||||
app:layoutManager="android.support.v7.widget.GridLayoutManager"
|
app:layoutManager="android.support.v7.widget.GridLayoutManager"
|
||||||
app:spanCount="@integer/directory_columns"/>
|
app:spanCount="@integer/directory_columns_vertical_scroll"/>
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.FastScroller
|
<com.simplemobiletools.commons.views.FastScroller
|
||||||
android:id="@+id/directories_fastscroller"
|
android:id="@+id/directories_fastscroller"
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:scrollbars="none"
|
android:scrollbars="none"
|
||||||
app:layoutManager="android.support.v7.widget.GridLayoutManager"
|
app:layoutManager="android.support.v7.widget.GridLayoutManager"
|
||||||
app:spanCount="@integer/media_columns"/>
|
app:spanCount="@integer/media_columns_vertical_scroll"/>
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.FastScroller
|
<com.simplemobiletools.commons.views.FastScroller
|
||||||
android:id="@+id/media_fastscroller"
|
android:id="@+id/media_fastscroller"
|
||||||
|
|
|
@ -7,4 +7,4 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingTop="@dimen/activity_margin"
|
android:paddingTop="@dimen/activity_margin"
|
||||||
app:layoutManager="android.support.v7.widget.GridLayoutManager"
|
app:layoutManager="android.support.v7.widget.GridLayoutManager"
|
||||||
app:spanCount="@integer/directory_columns"/>
|
app:spanCount="@integer/directory_columns_vertical_scroll"/>
|
||||||
|
|
|
@ -7,4 +7,4 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingTop="@dimen/activity_margin"
|
android:paddingTop="@dimen/activity_margin"
|
||||||
app:layoutManager="android.support.v7.widget.GridLayoutManager"
|
app:layoutManager="android.support.v7.widget.GridLayoutManager"
|
||||||
app:spanCount="@integer/media_columns"/>
|
app:spanCount="@integer/media_columns_vertical_scroll"/>
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
<resources>
|
<resources>
|
||||||
<integer name="directory_columns">3</integer>
|
<integer name="directory_columns_vertical_scroll">3</integer>
|
||||||
<integer name="media_columns">5</integer>
|
<integer name="directory_columns_horizontal_scroll">5</integer>
|
||||||
|
<integer name="media_columns_vertical_scroll">5</integer>
|
||||||
|
<integer name="media_columns_horizontal_scroll">6</integer>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
<resources>
|
<resources>
|
||||||
<integer name="directory_columns">4</integer>
|
<integer name="directory_columns_vertical_scroll">4</integer>
|
||||||
<integer name="media_columns">7</integer>
|
<integer name="directory_columns_horizontal_scroll">7</integer>
|
||||||
|
<integer name="media_columns_vertical_scroll">7</integer>
|
||||||
|
<integer name="media_columns_horizontal_scroll">8</integer>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
<resources>
|
<resources>
|
||||||
<integer name="directory_columns">2</integer>
|
<integer name="directory_columns_vertical_scroll">2</integer>
|
||||||
<integer name="media_columns">3</integer>
|
<integer name="directory_columns_horizontal_scroll">4</integer>
|
||||||
|
<integer name="media_columns_vertical_scroll">3</integer>
|
||||||
|
<integer name="media_columns_horizontal_scroll">4</integer>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue