misc code style fixes
This commit is contained in:
parent
bf662d16d9
commit
0f5fef8509
8 changed files with 21 additions and 28 deletions
|
@ -8,9 +8,9 @@ import androidx.recyclerview.widget.RecyclerView
|
|||
import com.simplemobiletools.gallery.pro.R
|
||||
import com.simplemobiletools.gallery.pro.models.FilterItem
|
||||
import kotlinx.android.synthetic.main.editor_filter_item.view.*
|
||||
import java.util.*
|
||||
|
||||
class FiltersAdapter(val context: Context, val filterItems: ArrayList<FilterItem>, val itemClick: (Int) -> Unit) : RecyclerView.Adapter<FiltersAdapter.ViewHolder>() {
|
||||
class FiltersAdapter(val context: Context, val filterItems: ArrayList<FilterItem>, val itemClick: (Int) -> Unit) :
|
||||
RecyclerView.Adapter<FiltersAdapter.ViewHolder>() {
|
||||
|
||||
private var currentSelection = filterItems.first()
|
||||
private var strokeBackground = context.resources.getDrawable(R.drawable.stroke_background)
|
||||
|
|
|
@ -10,18 +10,14 @@ import com.simplemobiletools.commons.extensions.isPathOnSD
|
|||
import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener
|
||||
import com.simplemobiletools.commons.views.MyRecyclerView
|
||||
import com.simplemobiletools.gallery.pro.R
|
||||
import com.simplemobiletools.gallery.pro.extensions.config
|
||||
import com.simplemobiletools.gallery.pro.extensions.removeNoMedia
|
||||
import kotlinx.android.synthetic.main.item_manage_folder.view.*
|
||||
import java.util.*
|
||||
|
||||
class ManageHiddenFoldersAdapter(
|
||||
activity: BaseSimpleActivity, var folders: ArrayList<String>, val listener: RefreshRecyclerViewListener?,
|
||||
recyclerView: MyRecyclerView, itemClick: (Any) -> Unit
|
||||
) : MyRecyclerViewAdapter(activity, recyclerView, itemClick) {
|
||||
|
||||
private val config = activity.config
|
||||
|
||||
init {
|
||||
setupDragListener(true)
|
||||
}
|
||||
|
|
|
@ -88,8 +88,7 @@ fun SimpleActivity.launchSettings() {
|
|||
|
||||
fun SimpleActivity.launchAbout() {
|
||||
val licenses = LICENSE_GLIDE or LICENSE_CROPPER or LICENSE_RTL or LICENSE_SUBSAMPLING or LICENSE_PATTERN or LICENSE_REPRINT or LICENSE_GIF_DRAWABLE or
|
||||
LICENSE_PICASSO or LICENSE_EXOPLAYER or LICENSE_PANORAMA_VIEW or LICENSE_SANSELAN or LICENSE_FILTERS or LICENSE_GESTURE_VIEWS or
|
||||
LICENSE_APNG
|
||||
LICENSE_PICASSO or LICENSE_EXOPLAYER or LICENSE_PANORAMA_VIEW or LICENSE_SANSELAN or LICENSE_FILTERS or LICENSE_GESTURE_VIEWS or LICENSE_APNG
|
||||
|
||||
val faqItems = arrayListOf(
|
||||
FAQItem(R.string.faq_3_title, R.string.faq_3_text),
|
||||
|
|
|
@ -34,7 +34,8 @@ private class ExifInterfaceAttributes {
|
|||
ExifInterface.TAG_PIXEL_Y_DIMENSION,
|
||||
ExifInterface.TAG_THUMBNAIL_IMAGE_LENGTH,
|
||||
ExifInterface.TAG_THUMBNAIL_IMAGE_WIDTH,
|
||||
ExifInterface.TAG_ORIENTATION)
|
||||
ExifInterface.TAG_ORIENTATION
|
||||
)
|
||||
|
||||
return tagFields
|
||||
.map { tagField -> tagField.get(null) as String }
|
||||
|
|
|
@ -226,13 +226,6 @@ const val ASPECT_RATIO_FOUR_THREE = 2
|
|||
const val ASPECT_RATIO_SIXTEEN_NINE = 3
|
||||
const val ASPECT_RATIO_OTHER = 4
|
||||
|
||||
// some constants related to zooming videos
|
||||
const val MIN_VIDEO_ZOOM_SCALE = 1f
|
||||
const val MAX_VIDEO_ZOOM_SCALE = 5f
|
||||
const val ZOOM_MODE_NONE = 0
|
||||
const val ZOOM_MODE_DRAG = 1
|
||||
const val ZOOM_MODE_ZOOM = 2
|
||||
|
||||
// constants related to image quality
|
||||
const val LOW_TILE_DPI = 160
|
||||
const val NORMAL_TILE_DPI = 220
|
||||
|
|
|
@ -6,8 +6,10 @@ import androidx.recyclerview.widget.RecyclerView
|
|||
import com.simplemobiletools.gallery.pro.models.Medium
|
||||
import com.simplemobiletools.gallery.pro.models.ThumbnailItem
|
||||
|
||||
class GridSpacingItemDecoration(val spanCount: Int, val spacing: Int, val isScrollingHorizontally: Boolean, val addSideSpacing: Boolean,
|
||||
var items: ArrayList<ThumbnailItem>, val useGridPosition: Boolean) : RecyclerView.ItemDecoration() {
|
||||
class GridSpacingItemDecoration(
|
||||
val spanCount: Int, val spacing: Int, val isScrollingHorizontally: Boolean, val addSideSpacing: Boolean,
|
||||
var items: ArrayList<ThumbnailItem>, val useGridPosition: Boolean
|
||||
) : RecyclerView.ItemDecoration() {
|
||||
|
||||
override fun toString() = "spanCount: $spanCount, spacing: $spacing, isScrollingHorizontally: $isScrollingHorizontally, addSideSpacing: $addSideSpacing, " +
|
||||
"items: ${items.hashCode()}, useGridPosition: $useGridPosition"
|
||||
|
|
|
@ -10,4 +10,5 @@ data class Favorite(
|
|||
@PrimaryKey(autoGenerate = true) var id: Int?,
|
||||
@ColumnInfo(name = "full_path") var fullPath: String,
|
||||
@ColumnInfo(name = "filename") var filename: String,
|
||||
@ColumnInfo(name = "parent_path") var parentPath: String)
|
||||
@ColumnInfo(name = "parent_path") var parentPath: String
|
||||
)
|
||||
|
|
|
@ -9,4 +9,5 @@ import androidx.room.PrimaryKey
|
|||
data class Widget(
|
||||
@PrimaryKey(autoGenerate = true) var id: Int?,
|
||||
@ColumnInfo(name = "widget_id") var widgetId: Int,
|
||||
@ColumnInfo(name = "folder_path") var folderPath: String)
|
||||
@ColumnInfo(name = "folder_path") var folderPath: String
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue