1
0
Fork 0

For #11641: Update synced tabs view

master
Hakkı Kaan Çalışkan 2020-06-16 18:42:59 +03:00 committed by Emily Kager
parent e6a56aec36
commit 2cbd969e34
7 changed files with 49 additions and 37 deletions

View File

@ -6,7 +6,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/history_wrapper"
android:id="@+id/synced_tabs_wrapper"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ProgressBar
@ -43,7 +43,7 @@
android:id="@+id/synced_tabs_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:listitem="@layout/history_list_item"/>
tools:listitem="@layout/sync_tabs_list_item"/>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -8,34 +8,31 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="60dp"
android:paddingEnd="20dp"
android:minHeight="@dimen/library_item_height"
android:background="?android:attr/selectableItemBackground">
<TextView
android:id="@+id/synced_tab_item_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:ellipsize="end"
android:layout_marginStart="72dp"
android:layout_marginEnd="48dp"
android:layout_marginTop="6dp"
android:singleLine="true"
android:textAlignment="viewStart"
android:textColor="?primaryText"
android:textSize="18sp"
app:layout_constraintBottom_toTopOf="@+id/synced_tab_item_url"
android:textSize="16sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed"
tools:text="Tab Title" />
<TextView
android:id="@+id/synced_tab_item_url"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:ellipsize="end"
android:layout_marginStart="72dp"
android:layout_marginEnd="48dp"
android:layout_marginTop="2dp"
android:singleLine="true"
android:textAlignment="viewStart"
android:textColor="?secondaryText"
@ -43,21 +40,18 @@
tools:text="https://example.com/"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/synced_tab_item_title"
app:layout_constraintBottom_toBottomOf="parent" />
app:layout_constraintTop_toBottomOf="@+id/synced_tab_item_title" />
<View
android:id="@+id/synced_tab_item_separator"
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="7dp"
android:background="?syncedTabsSeparator"
android:importantForAccessibility="no"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:visibility="invisible"
app:layout_constraintEnd_toEndOf="parent"
android:background="?neutralFaded"
android:visibility="gone"/>
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/synced_tab_item_url" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -2,30 +2,39 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/synced_tabs_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="16dp"
android:paddingBottom="8dp"
android:paddingStart="16dp"
android:paddingEnd="16dp">
android:layout_marginTop="8dp">
<TextView
android:id="@+id/synced_tabs_group_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="15dp"
app:drawableStartCompat="@drawable/mozac_ic_device_desktop"
app:drawableTint="?primaryText"
android:textSize="17sp"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:drawablePadding="32dp"
android:textAppearance="@style/Header14TextStyle"
android:textColor="?primaryText"
android:paddingStart="20dp"
android:paddingEnd="0dp"
android:layout_marginBottom="8dp"
android:textSize="12sp"
android:gravity="center"
app:drawableStartCompat="@drawable/mozac_ic_device_desktop"
app:drawableTint="?primaryText"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="Header" />
</RelativeLayout>
<View
android:id="@+id/synced_tabs_group_separator"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="6dp"
android:background="?syncedTabsSeparator"
android:importantForAccessibility="no"
android:visibility="visible"
app:layout_constraintTop_toBottomOf="@+id/synced_tabs_group_name" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -64,6 +64,9 @@
<color name="top_site_border">@color/top_site_border_dark_theme</color>
<color name="top_site_title_text">@color/top_site_title_text_dark_theme</color>
<!-- Synced tabs colors-->
<color name="synced_tabs_separator">@color/synced_tabs_separator_dark_theme</color>
<!-- Collection icons-->
<color name="collection_icon_color_violet">@color/collection_icon_color_violet_dark_theme</color>
<color name="collection_icon_color_blue">@color/collection_icon_color_blue_dark_theme</color>

View File

@ -51,6 +51,7 @@
<attr name="addOnPrivateBrowsingInteriorIconBackground" format="reference"/>
<attr name="readerModeStartGradient" format="reference"/>
<attr name="readerModeEndGradient" format="reference"/>
<attr name="syncedTabsSeparator" format="reference"/>
<!-- Tab tray -->
<attr name="tabTrayItemBackground" format="reference" />

View File

@ -47,6 +47,7 @@
<color name="dark_grey_90_gradient_end">#0015141A</color>
<color name="top_site_background_light_theme">@android:color/white</color>
<color name="top_site_border_light_theme">@color/light_grey_30</color>
<color name="synced_tabs_separator_light_theme">@color/light_grey_30</color>
<color name="top_site_title_text_light_theme">@color/light_grey_80</color>
<color name="collection_icon_color_violet_light_theme">#7542E5</color>
<color name="collection_icon_color_blue_light_theme">#0250BB</color>
@ -104,6 +105,7 @@
<color name="scrimEnd_dark_theme">#F515141A</color>
<color name="top_site_background_dark_theme">@color/dark_grey_50</color>
<color name="top_site_border_dark_theme">@color/dark_grey_10</color>
<color name="synced_tabs_separator_dark_theme">@color/dark_grey_10</color>
<color name="top_site_title_text_dark_theme">@color/light_grey_90</color>
<color name="collection_icon_color_violet_dark_theme">#AB71FF</color>
<color name="collection_icon_color_blue_dark_theme">#00B3F4</color>
@ -250,6 +252,9 @@
<color name="top_site_border">@color/top_site_border_light_theme</color>
<color name="top_site_title_text">@color/top_site_title_text_light_theme</color>
<!-- Synced tabs colors-->
<color name="synced_tabs_separator">@color/synced_tabs_separator_light_theme</color>
<!-- Collection icons-->
<color name="collection_icon_color_violet">@color/collection_icon_color_violet_light_theme</color>
<color name="collection_icon_color_blue">@color/collection_icon_color_blue_light_theme</color>

View File

@ -75,7 +75,7 @@
<item name="mozacPromptLoginEditTextCursorColor">@color/prompt_login_edit_text_cursor_color_normal_theme</item>
<item name="readerModeStartGradient">@color/readermode_start_gradient_normal_theme</item>
<item name="readerModeEndGradient">@color/readermode_end_gradient_normal_theme</item>
<item name="syncedTabsSeparator">@color/synced_tabs_separator</item>
<item name="tabTrayItemBackground">@color/tab_tray_item_background_normal_theme</item>
<item name="tabTrayItemSelectedBackground">@color/tab_tray_item_selected_background_normal_theme</item>