For #10453: Use TabsTray API to set divider, avoiding related crashes.
parent
56e0dd8d6d
commit
58df38105b
|
@ -232,7 +232,6 @@ open class HomeActivity : LocaleAwareAppCompatActivity() {
|
||||||
tabsTray
|
tabsTray
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
val tray = BrowserTabsTray(context, attrs, tabsAdapter = adapter, layout = layout)
|
|
||||||
val decoration = DividerItemDecoration(
|
val decoration = DividerItemDecoration(
|
||||||
context,
|
context,
|
||||||
DividerItemDecoration.VERTICAL
|
DividerItemDecoration.VERTICAL
|
||||||
|
@ -240,9 +239,14 @@ open class HomeActivity : LocaleAwareAppCompatActivity() {
|
||||||
val drawable = AppCompatResources.getDrawable(context, R.drawable.tab_tray_divider)
|
val drawable = AppCompatResources.getDrawable(context, R.drawable.tab_tray_divider)
|
||||||
drawable?.let {
|
drawable?.let {
|
||||||
decoration.setDrawable(it)
|
decoration.setDrawable(it)
|
||||||
tray.addItemDecoration(decoration)
|
|
||||||
}
|
}
|
||||||
tray
|
BrowserTabsTray(
|
||||||
|
context,
|
||||||
|
attrs,
|
||||||
|
tabsAdapter = adapter,
|
||||||
|
layout = layout,
|
||||||
|
itemDecoration = decoration
|
||||||
|
)
|
||||||
}
|
}
|
||||||
else -> super.onCreateView(parent, name, context, attrs)
|
else -> super.onCreateView(parent, name, context, attrs)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue