refactor(Scout): use generateViewId
This commit is contained in:
parent
0d85c985fb
commit
648ea075c6
1 changed files with 4 additions and 3 deletions
|
|
@ -1,14 +1,15 @@
|
||||||
package moe.lava.awoocord.scout.ui
|
package moe.lava.awoocord.scout.ui
|
||||||
|
|
||||||
import android.content.res.Resources
|
import android.content.res.Resources
|
||||||
|
import android.view.View
|
||||||
import androidx.annotation.DrawableRes
|
import androidx.annotation.DrawableRes
|
||||||
import androidx.core.content.res.ResourcesCompat
|
import androidx.core.content.res.ResourcesCompat
|
||||||
|
|
||||||
class ScoutResource(private val resources: Resources) {
|
class ScoutResource(private val resources: Resources) {
|
||||||
companion object {
|
companion object {
|
||||||
const val SORT_FILTER = 0xfffffff0.toInt()
|
val SORT_FILTER = View.generateViewId()
|
||||||
const val SORT_ANSWER = 0xfffffff1.toInt()
|
val SORT_ANSWER = View.generateViewId()
|
||||||
const val EXCLUDE_FILTER = 0xfffffff2.toInt()
|
val EXCLUDE_FILTER = View.generateViewId()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getId(name: String, type: String) =
|
fun getId(name: String, type: String) =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue