mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2024-12-25 16:23:04 +01:00
fix #541, properly fill contentdescriptions of tabs
This commit is contained in:
parent
da6012202c
commit
ed56e1169f
@ -432,6 +432,7 @@ class MainActivity : SimpleActivity() {
|
||||
skippedTabs++
|
||||
} else {
|
||||
val tab = main_tabs_holder.newTab().setIcon(getTabIcon(index))
|
||||
tab.contentDescription = getTabContentDescription(index)
|
||||
main_tabs_holder.addTab(tab, index - skippedTabs, config.lastUsedViewPagerPage == index - skippedTabs)
|
||||
}
|
||||
}
|
||||
@ -479,6 +480,16 @@ class MainActivity : SimpleActivity() {
|
||||
return resources.getColoredDrawableWithColor(drawableId, config.textColor)
|
||||
}
|
||||
|
||||
private fun getTabContentDescription(position: Int): String {
|
||||
val stringId = when (position) {
|
||||
0 -> R.string.files_tab
|
||||
1 -> R.string.recent_files_tab
|
||||
else -> R.string.storage_analysis
|
||||
}
|
||||
|
||||
return resources.getString(stringId)
|
||||
}
|
||||
|
||||
private fun checkOTGPath() {
|
||||
ensureBackgroundThread {
|
||||
if (!config.wasOTGHandled && hasPermission(PERMISSION_WRITE_STORAGE) && hasOTGConnected() && config.OTGPath.isEmpty()) {
|
||||
|
Loading…
Reference in New Issue
Block a user