Closed gabrielluong closed 4 years ago
Note: Fenix uses:
addItemDecoration(
DividerItemDecoration(
context,
DividerItemDecoration.VERTICAL
)
)
I will note that the designs doesn't actually have a perfect vertical divider. There is an offset and begins wherever the title starts.
@boek Should we use this programmatic DividerItemDecoration
or can we put a 1dp
view with constraints and a background color to make it look as it should?
Fenix uses a basic view for dividers, so we could do something like this:
<View
android:id="@+id/divider"
android:layout_width="0dp"
android:layout_height="1dp"
android:background="#ff0000"
app:layout_constraintEnd_toStartOf="@id/mozac_browser_tabstray_close"
app:layout_constraintStart_toEndOf="@id/mozac_browser_tabstray_thumbnail"
app:layout_constraintTop_toTopOf="parent"
android:importantForAccessibility="no" />
@boek Should we use this programmatic
DividerItemDecoration
or can we put a1dp
view with constraints and a background color to make it look as it should?
Please do not do this, it's a big performance loss.
Probably not worthwhile, closing this issue.
In BrowserActivity.kt, you have a reference to the BrowserTabsTray which is a RecyclerView so you can call tray.addItemDecoration(..) and define the ItemDecoration you need to show the divider.