|
|
@ -96,6 +96,7 @@ class TabViewHolder(
|
|
|
|
updateSelected(tab.selected ?: false)
|
|
|
|
updateSelected(tab.selected ?: false)
|
|
|
|
updatePlayPauseButton(tab.mediaState ?: MediaState.None)
|
|
|
|
updatePlayPauseButton(tab.mediaState ?: MediaState.None)
|
|
|
|
item_tab.transitionName = "$TAB_ITEM_TRANSITION_NAME${tab.sessionId}"
|
|
|
|
item_tab.transitionName = "$TAB_ITEM_TRANSITION_NAME${tab.sessionId}"
|
|
|
|
|
|
|
|
updateCloseButtonDescription(tab.title)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
internal fun updatePlayPauseButton(mediaState: MediaState) {
|
|
|
|
internal fun updatePlayPauseButton(mediaState: MediaState) {
|
|
|
@ -136,6 +137,10 @@ class TabViewHolder(
|
|
|
|
internal fun updateSelected(selected: Boolean) {
|
|
|
|
internal fun updateSelected(selected: Boolean) {
|
|
|
|
selected_border.visibility = if (selected) View.VISIBLE else View.GONE
|
|
|
|
selected_border.visibility = if (selected) View.VISIBLE else View.GONE
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private fun updateCloseButtonDescription(title: String) {
|
|
|
|
|
|
|
|
close_tab_button.contentDescription =
|
|
|
|
|
|
|
|
close_tab_button.context.getString(R.string.close_tab_title, title)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
companion object {
|
|
|
|
companion object {
|
|
|
|
private const val TAB_ITEM_TRANSITION_NAME = "tab_item"
|
|
|
|
private const val TAB_ITEM_TRANSITION_NAME = "tab_item"
|
|
|
|