1
0
Fork 0

For #10201 - Provide proper button padding and no tabs message visibility in tabs tray

master
David Walsh 2020-04-24 13:48:54 -05:00 committed by Emily Kager
parent 87c95a64d3
commit 6afcd2cee6
2 changed files with 11 additions and 11 deletions

View File

@ -217,7 +217,8 @@ class TabTrayFragment : Fragment(R.layout.fragment_tab_tray), TabsTray.Observer,
private fun onTabsChanged() {
val hasNoTabs = getListOfSessions().toList().isEmpty()
view?.tab_tray_empty_view?.isVisible = !hasNoTabs
view?.tab_tray_empty_view?.isVisible = hasNoTabs
view?.tabsTray?.asView()?.isVisible = !hasNoTabs
view?.save_to_collection_button?.isVisible = !hasNoTabs
if (hasNoTabs) {

View File

@ -5,7 +5,6 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:mozac="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -36,15 +35,15 @@
mozac:tabsTraySelectedItemBackgroundColor="?tabTrayItemSelectedBackground"
mozac:tabsTraySelectedItemTextColor="?tabTrayItemSelectedText" />
<include
layout="@layout/save_to_collection_button"
android:id="@+id/save_to_collection_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="16dp"
android:paddingEnd="16dp"
app:layout_constraintBottom_toTopOf="@id/bottomBarShadow"
app:layout_constraintTop_toBottomOf="@+id/tabsTray" />
<include
layout="@layout/save_to_collection_button"
android:id="@+id/save_to_collection_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
app:layout_constraintBottom_toTopOf="@id/bottomBarShadow"
app:layout_constraintTop_toBottomOf="@+id/tabsTray" />
<View
android:id="@+id/bottomBarShadow"