From fc1fd0f505f863a7910c95e0e0b7a4fb07430fcf Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 18 Mar 2017 18:34:46 +0100 Subject: [PATCH] couple edits to the exclude/include icon --- .../gallery/activities/ExcludedFoldersActivity.kt | 1 - .../gallery/activities/IncludedFoldersActivity.kt | 1 - .../simplemobiletools/gallery/extensions/activity.kt | 4 ++-- .../views/{MyImageView.kt => MySquareImageView.kt} | 11 ++++------- app/src/main/res/layout-v23/directory_tmb.xml | 2 +- app/src/main/res/layout-v23/photo_video_tmb.xml | 2 +- app/src/main/res/layout/directory_tmb.xml | 2 +- app/src/main/res/layout/item_manage_folder.xml | 2 +- app/src/main/res/layout/photo_video_tmb.xml | 2 +- 9 files changed, 11 insertions(+), 16 deletions(-) rename app/src/main/kotlin/com/simplemobiletools/gallery/views/{MyImageView.kt => MySquareImageView.kt} (74%) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ExcludedFoldersActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ExcludedFoldersActivity.kt index 2d283888e..e6a47be16 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ExcludedFoldersActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ExcludedFoldersActivity.kt @@ -32,7 +32,6 @@ class ExcludedFoldersActivity : SimpleActivity() { } managed_folders_icon.apply { setColorFilter(config.textColor, PorterDuff.Mode.SRC_IN) - alpha = 0.7f setOnClickListener { config.removeExcludedFolder(folder) updateExcludedFolders() diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/IncludedFoldersActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/IncludedFoldersActivity.kt index 7d3d0c33d..9f7158c88 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/IncludedFoldersActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/IncludedFoldersActivity.kt @@ -33,7 +33,6 @@ class IncludedFoldersActivity : SimpleActivity() { } managed_folders_icon.apply { setColorFilter(config.textColor, PorterDuff.Mode.SRC_IN) - alpha = 0.7f setOnClickListener { config.removeIncludedFolder(folder) updateIncludedFolders() diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt index 25355dad8..564dde3a0 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt @@ -22,7 +22,7 @@ import com.simplemobiletools.gallery.helpers.NOMEDIA import com.simplemobiletools.gallery.helpers.REQUEST_EDIT_IMAGE import com.simplemobiletools.gallery.helpers.REQUEST_SET_WALLPAPER import com.simplemobiletools.gallery.models.Medium -import com.simplemobiletools.gallery.views.MyImageView +import com.simplemobiletools.gallery.views.MySquareImageView import com.squareup.picasso.Picasso import java.io.File import java.util.* @@ -186,7 +186,7 @@ fun SimpleActivity.removeNoMedia(path: String, callback: () -> Unit) { } } -fun Activity.loadImage(path: String, size: Int, target: MyImageView) { +fun Activity.loadImage(path: String, size: Int, target: MySquareImageView) { if (path.isImageFast()) { Picasso.with(this) .load("file:$path") diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/views/MyImageView.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/views/MySquareImageView.kt similarity index 74% rename from app/src/main/kotlin/com/simplemobiletools/gallery/views/MyImageView.kt rename to app/src/main/kotlin/com/simplemobiletools/gallery/views/MySquareImageView.kt index 156070b52..54c26947c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/views/MyImageView.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/views/MySquareImageView.kt @@ -4,16 +4,13 @@ import android.content.Context import android.util.AttributeSet import android.widget.ImageView -class MyImageView : ImageView { +class MySquareImageView : ImageView { - constructor(context: Context) : super(context) { - } + constructor(context: Context) : super(context) - constructor(context: Context, attrs: AttributeSet) : super(context, attrs) { - } + constructor(context: Context, attrs: AttributeSet) : super(context, attrs) - constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle) { - } + constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle) override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) { super.onMeasure(widthMeasureSpec, heightMeasureSpec) diff --git a/app/src/main/res/layout-v23/directory_tmb.xml b/app/src/main/res/layout-v23/directory_tmb.xml index a37aa8ac7..aab55c8ac 100644 --- a/app/src/main/res/layout-v23/directory_tmb.xml +++ b/app/src/main/res/layout-v23/directory_tmb.xml @@ -1,5 +1,5 @@ - - - diff --git a/app/src/main/res/layout/item_manage_folder.xml b/app/src/main/res/layout/item_manage_folder.xml index 9d60dab8f..5bb41596d 100644 --- a/app/src/main/res/layout/item_manage_folder.xml +++ b/app/src/main/res/layout/item_manage_folder.xml @@ -16,7 +16,7 @@ android:layout_toLeftOf="@+id/managed_folders_icon" android:layout_toStartOf="@+id/managed_folders_icon"/> - -