detail: drop playlist resorting for now
Don't really have the UI for it currently. It would require some kind of dialog instead of a popup menu, which is planned eventually.
This commit is contained in:
parent
572b0e52f8
commit
0597fa876c
2 changed files with 15 additions and 23 deletions
|
@ -24,7 +24,6 @@ import android.view.View
|
|||
import android.view.ViewGroup
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.appcompat.widget.TooltipCompat
|
||||
import androidx.core.view.isGone
|
||||
import androidx.core.view.isInvisible
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
|
@ -148,7 +147,11 @@ class PlaylistDetailListAdapter(private val listener: Listener) :
|
|||
*/
|
||||
data class EditHeader(@StringRes override val titleRes: Int) : Header
|
||||
|
||||
/** Displays an [EditHeader] and it's actions. Use [from] to create an instance. */
|
||||
/**
|
||||
* Displays an [EditHeader] and it's actions. Use [from] to create an instance.
|
||||
*
|
||||
* @author Alexander Capehart (OxygenCobalt)
|
||||
*/
|
||||
private class EditHeaderViewHolder private constructor(private val binding: ItemEditHeaderBinding) :
|
||||
RecyclerView.ViewHolder(binding.root), PlaylistDetailListAdapter.ViewHolder {
|
||||
/**
|
||||
|
@ -165,21 +168,10 @@ private class EditHeaderViewHolder private constructor(private val binding: Item
|
|||
TooltipCompat.setTooltipText(this, contentDescription)
|
||||
setOnClickListener { listener.onStartEdit() }
|
||||
}
|
||||
binding.headerSort.apply {
|
||||
TooltipCompat.setTooltipText(this, contentDescription)
|
||||
setOnClickListener(listener::onOpenSortMenu)
|
||||
}
|
||||
}
|
||||
|
||||
override fun updateEditing(editing: Boolean) {
|
||||
binding.headerEdit.apply {
|
||||
isGone = editing
|
||||
jumpDrawablesToCurrentState()
|
||||
}
|
||||
binding.headerSort.apply {
|
||||
isGone = !editing
|
||||
jumpDrawablesToCurrentState()
|
||||
}
|
||||
binding.headerEdit.isEnabled = !editing
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
|
|
@ -28,14 +28,14 @@
|
|||
app:icon="@drawable/ic_edit_24"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<org.oxycblt.auxio.ui.RippleFixMaterialButton
|
||||
android:id="@+id/header_sort"
|
||||
style="@style/Widget.Auxio.Button.Icon.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/spacing_mid_medium"
|
||||
android:contentDescription="@string/lbl_cancel"
|
||||
app:icon="@drawable/ic_sort_24"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
<!-- <org.oxycblt.auxio.ui.RippleFixMaterialButton-->
|
||||
<!-- android:id="@+id/header_sort"-->
|
||||
<!-- style="@style/Widget.Auxio.Button.Icon.Small"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginEnd="@dimen/spacing_mid_medium"-->
|
||||
<!-- android:contentDescription="@string/lbl_cancel"-->
|
||||
<!-- app:icon="@drawable/ic_sort_24"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent" />-->
|
||||
|
||||
</LinearLayout>
|
Loading…
Reference in a new issue