Fix old issues
This commit is contained in:
parent
c6fc672cd1
commit
893f7fafdd
7 changed files with 23 additions and 14 deletions
|
@ -24,8 +24,8 @@ android {
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
|
|
||||||
applicationId "code.name.monkey.retromusic"
|
applicationId "code.name.monkey.retromusic"
|
||||||
versionCode 414
|
versionCode 416
|
||||||
versionName '3.4.970'
|
versionName '3.5.970'
|
||||||
|
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
|
|
||||||
|
@ -130,14 +130,14 @@ dependencies {
|
||||||
implementation "androidx.cardview:cardview:1.0.0"
|
implementation "androidx.cardview:cardview:1.0.0"
|
||||||
implementation "androidx.palette:palette:1.0.0"
|
implementation "androidx.palette:palette:1.0.0"
|
||||||
implementation 'androidx.palette:palette-ktx:1.0.0'
|
implementation 'androidx.palette:palette-ktx:1.0.0'
|
||||||
|
implementation "androidx.viewpager2:viewpager2:1.1.0-alpha01"
|
||||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||||
implementation 'androidx.annotation:annotation:1.1.0'
|
implementation 'androidx.annotation:annotation:1.1.0'
|
||||||
implementation 'androidx.preference:preference:1.1.0'
|
implementation 'androidx.preference:preference:1.1.0'
|
||||||
|
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||||
implementation 'androidx.core:core-ktx:1.2.0'
|
implementation 'androidx.core:core-ktx:1.2.0'
|
||||||
implementation 'androidx.fragment:fragment:1.2.2'
|
implementation 'androidx.fragment:fragment:1.2.4'
|
||||||
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||||||
|
|
||||||
implementation 'com.google.android.material:material:1.2.0-alpha05'
|
implementation 'com.google.android.material:material:1.2.0-alpha05'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name": "Hemanth Savarala",
|
"name": "Hemanth Savarala",
|
||||||
"summary": "Lead developer",
|
"summary": "Lead developer & Designer",
|
||||||
"link": "https://github.com/h4h13",
|
"link": "https://github.com/h4h13",
|
||||||
"profile_image": "https://i.imgur.com/AoVs9oj.jpg"
|
"profile_image": "https://i.imgur.com/AoVs9oj.jpg"
|
||||||
},
|
},
|
||||||
|
|
|
@ -97,10 +97,14 @@ class SongFileAdapter(
|
||||||
val error = RetroUtil.getTintedVectorDrawable(
|
val error = RetroUtil.getTintedVectorDrawable(
|
||||||
activity, R.drawable.ic_file_music_white_24dp, iconColor
|
activity, R.drawable.ic_file_music_white_24dp, iconColor
|
||||||
)
|
)
|
||||||
Glide.with(activity).load(AudioFileCover(file.path))
|
Glide.with(activity)
|
||||||
.diskCacheStrategy(DiskCacheStrategy.NONE).error(error).placeholder(error)
|
.load(AudioFileCover(file.path))
|
||||||
|
.diskCacheStrategy(DiskCacheStrategy.NONE)
|
||||||
|
.error(error)
|
||||||
|
.placeholder(error)
|
||||||
.animate(android.R.anim.fade_in)
|
.animate(android.R.anim.fade_in)
|
||||||
.signature(MediaStoreSignature("", file.lastModified(), 0)).into(holder.image)
|
.signature(MediaStoreSignature("", file.lastModified(), 0))
|
||||||
|
.into(holder.image)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,9 @@ public class MediaEntryViewHolder extends AbstractDraggableSwipeableItemViewHold
|
||||||
@Nullable
|
@Nullable
|
||||||
public ImageView image;
|
public ImageView image;
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
public ImageView playerImage;
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public ViewGroup imageContainer;
|
public ViewGroup imageContainer;
|
||||||
|
|
||||||
|
@ -84,6 +87,7 @@ public class MediaEntryViewHolder extends AbstractDraggableSwipeableItemViewHold
|
||||||
text = itemView.findViewById(R.id.text);
|
text = itemView.findViewById(R.id.text);
|
||||||
|
|
||||||
image = itemView.findViewById(R.id.image);
|
image = itemView.findViewById(R.id.image);
|
||||||
|
playerImage = itemView.findViewById(R.id.player_image);
|
||||||
time = itemView.findViewById(R.id.time);
|
time = itemView.findViewById(R.id.time);
|
||||||
|
|
||||||
imageText = itemView.findViewById(R.id.imageText);
|
imageText = itemView.findViewById(R.id.imageText);
|
||||||
|
|
|
@ -30,6 +30,7 @@ class SongsFragment :
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
App.musicComponent.inject(this)
|
App.musicComponent.inject(this)
|
||||||
|
retainInstance = true
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
@ -38,7 +39,6 @@ class SongsFragment :
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun createLayoutManager(): GridLayoutManager {
|
override fun createLayoutManager(): GridLayoutManager {
|
||||||
println("createLayoutManager: ${getGridSize()}")
|
|
||||||
return GridLayoutManager(requireActivity(), getGridSize()).apply {
|
return GridLayoutManager(requireActivity(), getGridSize()).apply {
|
||||||
spanSizeLookup = object : GridLayoutManager.SpanSizeLookup() {
|
spanSizeLookup = object : GridLayoutManager.SpanSizeLookup() {
|
||||||
override fun getSpanSize(position: Int): Int {
|
override fun getSpanSize(position: Int): Int {
|
||||||
|
|
|
@ -19,9 +19,10 @@ import android.content.res.ColorStateList
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import androidx.appcompat.widget.AppCompatImageView
|
import androidx.appcompat.widget.AppCompatImageView
|
||||||
|
import androidx.core.content.ContextCompat
|
||||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||||
|
import code.name.monkey.appthemehelper.util.ColorUtil
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
import code.name.monkey.retromusic.extensions.getAdaptiveIconDrawable
|
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||||
import code.name.monkey.retromusic.util.RetroColorUtil
|
import code.name.monkey.retromusic.util.RetroColorUtil
|
||||||
|
|
||||||
|
@ -44,16 +45,15 @@ class ColorIconsImageView @JvmOverloads constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setIconBackgroundColor(color: Int) {
|
fun setIconBackgroundColor(color: Int) {
|
||||||
background = getAdaptiveIconDrawable(context)
|
background = ContextCompat.getDrawable(context, R.drawable.color_circle_gradient)
|
||||||
if (ATHUtil.isWindowBackgroundDark(context) && PreferenceUtil.getInstance(context).desaturatedColor()) {
|
if (ATHUtil.isWindowBackgroundDark(context) && PreferenceUtil.getInstance(context).desaturatedColor()) {
|
||||||
val desaturatedColor = RetroColorUtil.desaturateColor(color, 0.4f)
|
val desaturatedColor = RetroColorUtil.desaturateColor(color, 0.4f)
|
||||||
backgroundTintList = ColorStateList.valueOf(desaturatedColor)
|
backgroundTintList = ColorStateList.valueOf(desaturatedColor)
|
||||||
imageTintList =
|
imageTintList =
|
||||||
ColorStateList.valueOf(ATHUtil.resolveColor(context, R.attr.colorSurface))
|
ColorStateList.valueOf(ATHUtil.resolveColor(context, R.attr.colorSurface))
|
||||||
} else {
|
} else {
|
||||||
backgroundTintList = ColorStateList.valueOf(color)
|
backgroundTintList = ColorStateList.valueOf(ColorUtil.adjustAlpha(color, 0.22f))
|
||||||
imageTintList =
|
imageTintList = ColorStateList.valueOf(ColorUtil.withAlpha(color, 0.75f))
|
||||||
ColorStateList.valueOf(ATHUtil.resolveColor(context, R.attr.colorSurface))
|
|
||||||
}
|
}
|
||||||
requestLayout()
|
requestLayout()
|
||||||
invalidate()
|
invalidate()
|
||||||
|
|
|
@ -844,4 +844,5 @@
|
||||||
<string name="start_payment">Start payment</string>
|
<string name="start_payment">Start payment</string>
|
||||||
<string name="pref_title_expand_now_playing_panel">Show now playing screen</string>
|
<string name="pref_title_expand_now_playing_panel">Show now playing screen</string>
|
||||||
<string name="pref_summary_expand_now_playing_panel">Clicking on the notification will show now playing screen instead of the home screen</string>
|
<string name="pref_summary_expand_now_playing_panel">Clicking on the notification will show now playing screen instead of the home screen</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue