Merge pull request #2393 from KryptKode/chore/update-commons
Update gallery with recent commons module
This commit is contained in:
commit
d74c84859a
11 changed files with 27 additions and 27 deletions
|
@ -10,7 +10,7 @@ if (keystorePropertiesFile.exists()) {
|
|||
}
|
||||
|
||||
android {
|
||||
compileSdk 30
|
||||
compileSdk 31
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.simplemobiletools.gallery.pro"
|
||||
|
@ -77,7 +77,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:4ef63f88a3'
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:b16cc87e63'
|
||||
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
|
||||
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
||||
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.24'
|
||||
|
|
|
@ -107,7 +107,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
|
|||
override fun onResume() {
|
||||
super.onResume()
|
||||
isEditingWithThirdParty = false
|
||||
bottom_draw_width.setColors(config.textColor, getAdjustedPrimaryColor(), config.backgroundColor)
|
||||
bottom_draw_width.setColors(config.textColor, getProperPrimaryColor(), config.backgroundColor)
|
||||
}
|
||||
|
||||
override fun onStop() {
|
||||
|
@ -592,7 +592,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
|
|||
else -> null
|
||||
}
|
||||
|
||||
currentPrimaryActionButton?.applyColorFilter(getAdjustedPrimaryColor())
|
||||
currentPrimaryActionButton?.applyColorFilter(getProperPrimaryColor())
|
||||
bottom_editor_filter_actions.beVisibleIf(currPrimaryAction == PRIMARY_ACTION_FILTER)
|
||||
bottom_editor_crop_rotate_actions.beVisibleIf(currPrimaryAction == PRIMARY_ACTION_CROP_ROTATE)
|
||||
bottom_editor_draw_actions.beVisibleIf(currPrimaryAction == PRIMARY_ACTION_DRAW)
|
||||
|
@ -708,7 +708,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
|
|||
else -> bottom_aspect_ratio_other
|
||||
}
|
||||
|
||||
currentAspectRatioButton.setTextColor(getAdjustedPrimaryColor())
|
||||
currentAspectRatioButton.setTextColor(getProperPrimaryColor())
|
||||
}
|
||||
|
||||
private fun updateCropRotateActionButtons() {
|
||||
|
@ -721,7 +721,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
|
|||
else -> null
|
||||
}
|
||||
|
||||
primaryActionView?.applyColorFilter(getAdjustedPrimaryColor())
|
||||
primaryActionView?.applyColorFilter(getProperPrimaryColor())
|
||||
}
|
||||
|
||||
private fun updateDrawColor(color: Int) {
|
||||
|
|
|
@ -83,7 +83,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||
private var mStoredCropThumbnails = true
|
||||
private var mStoredScrollHorizontally = true
|
||||
private var mStoredTextColor = 0
|
||||
private var mStoredAdjustedPrimaryColor = 0
|
||||
private var mStoredPrimaryColor = 0
|
||||
private var mStoredStyleString = ""
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
|
@ -184,8 +184,8 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||
getRecyclerAdapter()?.updateTextColor(config.textColor)
|
||||
}
|
||||
|
||||
val adjustedPrimaryColor = getAdjustedPrimaryColor()
|
||||
if (mStoredAdjustedPrimaryColor != adjustedPrimaryColor) {
|
||||
val primaryColor = getProperPrimaryColor()
|
||||
if (mStoredPrimaryColor != primaryColor) {
|
||||
getRecyclerAdapter()?.updatePrimaryColor(config.primaryColor)
|
||||
}
|
||||
|
||||
|
@ -194,7 +194,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||
setupAdapter(mDirs, forceRecreate = true)
|
||||
}
|
||||
|
||||
directories_fastscroller.updateColors(adjustedPrimaryColor)
|
||||
directories_fastscroller.updateColors(primaryColor)
|
||||
directories_refresh_layout.isEnabled = config.enablePullToRefresh
|
||||
getRecyclerAdapter()?.apply {
|
||||
dateFormat = config.dateFormat
|
||||
|
@ -202,8 +202,8 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||
}
|
||||
|
||||
directories_empty_placeholder.setTextColor(config.textColor)
|
||||
directories_empty_placeholder_2.setTextColor(adjustedPrimaryColor)
|
||||
directories_switch_searching.setTextColor(adjustedPrimaryColor)
|
||||
directories_empty_placeholder_2.setTextColor(primaryColor)
|
||||
directories_switch_searching.setTextColor(primaryColor)
|
||||
directories_switch_searching.underlineText()
|
||||
|
||||
if (!mIsSearchOpen) {
|
||||
|
@ -341,7 +341,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||
mStoredTextColor = textColor
|
||||
mStoredStyleString = "$folderStyle$showFolderMediaCount$limitFolderTitle"
|
||||
}
|
||||
mStoredAdjustedPrimaryColor = getAdjustedPrimaryColor()
|
||||
mStoredPrimaryColor = getProperPrimaryColor()
|
||||
}
|
||||
|
||||
private fun setupSearch(menu: Menu) {
|
||||
|
|
|
@ -75,7 +75,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
|||
private var mStoredRoundedCorners = false
|
||||
private var mStoredMarkFavoriteItems = true
|
||||
private var mStoredTextColor = 0
|
||||
private var mStoredAdjustedPrimaryColor = 0
|
||||
private var mStoredPrimaryColor = 0
|
||||
private var mStoredThumbnailSpacing = 0
|
||||
|
||||
companion object {
|
||||
|
@ -145,8 +145,8 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
|||
getMediaAdapter()?.updateTextColor(config.textColor)
|
||||
}
|
||||
|
||||
val adjustedPrimaryColor = getAdjustedPrimaryColor()
|
||||
if (mStoredAdjustedPrimaryColor != adjustedPrimaryColor) {
|
||||
val primaryColor = getProperPrimaryColor()
|
||||
if (mStoredPrimaryColor != primaryColor) {
|
||||
getMediaAdapter()?.updatePrimaryColor(config.primaryColor)
|
||||
}
|
||||
|
||||
|
@ -159,7 +159,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
|||
setupAdapter()
|
||||
}
|
||||
|
||||
media_fastscroller.updateColors(adjustedPrimaryColor)
|
||||
media_fastscroller.updateColors(primaryColor)
|
||||
media_refresh_layout.isEnabled = config.enablePullToRefresh
|
||||
getMediaAdapter()?.apply {
|
||||
dateFormat = config.dateFormat
|
||||
|
@ -167,7 +167,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
|||
}
|
||||
|
||||
media_empty_text_placeholder.setTextColor(config.textColor)
|
||||
media_empty_text_placeholder_2.setTextColor(getAdjustedPrimaryColor())
|
||||
media_empty_text_placeholder_2.setTextColor(getProperPrimaryColor())
|
||||
|
||||
if (!mIsSearchOpen) {
|
||||
invalidateOptionsMenu()
|
||||
|
@ -312,7 +312,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
|||
mStoredRoundedCorners = fileRoundedCorners
|
||||
mShowAll = showAll
|
||||
}
|
||||
mStoredAdjustedPrimaryColor = getAdjustedPrimaryColor()
|
||||
mStoredPrimaryColor = getProperPrimaryColor()
|
||||
}
|
||||
|
||||
private fun setupSearch(menu: Menu) {
|
||||
|
|
|
@ -42,7 +42,7 @@ class SearchActivity : SimpleActivity(), MediaOperationsListener {
|
|||
setContentView(R.layout.activity_search)
|
||||
media_empty_text_placeholder.setTextColor(config.textColor)
|
||||
getAllMedia()
|
||||
media_fastscroller.updateColors(getAdjustedPrimaryColor())
|
||||
media_fastscroller.updateColors(getProperPrimaryColor())
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
|
|
@ -105,7 +105,7 @@ class SettingsActivity : SimpleActivity() {
|
|||
settings_recycle_bin_label,
|
||||
settings_migrating_label
|
||||
).forEach {
|
||||
it.setTextColor(getAdjustedPrimaryColor())
|
||||
it.setTextColor(getProperPrimaryColor())
|
||||
}
|
||||
|
||||
arrayOf(
|
||||
|
|
|
@ -761,7 +761,7 @@ class DirectoryAdapter(
|
|||
|
||||
dir_check?.beVisibleIf(isSelected)
|
||||
if (isSelected) {
|
||||
dir_check.background?.applyColorFilter(adjustedPrimaryColor)
|
||||
dir_check.background?.applyColorFilter(properPrimaryColor)
|
||||
dir_check.applyColorFilter(contrastColor)
|
||||
}
|
||||
|
||||
|
|
|
@ -585,7 +585,7 @@ class MediaAdapter(
|
|||
|
||||
medium_check?.beVisibleIf(isSelected)
|
||||
if (isSelected) {
|
||||
medium_check?.background?.applyColorFilter(adjustedPrimaryColor)
|
||||
medium_check?.background?.applyColorFilter(properPrimaryColor)
|
||||
medium_check.applyColorFilter(contrastColor)
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ class PickDirectoryDialog(
|
|||
spanCount = if (isGridViewType) activity.config.dirColumnCnt else 1
|
||||
}
|
||||
|
||||
view.directories_fastscroller.updateColors(activity.getAdjustedPrimaryColor())
|
||||
view.directories_fastscroller.updateColors(activity.getProperPrimaryColor())
|
||||
|
||||
val builder = AlertDialog.Builder(activity)
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.simplemobiletools.gallery.pro.dialogs
|
|||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.simplemobiletools.commons.activities.BaseSimpleActivity
|
||||
import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor
|
||||
import com.simplemobiletools.commons.extensions.getProperPrimaryColor
|
||||
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
||||
import com.simplemobiletools.commons.helpers.VIEW_TYPE_GRID
|
||||
import com.simplemobiletools.commons.views.MyGridLayoutManager
|
||||
|
@ -33,7 +33,7 @@ class PickMediumDialog(val activity: BaseSimpleActivity, val path: String, val c
|
|||
spanCount = if (isGridViewType) config.mediaColumnCnt else 1
|
||||
}
|
||||
|
||||
view.media_fastscroller.updateColors(activity.getAdjustedPrimaryColor())
|
||||
view.media_fastscroller.updateColors(activity.getProperPrimaryColor())
|
||||
|
||||
dialog = AlertDialog.Builder(activity)
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
|
|
|
@ -18,7 +18,7 @@ class PicassoRegionDecoder(
|
|||
override fun init(context: Context, uri: Uri): Point {
|
||||
val newUri = Uri.parse(uri.toString().replace("%", "%25").replace("#", "%23"))
|
||||
val inputStream = context.contentResolver.openInputStream(newUri)
|
||||
decoder = BitmapRegionDecoder.newInstance(inputStream, false)
|
||||
decoder = BitmapRegionDecoder.newInstance(inputStream!!, false)
|
||||
return Point(decoder!!.width, decoder!!.height)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue