You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Updated action cards to be more colorful
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package com.topjohnwu.magisk.model.entity.recycler
|
||||
|
||||
import com.topjohnwu.magisk.R
|
||||
import com.topjohnwu.magisk.databinding.ComparableRvItem
|
||||
|
||||
sealed class TappableHeadlineItem : ComparableRvItem<TappableHeadlineItem>() {
|
||||
|
||||
abstract val title: Int
|
||||
abstract val icon: Int
|
||||
|
||||
override val layoutRes = R.layout.item_tappable_headline
|
||||
|
||||
override fun itemSameAs(other: TappableHeadlineItem) =
|
||||
this === other
|
||||
|
||||
override fun contentSameAs(other: TappableHeadlineItem) =
|
||||
title == other.title && icon == other.icon
|
||||
|
||||
// --- listener
|
||||
|
||||
interface Listener {
|
||||
|
||||
fun onItemPressed(item: TappableHeadlineItem)
|
||||
|
||||
}
|
||||
|
||||
// --- objects
|
||||
|
||||
object Hide : TappableHeadlineItem() {
|
||||
override val title = R.string.magisk_hide_md2
|
||||
override val icon = R.drawable.ic_hide_md2
|
||||
}
|
||||
|
||||
object Safetynet : TappableHeadlineItem() {
|
||||
override val title = R.string.safetyNet
|
||||
override val icon = R.drawable.ic_safetynet_md2
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user