Skip to content

Commit

Permalink
ADS: Tab Switcher (#2657)
Browse files Browse the repository at this point in the history
Task/Issue URL:
https://app.asana.com/0/1174433894299346/1203411647299664
Design Review Task: https://app.asana.com/0/0/1203569245422155/f

### Description
Update Tab switcher screen

Co-authored-by: Aitor Viana <aitorvs@gmail.com>
  • Loading branch information
malmstein and aitorvs committed Dec 20, 2022
1 parent 0e247be commit 005f410
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 69 deletions.
Expand Up @@ -38,7 +38,7 @@ class TabGridItemDecorator(
strokeWidth = BORDER_WIDTH

val typedValue = TypedValue()
context.theme.resolveAttribute(CommonR.attr.normalTextColor, typedValue, true)
context.theme.resolveAttribute(CommonR.attr.daxColorBackgroundInverted, typedValue, true)
color = ContextCompat.getColor(context, typedValue.resourceId)
}

Expand Down
26 changes: 0 additions & 26 deletions app/src/main/res/drawable/ic_close_tab.xml

This file was deleted.

2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_tab_switcher.xml
Expand Up @@ -18,7 +18,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorPrimaryDark"
android:background="?attr/daxColorBackground"
tools:context="com.duckduckgo.app.tabs.ui.TabSwitcherActivity">

<include layout="@layout/include_default_toolbar" />
Expand Down
15 changes: 4 additions & 11 deletions app/src/main/res/layout/item_tab.xml
Expand Up @@ -21,10 +21,7 @@
android:layout_marginStart="7dp"
android:layout_marginTop="6dp"
android:layout_marginEnd="7dp"
android:layout_marginBottom="10dp"
app:cardElevation="4dp"
app:cardBackgroundColor="?toolbarBgColor"
app:cardCornerRadius="6dp">
android:layout_marginBottom="10dp">

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cardContentsContainer"
Expand Down Expand Up @@ -67,24 +64,20 @@
android:background="?selectableItemBackground"
android:contentDescription="@string/closeContentDescription"
android:scaleType="center"
android:src="@drawable/ic_close_tab"
android:tint="?normalTextColor"
android:src="@drawable/ic_close_24"
app:layout_constraintBottom_toBottomOf="@id/favicon"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/favicon" />

<TextView
<com.duckduckgo.mobile.android.ui.view.text.DaxTextView
android:id="@+id/title"
app:typography="h5"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:fontFamily="sans-serif-medium"
android:ellipsize="end"
android:lines="1"
android:textColor="?attr/tabTitleTextColor"
android:textIsSelectable="false"
android:textSize="13sp"
android:textStyle="normal"
app:layout_constraintBottom_toBottomOf="@id/favicon"
app:layout_constraintEnd_toStartOf="@id/close"
app:layout_constraintStart_toEndOf="@id/favicon"
Expand Down
21 changes: 0 additions & 21 deletions common-ui/src/main/res/drawable/ic_baseline_close_24.xml

This file was deleted.

3 changes: 0 additions & 3 deletions common-ui/src/main/res/values/attrs.xml
Expand Up @@ -29,9 +29,6 @@
<attr name="omnibarLogoLetterTextColor" format="color" />
<attr name="autoCompleteTextColor" format="color" />
<attr name="autoCompleteSubtitleTextColor" format="color" />
<attr name="tabTitleTextColor" format="color" />
<attr name="tabTitleTextColorLegacy" format="color" />
<attr name="tabSubtitleTextColor" format="color" />
<attr name="tabSelectedBorderColor" format="color" />
<attr name="tabsFireTextColor" format="color" />
<attr name="tabCardBackgroundColor" format="color" />
Expand Down
6 changes: 0 additions & 6 deletions common-ui/src/main/res/values/design-system-theming.xml
Expand Up @@ -173,9 +173,6 @@
<item name="omnibarLogoLetterTextColor">@color/midGray</item>
<item name="autoCompleteTextColor">@color/white</item>
<item name="autoCompleteSubtitleTextColor">@color/grayish</item>
<item name="tabTitleTextColor">@color/white</item>
<item name="tabTitleTextColorLegacy">@color/midnight</item>
<item name="tabSubtitleTextColor">@color/coolGray</item>
<item name="tabSelectedBorderColor">@color/skyBlue</item>
<item name="tabsFireTextColor">@color/white</item>
<item name="tabCardBackgroundColor">@color/almostBlack</item>
Expand Down Expand Up @@ -316,9 +313,6 @@
<item name="omnibarLogoLetterTextColor">@color/whiteFour</item>
<item name="autoCompleteTextColor">@color/almostBlackDark</item>
<item name="autoCompleteSubtitleTextColor">@color/warmerGray</item>
<item name="tabTitleTextColor">@color/almostBlackDark</item>
<item name="tabTitleTextColorLegacy">@color/almostBlackDark</item>
<item name="tabSubtitleTextColor">@color/warmerGray</item>
<item name="tabSelectedBorderColor">@color/cornflowerBlue</item>
<item name="tabsFireTextColor">@color/warmerGray</item>
<item name="tabCardBackgroundColor">@color/white</item>
Expand Down

0 comments on commit 005f410

Please sign in to comment.