move Config and Constants into Helpers folder
This commit is contained in:
parent
b04022d365
commit
8ed6bff447
21 changed files with 31 additions and 28 deletions
|
@ -19,6 +19,7 @@ import com.simplemobiletools.gallery.adapters.DirectoryAdapter
|
||||||
import com.simplemobiletools.gallery.asynctasks.GetDirectoriesAsynctask
|
import com.simplemobiletools.gallery.asynctasks.GetDirectoriesAsynctask
|
||||||
import com.simplemobiletools.gallery.dialogs.ChangeSortingDialog
|
import com.simplemobiletools.gallery.dialogs.ChangeSortingDialog
|
||||||
import com.simplemobiletools.gallery.extensions.getImageMimeType
|
import com.simplemobiletools.gallery.extensions.getImageMimeType
|
||||||
|
import com.simplemobiletools.gallery.helpers.*
|
||||||
import com.simplemobiletools.gallery.models.Directory
|
import com.simplemobiletools.gallery.models.Directory
|
||||||
import kotlinx.android.synthetic.main.activity_main.*
|
import kotlinx.android.synthetic.main.activity_main.*
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
|
@ -21,6 +21,7 @@ import com.simplemobiletools.gallery.adapters.MediaAdapter
|
||||||
import com.simplemobiletools.gallery.asynctasks.GetMediaAsynctask
|
import com.simplemobiletools.gallery.asynctasks.GetMediaAsynctask
|
||||||
import com.simplemobiletools.gallery.dialogs.ChangeSortingDialog
|
import com.simplemobiletools.gallery.dialogs.ChangeSortingDialog
|
||||||
import com.simplemobiletools.gallery.extensions.getHumanizedFilename
|
import com.simplemobiletools.gallery.extensions.getHumanizedFilename
|
||||||
|
import com.simplemobiletools.gallery.helpers.*
|
||||||
import com.simplemobiletools.gallery.models.Medium
|
import com.simplemobiletools.gallery.models.Medium
|
||||||
import kotlinx.android.synthetic.main.activity_media.*
|
import kotlinx.android.synthetic.main.activity_media.*
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
|
@ -7,7 +7,7 @@ import android.os.Bundle
|
||||||
import android.provider.MediaStore
|
import android.provider.MediaStore
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import com.simplemobiletools.gallery.MEDIUM
|
import com.simplemobiletools.gallery.helpers.MEDIUM
|
||||||
import com.simplemobiletools.gallery.R
|
import com.simplemobiletools.gallery.R
|
||||||
import com.simplemobiletools.gallery.extensions.openWith
|
import com.simplemobiletools.gallery.extensions.openWith
|
||||||
import com.simplemobiletools.gallery.extensions.setAsWallpaper
|
import com.simplemobiletools.gallery.extensions.setAsWallpaper
|
||||||
|
|
|
@ -9,8 +9,8 @@ import android.support.v7.app.AppCompatActivity
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import com.simplemobiletools.filepicker.extensions.isShowingWritePermissions
|
import com.simplemobiletools.filepicker.extensions.isShowingWritePermissions
|
||||||
import com.simplemobiletools.gallery.Config
|
import com.simplemobiletools.gallery.helpers.Config
|
||||||
import com.simplemobiletools.gallery.OPEN_DOCUMENT_TREE
|
import com.simplemobiletools.gallery.helpers.OPEN_DOCUMENT_TREE
|
||||||
import com.simplemobiletools.gallery.R
|
import com.simplemobiletools.gallery.R
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
|
|
|
@ -16,10 +16,10 @@ import com.simplemobiletools.filepicker.asynctasks.CopyMoveTask
|
||||||
import com.simplemobiletools.filepicker.dialogs.ConfirmationDialog
|
import com.simplemobiletools.filepicker.dialogs.ConfirmationDialog
|
||||||
import com.simplemobiletools.filepicker.extensions.*
|
import com.simplemobiletools.filepicker.extensions.*
|
||||||
import com.simplemobiletools.fileproperties.dialogs.PropertiesDialog
|
import com.simplemobiletools.fileproperties.dialogs.PropertiesDialog
|
||||||
import com.simplemobiletools.gallery.MEDIUM
|
import com.simplemobiletools.gallery.helpers.MEDIUM
|
||||||
import com.simplemobiletools.gallery.R
|
import com.simplemobiletools.gallery.R
|
||||||
import com.simplemobiletools.gallery.REQUEST_EDIT_IMAGE
|
import com.simplemobiletools.gallery.helpers.REQUEST_EDIT_IMAGE
|
||||||
import com.simplemobiletools.gallery.REQUEST_SET_WALLPAPER
|
import com.simplemobiletools.gallery.helpers.REQUEST_SET_WALLPAPER
|
||||||
import com.simplemobiletools.gallery.adapters.MyPagerAdapter
|
import com.simplemobiletools.gallery.adapters.MyPagerAdapter
|
||||||
import com.simplemobiletools.gallery.dialogs.CopyDialog
|
import com.simplemobiletools.gallery.dialogs.CopyDialog
|
||||||
import com.simplemobiletools.gallery.dialogs.RenameFileDialog
|
import com.simplemobiletools.gallery.dialogs.RenameFileDialog
|
||||||
|
|
|
@ -16,7 +16,7 @@ import com.simplemobiletools.filepicker.extensions.isAStorageRootFolder
|
||||||
import com.simplemobiletools.filepicker.extensions.scanPaths
|
import com.simplemobiletools.filepicker.extensions.scanPaths
|
||||||
import com.simplemobiletools.filepicker.extensions.toast
|
import com.simplemobiletools.filepicker.extensions.toast
|
||||||
import com.simplemobiletools.fileproperties.dialogs.PropertiesDialog
|
import com.simplemobiletools.fileproperties.dialogs.PropertiesDialog
|
||||||
import com.simplemobiletools.gallery.Config
|
import com.simplemobiletools.gallery.helpers.Config
|
||||||
import com.simplemobiletools.gallery.R
|
import com.simplemobiletools.gallery.R
|
||||||
import com.simplemobiletools.gallery.activities.SimpleActivity
|
import com.simplemobiletools.gallery.activities.SimpleActivity
|
||||||
import com.simplemobiletools.gallery.dialogs.CopyDialog
|
import com.simplemobiletools.gallery.dialogs.CopyDialog
|
||||||
|
|
|
@ -14,7 +14,7 @@ import com.simplemobiletools.filepicker.asynctasks.CopyMoveTask
|
||||||
import com.simplemobiletools.filepicker.dialogs.ConfirmationDialog
|
import com.simplemobiletools.filepicker.dialogs.ConfirmationDialog
|
||||||
import com.simplemobiletools.filepicker.extensions.toast
|
import com.simplemobiletools.filepicker.extensions.toast
|
||||||
import com.simplemobiletools.fileproperties.dialogs.PropertiesDialog
|
import com.simplemobiletools.fileproperties.dialogs.PropertiesDialog
|
||||||
import com.simplemobiletools.gallery.Config
|
import com.simplemobiletools.gallery.helpers.Config
|
||||||
import com.simplemobiletools.gallery.R
|
import com.simplemobiletools.gallery.R
|
||||||
import com.simplemobiletools.gallery.activities.SimpleActivity
|
import com.simplemobiletools.gallery.activities.SimpleActivity
|
||||||
import com.simplemobiletools.gallery.dialogs.CopyDialog
|
import com.simplemobiletools.gallery.dialogs.CopyDialog
|
||||||
|
|
|
@ -5,7 +5,7 @@ import android.support.v4.app.Fragment
|
||||||
import android.support.v4.app.FragmentManager
|
import android.support.v4.app.FragmentManager
|
||||||
import android.support.v4.app.FragmentStatePagerAdapter
|
import android.support.v4.app.FragmentStatePagerAdapter
|
||||||
import android.util.SparseArray
|
import android.util.SparseArray
|
||||||
import com.simplemobiletools.gallery.MEDIUM
|
import com.simplemobiletools.gallery.helpers.MEDIUM
|
||||||
import com.simplemobiletools.gallery.activities.ViewPagerActivity
|
import com.simplemobiletools.gallery.activities.ViewPagerActivity
|
||||||
import com.simplemobiletools.gallery.fragments.PhotoFragment
|
import com.simplemobiletools.gallery.fragments.PhotoFragment
|
||||||
import com.simplemobiletools.gallery.fragments.VideoFragment
|
import com.simplemobiletools.gallery.fragments.VideoFragment
|
||||||
|
|
|
@ -5,10 +5,10 @@ import android.database.Cursor
|
||||||
import android.os.AsyncTask
|
import android.os.AsyncTask
|
||||||
import android.provider.MediaStore
|
import android.provider.MediaStore
|
||||||
import com.simplemobiletools.filepicker.extensions.scanFiles
|
import com.simplemobiletools.filepicker.extensions.scanFiles
|
||||||
import com.simplemobiletools.gallery.Config
|
import com.simplemobiletools.gallery.helpers.Config
|
||||||
import com.simplemobiletools.gallery.R
|
import com.simplemobiletools.gallery.R
|
||||||
import com.simplemobiletools.gallery.SORT_BY_NAME
|
import com.simplemobiletools.gallery.helpers.SORT_BY_NAME
|
||||||
import com.simplemobiletools.gallery.SORT_DESCENDING
|
import com.simplemobiletools.gallery.helpers.SORT_DESCENDING
|
||||||
import com.simplemobiletools.gallery.extensions.getHumanizedFilename
|
import com.simplemobiletools.gallery.extensions.getHumanizedFilename
|
||||||
import com.simplemobiletools.gallery.models.Directory
|
import com.simplemobiletools.gallery.models.Directory
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
|
@ -5,7 +5,7 @@ import android.database.Cursor
|
||||||
import android.os.AsyncTask
|
import android.os.AsyncTask
|
||||||
import android.provider.MediaStore
|
import android.provider.MediaStore
|
||||||
import com.simplemobiletools.filepicker.extensions.scanFiles
|
import com.simplemobiletools.filepicker.extensions.scanFiles
|
||||||
import com.simplemobiletools.gallery.Config
|
import com.simplemobiletools.gallery.helpers.Config
|
||||||
import com.simplemobiletools.gallery.models.Medium
|
import com.simplemobiletools.gallery.models.Medium
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
|
@ -6,6 +6,7 @@ import android.content.DialogInterface
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import com.simplemobiletools.gallery.*
|
import com.simplemobiletools.gallery.*
|
||||||
|
import com.simplemobiletools.gallery.helpers.*
|
||||||
import kotlinx.android.synthetic.main.dialog_change_sorting.view.*
|
import kotlinx.android.synthetic.main.dialog_change_sorting.view.*
|
||||||
|
|
||||||
class ChangeSortingDialog(val activity: Activity, val isDirectorySorting: Boolean, val callback: () -> Unit) : DialogInterface.OnClickListener {
|
class ChangeSortingDialog(val activity: Activity, val isDirectorySorting: Boolean, val callback: () -> Unit) : DialogInterface.OnClickListener {
|
||||||
|
|
|
@ -9,7 +9,7 @@ import com.simplemobiletools.filepicker.extensions.humanizePath
|
||||||
import com.simplemobiletools.filepicker.extensions.isPathOnSD
|
import com.simplemobiletools.filepicker.extensions.isPathOnSD
|
||||||
import com.simplemobiletools.filepicker.extensions.scanFiles
|
import com.simplemobiletools.filepicker.extensions.scanFiles
|
||||||
import com.simplemobiletools.filepicker.extensions.toast
|
import com.simplemobiletools.filepicker.extensions.toast
|
||||||
import com.simplemobiletools.gallery.Config
|
import com.simplemobiletools.gallery.helpers.Config
|
||||||
import com.simplemobiletools.gallery.R
|
import com.simplemobiletools.gallery.R
|
||||||
import com.simplemobiletools.gallery.activities.SimpleActivity
|
import com.simplemobiletools.gallery.activities.SimpleActivity
|
||||||
import kotlinx.android.synthetic.main.dialog_copy_move.view.*
|
import kotlinx.android.synthetic.main.dialog_copy_move.view.*
|
||||||
|
|
|
@ -4,7 +4,7 @@ import android.app.AlertDialog
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
import com.simplemobiletools.filepicker.extensions.*
|
import com.simplemobiletools.filepicker.extensions.*
|
||||||
import com.simplemobiletools.gallery.Config
|
import com.simplemobiletools.gallery.helpers.Config
|
||||||
import com.simplemobiletools.gallery.R
|
import com.simplemobiletools.gallery.R
|
||||||
import com.simplemobiletools.gallery.activities.SimpleActivity
|
import com.simplemobiletools.gallery.activities.SimpleActivity
|
||||||
import kotlinx.android.synthetic.main.rename_directory.view.*
|
import kotlinx.android.synthetic.main.rename_directory.view.*
|
||||||
|
|
|
@ -4,7 +4,7 @@ import android.app.AlertDialog
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
import com.simplemobiletools.filepicker.extensions.*
|
import com.simplemobiletools.filepicker.extensions.*
|
||||||
import com.simplemobiletools.gallery.Config
|
import com.simplemobiletools.gallery.helpers.Config
|
||||||
import com.simplemobiletools.gallery.R
|
import com.simplemobiletools.gallery.R
|
||||||
import com.simplemobiletools.gallery.activities.SimpleActivity
|
import com.simplemobiletools.gallery.activities.SimpleActivity
|
||||||
import kotlinx.android.synthetic.main.rename_file.view.*
|
import kotlinx.android.synthetic.main.rename_file.view.*
|
||||||
|
|
|
@ -10,7 +10,7 @@ import android.view.KeyEvent
|
||||||
import android.view.ViewConfiguration
|
import android.view.ViewConfiguration
|
||||||
import com.simplemobiletools.filepicker.extensions.toast
|
import com.simplemobiletools.filepicker.extensions.toast
|
||||||
import com.simplemobiletools.gallery.R
|
import com.simplemobiletools.gallery.R
|
||||||
import com.simplemobiletools.gallery.REQUEST_SET_WALLPAPER
|
import com.simplemobiletools.gallery.helpers.REQUEST_SET_WALLPAPER
|
||||||
import com.simplemobiletools.gallery.models.Medium
|
import com.simplemobiletools.gallery.models.Medium
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
|
@ -9,7 +9,7 @@ import com.bumptech.glide.Glide
|
||||||
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||||
import com.davemorrissey.labs.subscaleview.ImageSource
|
import com.davemorrissey.labs.subscaleview.ImageSource
|
||||||
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
|
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
|
||||||
import com.simplemobiletools.gallery.MEDIUM
|
import com.simplemobiletools.gallery.helpers.MEDIUM
|
||||||
import com.simplemobiletools.gallery.R
|
import com.simplemobiletools.gallery.R
|
||||||
import com.simplemobiletools.gallery.extensions.getRealPathFromURI
|
import com.simplemobiletools.gallery.extensions.getRealPathFromURI
|
||||||
import com.simplemobiletools.gallery.models.Medium
|
import com.simplemobiletools.gallery.models.Medium
|
||||||
|
|
|
@ -13,11 +13,11 @@ import android.view.*
|
||||||
import android.view.animation.AnimationUtils
|
import android.view.animation.AnimationUtils
|
||||||
import android.widget.SeekBar
|
import android.widget.SeekBar
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import com.simplemobiletools.gallery.Config
|
|
||||||
import com.simplemobiletools.gallery.MEDIUM
|
|
||||||
import com.simplemobiletools.gallery.R
|
import com.simplemobiletools.gallery.R
|
||||||
import com.simplemobiletools.gallery.extensions.getNavBarHeight
|
import com.simplemobiletools.gallery.extensions.getNavBarHeight
|
||||||
import com.simplemobiletools.gallery.extensions.hasNavBar
|
import com.simplemobiletools.gallery.extensions.hasNavBar
|
||||||
|
import com.simplemobiletools.gallery.helpers.Config
|
||||||
|
import com.simplemobiletools.gallery.helpers.MEDIUM
|
||||||
import com.simplemobiletools.gallery.models.Medium
|
import com.simplemobiletools.gallery.models.Medium
|
||||||
import kotlinx.android.synthetic.main.pager_video_item.view.*
|
import kotlinx.android.synthetic.main.pager_video_item.view.*
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.simplemobiletools.gallery
|
package com.simplemobiletools.gallery.helpers
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
|
@ -1,4 +1,4 @@
|
||||||
package com.simplemobiletools.gallery
|
package com.simplemobiletools.gallery.helpers
|
||||||
|
|
||||||
// shared preferences
|
// shared preferences
|
||||||
val PREFS_KEY = "Gallery"
|
val PREFS_KEY = "Gallery"
|
|
@ -1,8 +1,8 @@
|
||||||
package com.simplemobiletools.gallery.models
|
package com.simplemobiletools.gallery.models
|
||||||
|
|
||||||
import com.simplemobiletools.gallery.SORT_BY_DATE
|
import com.simplemobiletools.gallery.helpers.SORT_BY_DATE
|
||||||
import com.simplemobiletools.gallery.SORT_BY_NAME
|
import com.simplemobiletools.gallery.helpers.SORT_BY_NAME
|
||||||
import com.simplemobiletools.gallery.SORT_DESCENDING
|
import com.simplemobiletools.gallery.helpers.SORT_DESCENDING
|
||||||
|
|
||||||
class Directory(val path: String, val thumbnail: String, val name: String, var mediaCnt: Int, val timestamp: Long, var size: Long) : Comparable<Directory> {
|
class Directory(val path: String, val thumbnail: String, val name: String, var mediaCnt: Int, val timestamp: Long, var size: Long) : Comparable<Directory> {
|
||||||
companion object {
|
companion object {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package com.simplemobiletools.gallery.models
|
package com.simplemobiletools.gallery.models
|
||||||
|
|
||||||
import com.simplemobiletools.gallery.SORT_BY_DATE
|
import com.simplemobiletools.gallery.helpers.SORT_BY_DATE
|
||||||
import com.simplemobiletools.gallery.SORT_BY_NAME
|
import com.simplemobiletools.gallery.helpers.SORT_BY_NAME
|
||||||
import com.simplemobiletools.gallery.SORT_DESCENDING
|
import com.simplemobiletools.gallery.helpers.SORT_DESCENDING
|
||||||
import java.io.Serializable
|
import java.io.Serializable
|
||||||
|
|
||||||
class Medium(val name: String, var path: String, val isVideo: Boolean, val timestamp: Long, val size: Long) : Serializable, Comparable<Medium> {
|
class Medium(val name: String, var path: String, val isVideo: Boolean, val timestamp: Long, val size: Long) : Serializable, Comparable<Medium> {
|
||||||
|
|
Loading…
Reference in a new issue