Fetch list title from second values in arguments (#3327)
Previous code was: ``` for (i in tabs.indices) { // ... if (tabs[i].id == LIST) { tab.contentDescription = tabs[i].arguments[1] } else { tab.setContentDescription(tabs[i].text) } // ... ``` When I converted it over, `i` was replaced with `position`, but I misread `tab.contentDescription = tabs[i].arguments[1]` as `tab.contentDescription = tabs[i].arguments[i]`. Put the `1` back.
This commit is contained in:
parent
ab364712fe
commit
52c98749e6
1 changed files with 1 additions and 1 deletions
|
@ -697,7 +697,7 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidInje
|
||||||
tab: TabLayout.Tab, position: Int ->
|
tab: TabLayout.Tab, position: Int ->
|
||||||
tab.icon = AppCompatResources.getDrawable(this@MainActivity, tabs[position].icon)
|
tab.icon = AppCompatResources.getDrawable(this@MainActivity, tabs[position].icon)
|
||||||
tab.contentDescription = when (tabs[position].id) {
|
tab.contentDescription = when (tabs[position].id) {
|
||||||
LIST -> tabs[position].arguments[position]
|
LIST -> tabs[position].arguments[1]
|
||||||
else -> getString(tabs[position].text)
|
else -> getString(tabs[position].text)
|
||||||
}
|
}
|
||||||
}.also { it.attach() }
|
}.also { it.attach() }
|
||||||
|
|
Loading…
Reference in a new issue