Fix color for list dialog
This commit is contained in:
parent
2fd6db60ac
commit
9fc6f6ab10
3 changed files with 34 additions and 4 deletions
|
@ -13,8 +13,8 @@ android {
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
|
|
||||||
applicationId "code.name.monkey.retromusic"
|
applicationId "code.name.monkey.retromusic"
|
||||||
versionCode 372
|
versionCode 375
|
||||||
versionName '3.4.000'
|
versionName '3.4.100-beta01'
|
||||||
|
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
package code.name.monkey.retromusic.fragments.base
|
package code.name.monkey.retromusic.fragments.base
|
||||||
|
|
||||||
|
import android.graphics.Canvas
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.annotation.NonNull
|
import androidx.annotation.NonNull
|
||||||
import androidx.annotation.StringRes
|
import androidx.annotation.StringRes
|
||||||
|
import androidx.core.view.ViewCompat
|
||||||
|
import androidx.recyclerview.widget.ItemTouchHelper
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import code.name.monkey.appthemehelper.ThemeStore
|
import code.name.monkey.appthemehelper.ThemeStore
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
|
@ -41,6 +44,33 @@ abstract class AbsLibraryPagerRecyclerViewFragment<A : RecyclerView.Adapter<*>,
|
||||||
}
|
}
|
||||||
recyclerView.layoutManager = layoutManager
|
recyclerView.layoutManager = layoutManager
|
||||||
recyclerView.adapter = adapter
|
recyclerView.adapter = adapter
|
||||||
|
|
||||||
|
val itemTouchHelper = ItemTouchHelper(object : ItemTouchHelper.Callback() {
|
||||||
|
override fun getMovementFlags(recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder): Int {
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onMove(recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder, target: RecyclerView.ViewHolder): Boolean {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onSwiped(viewHolder: RecyclerView.ViewHolder, direction: Int) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onChildDraw(c: Canvas, recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder, dX: Float, dY: Float, actionState: Int, isCurrentlyActive: Boolean) {
|
||||||
|
super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive)
|
||||||
|
ViewCompat.animate(viewHolder.itemView)
|
||||||
|
.scaleX(0.9f)
|
||||||
|
.scaleY(0.9f)
|
||||||
|
.start()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onChildDrawOver(c: Canvas, recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder?, dX: Float, dY: Float, actionState: Int, isCurrentlyActive: Boolean) {
|
||||||
|
super.onChildDrawOver(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
itemTouchHelper.attachToRecyclerView(recyclerView())
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun initAdapter() {
|
private fun initAdapter() {
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<item name="colorSurface">@color/darkColorSurface</item>
|
<item name="colorSurface">@color/darkColorSurface</item>
|
||||||
<item name="colorOnSurface">@color/mi_text_color_primary_dark</item>
|
<item name="colorOnSurface">@color/mi_text_color_primary_dark</item>
|
||||||
<item name="colorOnBackground">@color/mi_text_color_secondary_dark</item>
|
<item name="colorOnBackground">@color/mi_text_color_secondary_dark</item>
|
||||||
<item name="colorControlNormal">@color/mi_text_color_secondary_light</item>
|
<item name="colorControlNormal">@color/md_white_1000</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.RetroMusic.Base.Black" parent="@style/Theme.RetroMusic.Base">
|
<style name="Theme.RetroMusic.Base.Black" parent="@style/Theme.RetroMusic.Base">
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
<item name="colorSurface">@color/blackColorSurface</item>
|
<item name="colorSurface">@color/blackColorSurface</item>
|
||||||
<item name="colorOnSurface">@color/mi_text_color_primary_dark</item>
|
<item name="colorOnSurface">@color/mi_text_color_primary_dark</item>
|
||||||
<item name="colorOnBackground">@color/mi_text_color_secondary_dark</item>
|
<item name="colorOnBackground">@color/mi_text_color_secondary_dark</item>
|
||||||
<item name="colorControlNormal">@color/mi_text_color_secondary_light</item>
|
<item name="colorControlNormal">@color/md_white_1000</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.RetroMusic.Base.Light" parent="Theme.MaterialComponents.Light.NoActionBar">
|
<style name="Theme.RetroMusic.Base.Light" parent="Theme.MaterialComponents.Light.NoActionBar">
|
||||||
|
|
Loading…
Reference in a new issue