mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
couple edits to the exclude/include icon
This commit is contained in:
parent
4ee604962f
commit
fc1fd0f505
9 changed files with 11 additions and 16 deletions
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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)
|
|
@ -1,5 +1,5 @@
|
|||
<?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"
|
||||
android:id="@+id/dir_thumbnail"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?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"
|
||||
android:id="@+id/medium_thumbnail"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.simplemobiletools.gallery.views.MyImageView
|
||||
<com.simplemobiletools.gallery.views.MySquareImageView
|
||||
android:id="@+id/dir_thumbnail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
android:layout_toLeftOf="@+id/managed_folders_icon"
|
||||
android:layout_toStartOf="@+id/managed_folders_icon"/>
|
||||
|
||||
<com.simplemobiletools.gallery.views.MyImageView
|
||||
<ImageView
|
||||
android:id="@+id/managed_folders_icon"
|
||||
style="@style/MyBorderlessBackgroundStyle"
|
||||
android:layout_width="@dimen/exclude_folder_img_size"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.simplemobiletools.gallery.views.MyImageView
|
||||
<com.simplemobiletools.gallery.views.MySquareImageView
|
||||
android:id="@+id/medium_thumbnail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
|
Loading…
Reference in a new issue