Refined seletable

main
h4h13 2020-01-06 11:04:09 +05:30
parent 813fb86073
commit e1f2d14ee8
45 changed files with 259 additions and 332 deletions

View File

@ -19,6 +19,7 @@ import code.name.monkey.appthemehelper.util.ColorUtil
import code.name.monkey.appthemehelper.util.MaterialValueHelper
import code.name.monkey.appthemehelper.util.TintHelper
import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.R.drawable
import code.name.monkey.retromusic.activities.base.AbsBaseActivity
import code.name.monkey.retromusic.activities.saf.SAFGuideActivity
import code.name.monkey.retromusic.util.PreferenceUtil
@ -321,7 +322,7 @@ abstract class AbsTagEditorActivity : AbsBaseActivity() {
protected fun setImageBitmap(bitmap: Bitmap?, bgColor: Int) {
if (bitmap == null) {
editorImage.setImageResource(code.name.monkey.retromusic.R.drawable.default_album_art)
editorImage.setImageResource(drawable.default_album_art)
} else {
editorImage.setImageBitmap(bitmap)
}
@ -414,4 +415,5 @@ abstract class AbsTagEditorActivity : AbsBaseActivity() {
private val TAG = AbsTagEditorActivity::class.java.simpleName
private const val REQUEST_CODE_SELECT_IMAGE = 1000
}
}

View File

@ -9,7 +9,6 @@ import android.graphics.drawable.Drawable
import android.net.Uri
import android.os.Bundle
import android.text.Editable
import android.text.TextUtils
import android.text.TextWatcher
import android.transition.Slide
import android.widget.Toast
@ -22,9 +21,7 @@ import code.name.monkey.retromusic.glide.palette.BitmapPaletteTranscoder
import code.name.monkey.retromusic.glide.palette.BitmapPaletteWrapper
import code.name.monkey.retromusic.loaders.AlbumLoader
import code.name.monkey.retromusic.rest.LastFMRestClient
import code.name.monkey.retromusic.rest.model.LastFmAlbum
import code.name.monkey.retromusic.util.ImageUtil
import code.name.monkey.retromusic.util.LastFMUtil
import code.name.monkey.retromusic.util.RetroColorUtil.generatePalette
import code.name.monkey.retromusic.util.RetroColorUtil.getColor
import com.bumptech.glide.Glide
@ -151,62 +148,6 @@ class AlbumTagEditorActivity : AbsTagEditorActivity(), TextWatcher {
disposable.clear()
}
private fun extractDetails(lastFmAlbum: LastFmAlbum) {
if (lastFmAlbum.album != null) {
val url = LastFMUtil.getLargestAlbumImageUrl(lastFmAlbum.album.image)
if (!TextUtils.isEmpty(url) && url.trim { it <= ' ' }.isNotEmpty()) {
Glide.with(this@AlbumTagEditorActivity).load(url).asBitmap()
.transcode(BitmapPaletteTranscoder(this), BitmapPaletteWrapper::class.java)
.diskCacheStrategy(DiskCacheStrategy.SOURCE).error(R.drawable.default_album_art)
.into(object : SimpleTarget<BitmapPaletteWrapper>() {
override fun onLoadFailed(
e: java.lang.Exception?,
errorDrawable: Drawable?
) {
super.onLoadFailed(e, errorDrawable)
Toast.makeText(
this@AlbumTagEditorActivity,
e.toString(),
Toast.LENGTH_LONG
).show()
}
override fun onResourceReady(
resource: BitmapPaletteWrapper?,
glideAnimation: GlideAnimation<in BitmapPaletteWrapper>?
) {
albumArtBitmap = resource?.bitmap?.let {
ImageUtil.resizeBitmap(
it,
2048
)
}
setImageBitmap(
albumArtBitmap,
getColor(
resource?.palette,
ATHUtil.resolveColor(
this@AlbumTagEditorActivity,
R.attr.defaultFooterColor
)
)
)
deleteAlbumArt = false
dataChanged()
setResult(RESULT_OK)
}
})
return
}
if (lastFmAlbum.album.tags.tag.size > 0) {
genreTitle.setText(lastFmAlbum.album.tags.tag[0].name)
}
}
toastLoadingFailed()
}
private fun toastLoadingFailed() {
Toast.makeText(
this@AlbumTagEditorActivity,
@ -237,8 +178,8 @@ class AlbumTagEditorActivity : AbsTagEditorActivity(), TextWatcher {
fieldKeyValueMap[FieldKey.GENRE] = genreTitle.text.toString()
fieldKeyValueMap[FieldKey.YEAR] = yearTitle.text.toString()
writeValuesToFiles(
fieldKeyValueMap, if (deleteAlbumArt) ArtworkInfo(id, null)
writeValuesToFiles(fieldKeyValueMap,
if (deleteAlbumArt) ArtworkInfo(id, null)
else if (albumArtBitmap == null) null else ArtworkInfo(id, albumArtBitmap!!)
)
}

View File

@ -37,7 +37,6 @@ import code.name.monkey.retromusic.preferences.MaterialListPreferenceDialog
import code.name.monkey.retromusic.preferences.NowPlayingScreenPreference
import code.name.monkey.retromusic.preferences.NowPlayingScreenPreferenceDialog
import code.name.monkey.retromusic.util.NavigationUtil
import me.everything.android.ui.overscroll.OverScrollDecoratorHelper
/**
* @author Hemanth S (h4h13).
@ -80,7 +79,6 @@ abstract class AbsSettingsFragment : ATEPreferenceFragmentCompat() {
listView.setPadding(0, 0, 0, 0)
listView.setPaddingRelative(0, 0, 0, 0)
invalidateSettings()
OverScrollDecoratorHelper.setUpOverScroll(listView, OverScrollDecoratorHelper.ORIENTATION_VERTICAL)
}
override fun onCreatePreferenceDialog(preference: Preference): DialogFragment? {

View File

@ -19,21 +19,26 @@ import android.app.Activity;
import android.media.MediaScannerConnection;
import android.net.Uri;
import android.widget.Toast;
import java.lang.ref.WeakReference;
import code.name.monkey.retromusic.R;
import java.lang.ref.WeakReference;
/**
* @author Karim Abou Zeid (kabouzeid)
*/
public class UpdateToastMediaScannerCompletionListener implements MediaScannerConnection.OnScanCompletedListener {
private final String[] toBeScanned;
private final String scannedFiles;
private final String couldNotScanFiles;
private final WeakReference<Activity> activityWeakReference;
private int scanned = 0;
private final String couldNotScanFiles;
private int failed = 0;
private int scanned = 0;
private final String scannedFiles;
private final String[] toBeScanned;
private Toast toast;
@SuppressLint("ShowToast")
@ -55,7 +60,8 @@ public class UpdateToastMediaScannerCompletionListener implements MediaScannerCo
} else {
scanned++;
}
String text = " " + String.format(scannedFiles, scanned, toBeScanned.length) + (failed > 0 ? " " + String.format(couldNotScanFiles, failed) : "");
String text = " " + String.format(scannedFiles, scanned, toBeScanned.length) + (failed > 0 ? " "
+ String.format(couldNotScanFiles, failed) : "");
toast.setText(text);
toast.show();
});

View File

@ -1,8 +0,0 @@
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:attr/colorControlHighlight">
<item
android:id="@android:id/mask"
android:drawable="@drawable/round_selector_mask" />
</ripple>

View File

@ -1,8 +0,0 @@
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?attr/colorOnSecondary">
<item
android:id="@android:id/mask"
android:drawable="@drawable/round_selector_mask" />
</ripple>

View File

@ -1,9 +1,24 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2020 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?attr/colorControlHighlight">
android:color="?android:attr/colorControlHighlight">
<item android:id="@android:id/mask">
<shape>
<corners android:radius="8dp" />
<solid android:color="@android:color/transparent" />
<solid android:color="@color/md_green_500" />
</shape>
</item>
<item>
@ -14,16 +29,6 @@
<solid android:color="?android:attr/colorControlHighlight" />
</shape>
</item>
<item android:state_pressed="true">
<ripple android:color="?android:attr/colorControlHighlight">
<item>
<shape>
<corners android:radius="8dp" />
<solid android:color="?android:attr/colorControlHighlight" />
</shape>
</item>
</ripple>
</item>
</selector>
</item>
</ripple>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/ripple_material_light" />
</shape>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/ripple_material_dark"/>
</shape>

View File

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" android:exitFadeDuration="@android:integer/config_shortAnimTime">
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:attr/colorControlHighlight">
<item android:drawable="@drawable/round_selected" android:state_pressed="true" />
<item android:drawable="@android:color/transparent" />
<item
android:id="@android:id/mask"
android:drawable="@drawable/round_selector_mask" />
</selector>
</ripple>

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" android:exitFadeDuration="@android:integer/config_shortAnimTime">
<item android:drawable="@drawable/round_selected_dark" android:state_pressed="true"/>
<item android:drawable="@android:color/transparent"/>
</selector>

View File

@ -5,6 +5,7 @@
android:id="@+id/root_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/rectSelector"
android:orientation="vertical">
<com.google.android.material.card.MaterialCardView
@ -16,10 +17,10 @@
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/image"
tools:src="@tools:sample/avatars"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop" />
android:scaleType="centerCrop"
tools:src="@tools:sample/avatars" />
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/playSongs"

View File

@ -5,6 +5,7 @@
android:id="@+id/root_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/rectSelector"
android:orientation="vertical">
<com.google.android.material.card.MaterialCardView

View File

@ -5,6 +5,7 @@
android:layout_width="156dp"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:background="?attr/rectSelector"
android:orientation="vertical">
<code.name.monkey.retromusic.views.WidthFitSquareLayout

View File

@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?rectSelector"
android:orientation="vertical">
<code.name.monkey.retromusic.views.WidthFitSquareCardView

View File

@ -5,6 +5,7 @@
android:id="@+id/root_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/rectSelector"
android:orientation="vertical">
<com.google.android.material.card.MaterialCardView
@ -16,10 +17,10 @@
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/image"
tools:src="@tools:sample/avatars"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop" />
android:scaleType="centerCrop"
tools:src="@tools:sample/avatars" />
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/playSongs"

View File

@ -4,6 +4,7 @@
android:id="@+id/imageContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:foreground="?attr/rectSelector"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatImageView

View File

@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/rectSelector"
android:orientation="vertical">
<com.google.android.material.card.MaterialCardView
@ -28,11 +29,11 @@
android:layout_height="match_parent"
android:ellipsize="end"
android:maxLines="2"
android:paddingBottom="4dp"
android:paddingEnd="8dp"
android:paddingStart="12dp"
android:paddingEnd="8dp"
android:paddingBottom="4dp"
android:textAppearance="@style/TextViewNormal"
tools:ignore="MissingPrefix"
android:textColor="?android:attr/textColorPrimary"
tools:ignore="MissingPrefix"
tools:text="@tools:sample/full_names" />
</LinearLayout>

View File

@ -5,6 +5,7 @@
android:layout_width="106dp"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:background="?attr/rectSelector"
android:orientation="vertical">
<code.name.monkey.retromusic.views.WidthFitSquareLayout

View File

@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/rectSelector"
app:cardCornerRadius="6dp"
app:cardElevation="4dp"
app:cardUseCompatPadding="true">

View File

@ -1,60 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="8dp"
app:cardElevation="4dp"
app:cardUseCompatPadding="true"
android:layout_margin="2dp"
android:background="?attr/rectSelector"
android:clickable="true"
android:focusable="true"
tools:ignore="MissingPrefix">
<LinearLayout
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?rectSelector"
android:gravity="center"
android:orientation="vertical"
tools:ignore="UnusedAttribute,UselessParent">
<code.name.monkey.retromusic.views.WidthFitSquareLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
tools:ignore="ContentDescription"
tools:src="@tools:sample/avatars" />
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
android:layout_height="wrap_content"
app:cardCornerRadius="8dp"
app:cardUseCompatPadding="true"
tools:ignore="MissingPrefix">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
android:padding="12dp">
tools:ignore="UnusedAttribute,UselessParent">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="wrap_content"
<code.name.monkey.retromusic.views.WidthFitSquareLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
tools:ignore="ContentDescription"
tools:src="@tools:sample/avatars" />
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:textAppearance="@style/TextViewSubtitle1"
android:textStyle="bold"
tools:text="@string/bug_report_summary" />
android:gravity="center_vertical"
android:orientation="vertical"
android:padding="12dp">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="4dp"
android:singleLine="true"
tools:text="@string/bug_report_summary" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:textAppearance="@style/TextViewSubtitle1"
android:textStyle="bold"
tools:text="@string/bug_report_summary" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="4dp"
android:singleLine="true"
tools:text="@string/bug_report_summary" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</com.google.android.material.card.MaterialCardView>
</FrameLayout>

View File

@ -1,60 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="8dp"
app:cardElevation="4dp"
app:cardUseCompatPadding="true"
android:layout_margin="2dp"
android:background="?attr/rectSelector"
android:clickable="true"
android:focusable="true"
tools:ignore="MissingPrefix">
<LinearLayout
android:id="@+id/paletteColorContainer"
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?rectSelector"
android:gravity="center"
android:orientation="vertical"
tools:ignore="UnusedAttribute,UselessParent">
<code.name.monkey.retromusic.views.WidthFitSquareLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
tools:ignore="ContentDescription"
tools:src="@tools:sample/avatars" />
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
android:layout_height="wrap_content"
app:cardCornerRadius="8dp"
app:cardUseCompatPadding="true"
tools:ignore="MissingPrefix">
<LinearLayout
android:id="@+id/paletteColorContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_height="match_parent"
android:background="?rectSelector"
android:gravity="center"
android:orientation="vertical"
android:padding="12dp">
tools:ignore="UnusedAttribute,UselessParent">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:textAppearance="@style/TextViewSubtitle1"
android:textStyle="bold"
tools:text="@string/bug_report_summary" />
<code.name.monkey.retromusic.views.WidthFitSquareLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="wrap_content"
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
tools:ignore="ContentDescription"
tools:src="@tools:sample/avatars" />
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="4dp"
android:singleLine="true"
tools:text="@string/bug_report_summary" />
android:gravity="center_vertical"
android:orientation="vertical"
android:padding="12dp">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:textAppearance="@style/TextViewSubtitle1"
android:textStyle="bold"
tools:text="@string/bug_report_summary" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="4dp"
android:singleLine="true"
tools:text="@string/bug_report_summary" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</com.google.android.material.card.MaterialCardView>
</FrameLayout>

View File

@ -17,7 +17,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:background="?rectSelector"
android:gravity="center_vertical"
android:minHeight="64dp"
android:orientation="horizontal"

View File

@ -16,7 +16,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:background="?rectSelector"
android:gravity="center_horizontal"
android:minHeight="@dimen/md_listitem_height"
android:orientation="vertical"

View File

@ -16,6 +16,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="?rectSelector"
android:gravity="center"
android:orientation="vertical">

View File

@ -4,10 +4,10 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:layout_margin="2dp"
android:background="?rectSelector"
android:clickable="true"
android:focusable="true"
android:foreground="?rectSelector"
tools:ignore="MissingPrefix">
<LinearLayout

View File

@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:background="?rectSelector"
tools:ignore="MissingPrefix">

View File

@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?rectSelector"
android:orientation="vertical">
<code.name.monkey.retromusic.views.WidthFitSquareCardView

View File

@ -1,62 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:cardCornerRadius="8dp"
app:cardElevation="4dp"
app:cardUseCompatPadding="true">
android:layout_margin="2dp"
android:background="?attr/rectSelector"
android:clickable="true"
android:focusable="true"
tools:ignore="MissingPrefix">
<code.name.monkey.retromusic.views.WidthFitSquareLayout
android:id="@+id/imageContainer"
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_height="wrap_content"
android:orientation="vertical"
app:cardCornerRadius="8dp"
app:cardUseCompatPadding="true">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:transitionName="@string/transition_album_art"
tools:ignore="ContentDescription"
tools:src="@tools:sample/avatars" />
<LinearLayout
<code.name.monkey.retromusic.views.WidthFitSquareLayout
android:id="@+id/imageContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?rectSelector"
android:orientation="vertical">
<Space
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:transitionName="@string/transition_album_art"
tools:ignore="ContentDescription"
tools:src="@tools:sample/avatars" />
<View
android:id="@+id/mask"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/shadow_up_home" />
</LinearLayout>
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
android:layout_height="match_parent"
android:orientation="vertical">
<Space
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
<View
android:id="@+id/mask"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/shadow_up_home" />
</LinearLayout>
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center"
android:gravity="center"
android:maxLines="2"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:paddingBottom="8dp"
android:textAppearance="@style/TextViewSubtitle1"
android:textColor="@color/md_white_1000"
tools:text="@string/bug_report_summary" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center"
android:gravity="center"
android:maxLines="2"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:paddingBottom="8dp"
android:textAppearance="@style/TextViewSubtitle1"
android:textColor="@color/md_white_1000"
tools:text="@string/bug_report_summary" />
</com.google.android.material.card.MaterialCardView>
</com.google.android.material.card.MaterialCardView>
</FrameLayout>

View File

@ -4,14 +4,12 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:layout_marginBottom="2dp"
android:layout_marginEnd="4dp"
android:layout_marginStart="4dp"
android:layout_marginTop="2dp"
android:background="?rectSelector"
android:clickable="true"
android:focusable="true"
android:foreground="?rectSelector"
android:gravity="center_vertical"
android:minHeight="64dp"
android:orientation="horizontal"
tools:ignore="MissingPrefix">
@ -32,8 +30,8 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0"
android:paddingEnd="0dp"
android:paddingStart="16dp">
android:paddingStart="16dp"
android:paddingEnd="0dp">
<com.google.android.material.card.MaterialCardView
android:id="@+id/imageTextContainer"
@ -73,8 +71,8 @@
android:layout_weight="1.0"
android:gravity="center_vertical"
android:orientation="vertical"
android:paddingEnd="16dp"
android:paddingStart="16dp">
android:paddingStart="16dp"
android:paddingEnd="16dp">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"

View File

@ -17,12 +17,12 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:foreground="?attr/rectSelector"
android:minHeight="72dp"
android:padding="16dp"
android:layout_margin="2dp"
android:background="?rectSelector"
android:minHeight="64dp"
android:padding="14dp"
tools:ignore="UnusedAttribute">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="0dp"

View File

@ -17,6 +17,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?rectSelector"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="8dp"

View File

@ -4,9 +4,9 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?rectSelector"
android:clickable="true"
android:focusable="true"
android:foreground="?rectSelector">
android:focusable="true">
<FrameLayout
android:id="@+id/dummy_view"

View File

@ -17,7 +17,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:background="?attr/rectSelector"
android:minHeight="72dp"
android:orientation="horizontal"
android:padding="16dp"

View File

@ -5,6 +5,7 @@
android:id="@+id/root_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/rectSelector"
android:orientation="vertical">
<com.google.android.material.card.MaterialCardView
@ -42,7 +43,7 @@
android:paddingStart="16dp"
android:paddingTop="6dp"
android:paddingEnd="8dp"
android:paddingBottom="4dp"
android:paddingBottom="4dp"
tools:ignore="MissingPrefix"
tools:text="My top tracks" />

View File

@ -17,9 +17,9 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/rectSelector"
android:descendantFocusability="blocksDescendants"
android:focusable="true"
android:foreground="?rectSelector"
android:orientation="horizontal"
android:paddingStart="16dp"
android:paddingEnd="0dp"

View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3

View File

@ -55,6 +55,7 @@
<item name="android:windowLightNavigationBar">false</item>
<!--Manual setting colors-->
<item name="colorSurface">@color/darkColorSurface</item>
</style>
<style name="Theme.RetroMusic.Base.Light" parent="Theme.MaterialComponents.Light.NoActionBar">

View File

@ -10,7 +10,6 @@
android:layout="@layout/list_item_view"
android:summary="@string/pref_summary_blacklist"
android:title="@string/pref_title_blacklist"
app:enableCopying="true"
app:icon="@drawable/ic_music_note_off_white_24dp" />
</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
@ -27,7 +26,6 @@
android:negativeButtonText="@null"
android:positiveButtonText="@null"
android:title="@string/pref_title_last_added_interval"
app:enableCopying="true"
app:icon="@drawable/ic_playlist_add_white_24dp" />
</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
@ -42,7 +40,6 @@
android:max="60"
android:summary="@string/pref_filter_song_summary"
android:title="@string/pref_filter_song_title"
app:enableCopying="true"
app:icon="@drawable/ic_filter_song_white_24dp"
app:showSeekBarValue="true" />
@ -52,7 +49,6 @@
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_keep_pause_on_zero_volume_summary"
android:title="@string/pref_keep_pause_on_zero_volume_title"
app:enableCopying="true"
app:icon="@drawable/ic_pause_white_24dp" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
@ -61,7 +57,6 @@
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_keep_screen_on_summary"
android:title="@string/pref_keep_screen_on_title"
app:enableCopying="true"
app:icon="@drawable/ic_settings_brigntness_white_24dp" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESeekBarPreference
@ -71,7 +66,6 @@
android:max="50"
android:summary="@string/pref_dialog_corner_summary"
android:title="@string/pref_dialog_corner_title"
app:enableCopying="true"
app:icon="@drawable/ic_rounded_corner"
app:showSeekBarValue="true" />

View File

@ -8,7 +8,6 @@
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_audio_ducking"
android:title="@string/pref_title_audio_ducking"
app:enableCopying="true"
app:icon="@drawable/ic_volume_down_white_24dp" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
@ -16,14 +15,12 @@
android:key="gapless_playback"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_gapless_playback"
android:title="@string/pref_title_gapless_playback"
app:enableCopying="true" />
android:title="@string/pref_title_gapless_playback" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreference
android:key="equalizer"
android:layout="@layout/list_item_view_no_title"
android:title="@string/equalizer"
app:enableCopying="true"
app:icon="@drawable/ic_equalizer_white_24dp" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
@ -32,7 +29,6 @@
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_toggle_headset"
android:title="@string/pref_title_toggle_toggle_headset"
app:enableCopying="true"
app:icon="@drawable/ic_play_arrow_white_32dp" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
@ -41,7 +37,6 @@
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_toggle_shuffle"
android:title="@string/pref_title_toggle_toggle_shuffle"
app:enableCopying="true"
app:icon="@drawable/ic_shuffle_white_24dp" />
</androidx.preference.PreferenceScreen>

View File

@ -12,14 +12,12 @@
android:key="general_theme"
android:layout="@layout/list_item_view"
android:title="@string/pref_title_general_theme"
app:enableCopying="true"
app:icon="@drawable/ic_color_lens_white_24dp" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:key="black_theme"
android:layout="@layout/list_item_view_switch_no_title"
android:title="@string/black_theme_name"
app:enableCopying="true" />
android:title="@string/black_theme_name" />
</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory
@ -33,7 +31,6 @@
android:persistent="false"
android:summary="@string/accent_color_desc"
android:title="@string/accent_color"
app:enableCopying="true"
app:icon="@drawable/ic_colorize_white_24dp" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
@ -41,32 +38,28 @@
android:key="desaturated_color"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_desaturated_color"
android:title="@string/pref_title_desaturated_color"
app:enableCopying="true" />
android:title="@string/pref_title_desaturated_color" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="adaptive_color_app"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_colored_app"
android:title="@string/pref_title_colored_app"
app:enableCopying="true" />
android:title="@string/pref_title_colored_app" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="should_color_app_shortcuts"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_colored_app_shortcuts"
android:title="@string/pref_title_app_shortcuts"
app:enableCopying="true" />
android:title="@string/pref_title_app_shortcuts" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="dominant_color"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_dominant_color"
android:title="@string/pref_title_toggle_dominant_color"
app:enableCopying="true" />
android:title="@string/pref_title_toggle_dominant_color" />
</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
</androidx.preference.PreferenceScreen>

View File

@ -8,7 +8,6 @@
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_ignore_media_store_artwork"
android:title="@string/pref_title_ignore_media_store_artwork"
app:enableCopying="true"
app:icon="@drawable/ic_image_white_24dp" />
<code.name.monkey.retromusic.preferences.MaterialListPreference
@ -17,6 +16,5 @@
android:entryValues="@array/pref_auto_download_images_values"
android:key="auto_download_images_policy"
android:layout="@layout/list_item_view"
android:title="@string/pref_title_auto_download_artist_images"
app:enableCopying="true" />
android:title="@string/pref_title_auto_download_artist_images" />
</androidx.preference.PreferenceScreen>

View File

@ -7,7 +7,6 @@
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_classic_notification"
android:title="@string/pref_title_classic_notification"
app:enableCopying="true"
app:icon="@drawable/ic_cellphone_lock_white_24dp" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
@ -15,7 +14,6 @@
android:key="colored_notification"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_colored_notification"
android:title="@string/pref_title_colored_notification"
app:enableCopying="true" />
android:title="@string/pref_title_colored_notification" />
</androidx.preference.PreferenceScreen>

View File

@ -6,7 +6,6 @@
android:key="now_playing_screen_id"
android:layout="@layout/list_item_view"
android:title="@string/pref_title_now_playing_screen_appearance"
app:enableCopying="true"
app:icon="@drawable/ic_play_circle_filled_white_24dp" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory
@ -17,7 +16,6 @@
android:key="album_cover_style_id"
android:layout="@layout/list_item_view"
android:title="@string/pref_title_album_cover_style"
app:enableCopying="true"
app:icon="@drawable/ic_image_white_24dp" />
<code.name.monkey.retromusic.preferences.MaterialListPreference
@ -26,13 +24,11 @@
android:entryValues="@array/pref_album_cover_transform_values"
android:key="album_cover_transform"
android:layout="@layout/list_item_view"
android:title="@string/pref_title_album_cover_transform"
app:enableCopying="true" />
android:title="@string/pref_title_album_cover_transform" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:layout="@layout/list_item_view_switch"
app:defaultValue="false"
app:enableCopying="true"
app:icon="@drawable/ic_view_carousel_black_24dp"
app:key="carousel_effect"
app:summary="@string/pref_summary_carousel_effect"
@ -46,7 +42,6 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:layout="@layout/list_item_view_switch"
app:defaultValue="false"
app:enableCopying="true"
app:icon="@drawable/ic_play_arrow_white_32dp"
app:key="toggle_add_controls"
app:summary="@string/pref_summary_extra_controls"
@ -69,7 +64,6 @@
android:max="25"
android:summary="@string/pref_blur_amount_summary"
android:title="@string/pref_blur_amount_title"
app:enableCopying="true"
app:icon="@drawable/ic_blur_on_white_24dp"
app:showSeekBarValue="true" />

View File

@ -13,7 +13,6 @@
android:negativeButtonText="@null"
android:positiveButtonText="@null"
android:title="@string/pref_title_album_grid_style"
app:enableCopying="true"
app:icon="@drawable/ic_album_white_24dp" />
<code.name.monkey.retromusic.preferences.MaterialListPreference
@ -25,7 +24,6 @@
android:negativeButtonText="@null"
android:positiveButtonText="@null"
android:title="@string/pref_title_artist_grid_style"
app:enableCopying="true"
app:icon="@drawable/ic_artist_white_24dp" />
@ -38,7 +36,6 @@
android:negativeButtonText="@null"
android:positiveButtonText="@null"
android:title="@string/pref_title_home_artist_grid_style"
app:enableCopying="true"
app:icon="@drawable/ic_home_white_24dp" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
@ -47,6 +44,7 @@
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_home_banner"
android:title="@string/pref_title_home_banner" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="extra_song_info"
@ -65,7 +63,6 @@
android:layout="@layout/list_item_view"
android:summary="@string/pref_summary_library_categories"
android:title="@string/library_categories"
app:enableCopying="true"
app:icon="@drawable/ic_library_music_white_24dp" />
<code.name.monkey.retromusic.preferences.MaterialListPreference
@ -76,9 +73,9 @@
android:layout="@layout/list_item_view"
android:negativeButtonText="@null"
android:positiveButtonText="@null"
android:title="@string/pref_title_tab_text_mode"
app:enableCopying="true" />
android:title="@string/pref_title_tab_text_mode" />
</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory
android:layout="@layout/preference_category_title"
android:title="@string/window">
@ -91,16 +88,17 @@
android:title="@string/pref_title_toggle_full_screen"
app:icon="@drawable/ic_cellphone_white_24dp" />
</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory
android:layout="@layout/preference_category_title"
android:title="@string/pref_header_lockscreen">
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="true"
android:key="album_art_on_lockscreen"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_album_art_on_lockscreen"
android:title="@string/pref_title_album_art_on_lockscreen"
app:enableCopying="true" />
android:title="@string/pref_title_album_art_on_lockscreen" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
@ -108,15 +106,13 @@
android:key="blurred_album_art"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_blurred_album_art"
android:title="@string/pref_title_blurred_album_art"
app:enableCopying="true" />
android:title="@string/pref_title_blurred_album_art" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="lock_screen"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_lock_screen"
android:title="@string/pref_title_lock_screen"
app:enableCopying="true" />
android:title="@string/pref_title_lock_screen" />
</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
</androidx.preference.PreferenceScreen>