strings: use bullets instead of slashes
Use bullets instead of slashes when seperating names. This is mostly for accessibility, as screen readers will handle bullets better than slashes.
This commit is contained in:
parent
b9658c698b
commit
34ac629659
5 changed files with 15 additions and 16 deletions
|
@ -71,6 +71,7 @@ dependencies {
|
||||||
implementation "androidx.recyclerview:recyclerview:1.2.1"
|
implementation "androidx.recyclerview:recyclerview:1.2.1"
|
||||||
implementation "androidx.constraintlayout:constraintlayout:2.1.0"
|
implementation "androidx.constraintlayout:constraintlayout:2.1.0"
|
||||||
implementation "androidx.dynamicanimation:dynamicanimation:1.0.0"
|
implementation "androidx.dynamicanimation:dynamicanimation:1.0.0"
|
||||||
|
implementation "androidx.viewpager2:viewpager2:1.1.0-beta01"
|
||||||
|
|
||||||
// Lifecycle
|
// Lifecycle
|
||||||
def lifecycle_version = "2.3.1"
|
def lifecycle_version = "2.3.1"
|
||||||
|
|
|
@ -32,8 +32,8 @@ import kotlin.math.min
|
||||||
import kotlin.math.sign
|
import kotlin.math.sign
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Drag callback used by the queue recyclerview. Delivers updates to [PlaybackViewModel]
|
* A highly customized [ItemTouchHelper.Callback] that handles queue item moving, removal, and some
|
||||||
* and [QueueAdapter] simultaneously.
|
* of the UI magic that makes up the queue UI.
|
||||||
* @author OxygenCobalt
|
* @author OxygenCobalt
|
||||||
*/
|
*/
|
||||||
class QueueDragCallback(
|
class QueueDragCallback(
|
||||||
|
@ -104,9 +104,8 @@ class QueueDragCallback(
|
||||||
) {
|
) {
|
||||||
// The material design page on elevation has a cool example of draggable items elevating
|
// The material design page on elevation has a cool example of draggable items elevating
|
||||||
// themselves when being dragged. Too bad google's implementation of this doesn't even
|
// themselves when being dragged. Too bad google's implementation of this doesn't even
|
||||||
// work :^). To emulate it on my own, I check if this child is in a drag state and
|
// work! To emulate it on my own, I check if this child is in a drag state and then animate
|
||||||
// then animate an elevation change. This animation also changes the background so that
|
// an elevation change.
|
||||||
// the item will actually draw over.
|
|
||||||
// TODO: Maybe restrict the item from being drawn over the recycler bounds?
|
// TODO: Maybe restrict the item from being drawn over the recycler bounds?
|
||||||
// Seems like its possible with enough UI magic
|
// Seems like its possible with enough UI magic
|
||||||
|
|
||||||
|
@ -114,7 +113,6 @@ class QueueDragCallback(
|
||||||
|
|
||||||
if (shouldLift && isCurrentlyActive && actionState == ItemTouchHelper.ACTION_STATE_DRAG) {
|
if (shouldLift && isCurrentlyActive && actionState == ItemTouchHelper.ACTION_STATE_DRAG) {
|
||||||
view.animate()
|
view.animate()
|
||||||
.withStartAction { view.setBackgroundResource(R.color.surface) }
|
|
||||||
.translationZ(view.resources.getDimension(R.dimen.elevation_small))
|
.translationZ(view.resources.getDimension(R.dimen.elevation_small))
|
||||||
.setDuration(100)
|
.setDuration(100)
|
||||||
.setInterpolator(AccelerateDecelerateInterpolator())
|
.setInterpolator(AccelerateDecelerateInterpolator())
|
||||||
|
@ -123,18 +121,16 @@ class QueueDragCallback(
|
||||||
shouldLift = false
|
shouldLift = false
|
||||||
}
|
}
|
||||||
|
|
||||||
super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive)
|
view.translationX = dX
|
||||||
|
view.translationY = dY
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun clearView(recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder) {
|
override fun clearView(recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder) {
|
||||||
// When an elevated item is cleared, we reset the elevation using another animation
|
// When an elevated item is cleared, we reset the elevation using another animation.
|
||||||
// and set the background to null again so a seam doesn't show up in further actions.
|
|
||||||
|
|
||||||
val view = viewHolder.itemView
|
val view = viewHolder.itemView
|
||||||
|
|
||||||
if (view.translationZ != 0.0f) {
|
if (view.translationZ != 0.0f) {
|
||||||
view.animate()
|
view.animate()
|
||||||
.withEndAction { view.setBackgroundResource(android.R.color.transparent) }
|
|
||||||
.translationZ(0.0f)
|
.translationZ(0.0f)
|
||||||
.setDuration(100)
|
.setDuration(100)
|
||||||
.setInterpolator(AccelerateDecelerateInterpolator())
|
.setInterpolator(AccelerateDecelerateInterpolator())
|
||||||
|
@ -143,7 +139,8 @@ class QueueDragCallback(
|
||||||
|
|
||||||
shouldLift = true
|
shouldLift = true
|
||||||
|
|
||||||
super.clearView(recyclerView, viewHolder)
|
view.translationX = 0f
|
||||||
|
view.translationY = 0f
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onMove(
|
override fun onMove(
|
||||||
|
|
|
@ -13,7 +13,8 @@
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/colorSurface">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/album_cover"
|
android:id="@+id/album_cover"
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
<string name="info_app_name" translatable="false">Auxio</string>
|
<string name="info_app_name" translatable="false">Auxio</string>
|
||||||
|
|
||||||
<!-- Format Namespace | Value formatting/plurals -->
|
<!-- Format Namespace | Value formatting/plurals -->
|
||||||
<string name="format_info" translatable="false">%1$s / %2$s</string>
|
<string name="format_info" translatable="false">%1$s • %2$s</string>
|
||||||
<string name="format_double_info" translatable="false">%1$s / %2$s / %3$s</string>
|
<string name="format_double_info" translatable="false">%1$s • %2$s • %3$s</string>
|
||||||
<string name="format_double_counts" translatable="false">%1$s, %2$s</string>
|
<string name="format_double_counts" translatable="false">%1$s, %2$s</string>
|
||||||
<string name="format_accent_summary" translatable="false"><b>%1$s</b>: %2$s</string>
|
<string name="format_accent_summary" translatable="false"><b>%1$s</b>: %2$s</string>
|
||||||
</resources>
|
</resources>
|
|
@ -1,6 +1,6 @@
|
||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = "1.5.21"
|
ext.kotlin_version = '1.5.30'
|
||||||
ext.navigation_version = "2.3.5"
|
ext.navigation_version = "2.3.5"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
|
Loading…
Reference in a new issue