Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ademirqueiroga
Created February 6, 2023 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ademirqueiroga/5ce13fd3d45cdfff7ea6d51b115a588d to your computer and use it in GitHub Desktop.
Save ademirqueiroga/5ce13fd3d45cdfff7ea6d51b115a588d to your computer and use it in GitHub Desktop.
MyListAction.kt
class MyListAction(context: Context) : MultiAction(R.id.tv_my_list_action) {
init {
val drawables = arrayOf(
context.getDrawable(R.drawable.playback_controls_my_list_add),
context.getDrawable(R.drawable.playback_controls_my_list_remove),
)
setDrawables(drawables)
val labels = arrayOf(
context.getString(R.string.playback_controls_my_list_add),
context.getString(R.string.playback_controls_my_list_remove),
)
setLabels(labels)
}
companion object {
const val INDEX_ADD = 0
const val INDEX_REMOVE = 1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment