couple edits to the exclude/include icon

This commit is contained in:
tibbi 2017-03-18 18:34:46 +01:00
parent 4ee604962f
commit fc1fd0f505
9 changed files with 11 additions and 16 deletions

View file

@ -32,7 +32,6 @@ class ExcludedFoldersActivity : SimpleActivity() {
} }
managed_folders_icon.apply { managed_folders_icon.apply {
setColorFilter(config.textColor, PorterDuff.Mode.SRC_IN) setColorFilter(config.textColor, PorterDuff.Mode.SRC_IN)
alpha = 0.7f
setOnClickListener { setOnClickListener {
config.removeExcludedFolder(folder) config.removeExcludedFolder(folder)
updateExcludedFolders() updateExcludedFolders()

View file

@ -33,7 +33,6 @@ class IncludedFoldersActivity : SimpleActivity() {
} }
managed_folders_icon.apply { managed_folders_icon.apply {
setColorFilter(config.textColor, PorterDuff.Mode.SRC_IN) setColorFilter(config.textColor, PorterDuff.Mode.SRC_IN)
alpha = 0.7f
setOnClickListener { setOnClickListener {
config.removeIncludedFolder(folder) config.removeIncludedFolder(folder)
updateIncludedFolders() updateIncludedFolders()

View file

@ -22,7 +22,7 @@ import com.simplemobiletools.gallery.helpers.NOMEDIA
import com.simplemobiletools.gallery.helpers.REQUEST_EDIT_IMAGE import com.simplemobiletools.gallery.helpers.REQUEST_EDIT_IMAGE
import com.simplemobiletools.gallery.helpers.REQUEST_SET_WALLPAPER import com.simplemobiletools.gallery.helpers.REQUEST_SET_WALLPAPER
import com.simplemobiletools.gallery.models.Medium import com.simplemobiletools.gallery.models.Medium
import com.simplemobiletools.gallery.views.MyImageView import com.simplemobiletools.gallery.views.MySquareImageView
import com.squareup.picasso.Picasso import com.squareup.picasso.Picasso
import java.io.File import java.io.File
import java.util.* 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()) { if (path.isImageFast()) {
Picasso.with(this) Picasso.with(this)
.load("file:$path") .load("file:$path")

View file

@ -4,16 +4,13 @@ import android.content.Context
import android.util.AttributeSet import android.util.AttributeSet
import android.widget.ImageView 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) { override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec) super.onMeasure(widthMeasureSpec, heightMeasureSpec)

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<com.simplemobiletools.gallery.views.MyImageView <com.simplemobiletools.gallery.views.MySquareImageView
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/dir_thumbnail" android:id="@+id/dir_thumbnail"
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<com.simplemobiletools.gallery.views.MyImageView <com.simplemobiletools.gallery.views.MySquareImageView
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/medium_thumbnail" android:id="@+id/medium_thumbnail"
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -7,7 +7,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<com.simplemobiletools.gallery.views.MyImageView <com.simplemobiletools.gallery.views.MySquareImageView
android:id="@+id/dir_thumbnail" android:id="@+id/dir_thumbnail"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"/> android:layout_height="match_parent"/>

View file

@ -16,7 +16,7 @@
android:layout_toLeftOf="@+id/managed_folders_icon" android:layout_toLeftOf="@+id/managed_folders_icon"
android:layout_toStartOf="@+id/managed_folders_icon"/> android:layout_toStartOf="@+id/managed_folders_icon"/>
<com.simplemobiletools.gallery.views.MyImageView <ImageView
android:id="@+id/managed_folders_icon" android:id="@+id/managed_folders_icon"
style="@style/MyBorderlessBackgroundStyle" style="@style/MyBorderlessBackgroundStyle"
android:layout_width="@dimen/exclude_folder_img_size" android:layout_width="@dimen/exclude_folder_img_size"

View file

@ -7,7 +7,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<com.simplemobiletools.gallery.views.MyImageView <com.simplemobiletools.gallery.views.MySquareImageView
android:id="@+id/medium_thumbnail" android:id="@+id/medium_thumbnail"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"/> android:layout_height="match_parent"/>