Skip to content

Commit

Permalink
ADS: Browser Toolbar and Overlays (#2589)
Browse files Browse the repository at this point in the history
Task/Issue URL:
https://app.asana.com/0/1174433894299346/1203310952591148

Design Review in
https://app.asana.com/0/1174433894299346/1203455585574660

Co-authored-by: Noelia Alcala <nalcalag@gmail.com>
  • Loading branch information
malmstein and nalcalag committed Jan 12, 2023
1 parent e58663f commit 4e0f168
Show file tree
Hide file tree
Showing 119 changed files with 459 additions and 484 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
android:layout_width="?attr/actionBarSize"
android:layout_height="?attr/actionBarSize"
android:background="?selectableItemBackground"
android:src="@drawable/ic_close_24dp"
android:src="@drawable/ic_close_24"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="SpeakableTextPresentCheck"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<ImageView
android:id="@+id/closeButton"
android:src="@drawable/ic_close_24dp"
android:src="@drawable/ic_close_24"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:layout_width="wrap_content"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ sealed class BookmarkScreenViewHolders(itemView: View) : RecyclerView.ViewHolder

loadFavicon(bookmark.url, twoListItem.leadingIcon())

twoListItem.setTrailingIcon(R.drawable.ic_overflow)
twoListItem.setTrailingIcon(com.duckduckgo.mobile.android.R.drawable.ic_menu_vertical_24)
twoListItem.setTrailingIconClickListener { anchor ->
showOverFlowMenu(anchor, bookmark)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ sealed class FavoritesScreenViewHolders(itemView: View) : RecyclerView.ViewHolde

loadFavicon(favorite.url, listItem.leadingIcon())

listItem.setTrailingIcon(R.drawable.ic_overflow)
listItem.setTrailingIcon(com.duckduckgo.mobile.android.R.drawable.ic_menu_vertical_24)
listItem.setTrailingIconClickListener { anchor ->
showOverFlowMenu(anchor, favorite)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ abstract class SavedSiteDialogFragment : DialogFragment() {
}

private fun configureUpNavigation(toolbar: Toolbar) {
toolbar.setNavigationIcon(CommonR.drawable.ic_back_24)
toolbar.setNavigationIcon(CommonR.drawable.ic_arrow_left_24)
toolbar.setNavigationOnClickListener {
dismiss()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ import android.animation.Animator
import android.animation.AnimatorListenerAdapter
import android.content.Context
import android.util.AttributeSet
import android.widget.RelativeLayout
import android.widget.FrameLayout
import com.duckduckgo.app.browser.databinding.ViewTabSwitcherButtonBinding
import com.duckduckgo.mobile.android.ui.viewbinding.viewBinding

class TabSwitcherButton @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0,
) : RelativeLayout(context, attrs, defStyleAttr) {
) : FrameLayout(context, attrs, defStyleAttr) {

private val binding: ViewTabSwitcherButtonBinding by viewBinding()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ sealed class AutoCompleteViewHolder(itemView: View) : RecyclerView.ViewHolder(it
) = with(binding) {
phrase.text = item.phrase

val phraseOrUrlImage = if (item.isUrl) R.drawable.ic_globe_24dp else R.drawable.ic_loupe_24dp
val phraseOrUrlImage = if (item.isUrl) R.drawable.ic_globe_20 else R.drawable.ic_find_search_20
phraseOrUrlIndicator.setImageResource(phraseOrUrlImage)

editQueryImage.setOnClickListener { editableSearchClickListener(item) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class DownloadsAdapter @Inject constructor(
}
}

twoListItem.setTrailingIcon(R.drawable.ic_overflow)
twoListItem.setTrailingIcon(com.duckduckgo.mobile.android.R.drawable.ic_menu_vertical_24)
twoListItem.setTrailingIconClickListener { view ->
showPopupMenu(view, item)
}
Expand Down
13 changes: 6 additions & 7 deletions app/src/main/res/drawable/ic_autocomplete_24dp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
-->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
android:width="20dp"
android:height="20dp"
android:viewportWidth="20"
android:viewportHeight="20">
<path
android:fillColor="?attr/toolbarIconColor"
android:fillType="nonZero"
android:pathData="M7.035,16.352c0.58,0 1.035,-0.466 1.035,-1.036V9.53l8.168,8.167a1.03,1.03 0,1 0,1.46 -1.46L9.53,8.07h5.786c0.57,0 1.036,-0.466 1.036,-1.035 0,-0.57 -0.466,-1.035 -1.036,-1.035h-8.28C6.465,6 6,6.466 6,7.035v8.281c0,0.57 0.466,1.036 1.035,1.036z" />
android:pathData="M15.25,4.5C15.664,4.5 16,4.164 16,3.75C16,3.336 15.664,3 15.25,3H3.75C3.336,3 3,3.336 3,3.75V15.25C3,15.664 3.336,16 3.75,16C4.164,16 4.5,15.664 4.5,15.25L4.5,5.561L15.47,16.53C15.763,16.823 16.237,16.823 16.53,16.53C16.823,16.237 16.823,15.763 16.53,15.47L5.561,4.5L15.25,4.5Z"
android:fillColor="?attr/daxColorPrimaryIcon"/>
</vector>
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
-->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="?toolbarIconColor"
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z" />
android:width="20dp"
android:height="20dp"
android:viewportWidth="20"
android:viewportHeight="20">
<path
android:pathData="M4,3.548C4,2.141 5.14,1 6.548,1h6.904C14.859,1 16,2.14 16,3.548v14.059c0,1.056 -1.136,1.722 -2.057,1.207L10,16.611l-3.943,2.203C5.135,19.329 4,18.663 4,17.607V3.548zM6.548,2.6c-0.524,0 -0.948,0.424 -0.948,0.948v13.689l3.726,-2.082c0.419,-0.234 0.93,-0.234 1.348,0l3.726,2.082V3.548c0,-0.524 -0.425,-0.948 -0.948,-0.948H6.548z"
android:fillColor="?attr/daxColorPrimaryIcon"
android:fillType="evenOdd"/>
</vector>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
~ Copyright (c) 2020 DuckDuckGo
~ Copyright (c) 2022 DuckDuckGo
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
Expand All @@ -20,6 +20,7 @@
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M19,11H7.83L12.71,6.12C13.1,5.73 13.1,5.09 12.71,4.7C12.32,4.31 11.69,4.31 11.3,4.7L4.71,11.29C4.32,11.68 4.32,12.31 4.71,12.7L11.3,19.29C11.69,19.68 12.32,19.68 12.71,19.29C13.1,18.9 13.1,18.27 12.71,17.88L7.83,13H19C19.55,13 20,12.55 20,12C20,11.45 19.55,11 19,11Z"
android:fillColor="?attr/toolbarIconColor"/>
android:pathData="M3.293,7.793C2.902,8.183 2.902,8.817 3.293,9.207L11.293,17.207C11.683,17.598 12.317,17.598 12.707,17.207L20.707,9.207C21.098,8.817 21.098,8.183 20.707,7.793C20.317,7.402 19.683,7.402 19.293,7.793L12,15.086L4.707,7.793C4.317,7.402 3.683,7.402 3.293,7.793Z"
android:fillColor="?attr/daxColorPrimaryIcon"
android:fillType="evenOdd"/>
</vector>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
~ Copyright (c) 2020 DuckDuckGo
~ Copyright (c) 2022 DuckDuckGo
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
Expand All @@ -20,6 +20,7 @@
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M18.3,5.71C17.91,5.32 17.28,5.32 16.89,5.71L12,10.59L7.11,5.7C6.72,5.31 6.09,5.31 5.7,5.7C5.31,6.09 5.31,6.72 5.7,7.11L10.59,12L5.7,16.89C5.31,17.28 5.31,17.91 5.7,18.3C6.09,18.69 6.72,18.69 7.11,18.3L12,13.41L16.89,18.3C17.28,18.69 17.91,18.69 18.3,18.3C18.69,17.91 18.69,17.28 18.3,16.89L13.41,12L18.3,7.11C18.68,6.73 18.68,6.09 18.3,5.71Z"
android:fillColor="?attr/toolbarIconColor"/>
android:pathData="M3.293,16.207C2.902,15.817 2.902,15.183 3.293,14.793L11.293,6.793C11.683,6.402 12.317,6.402 12.707,6.793L20.707,14.793C21.098,15.183 21.098,15.817 20.707,16.207C20.317,16.598 19.683,16.598 19.293,16.207L12,8.914L4.707,16.207C4.317,16.598 3.683,16.598 3.293,16.207Z"
android:fillColor="?attr/daxColorPrimaryIcon"
android:fillType="evenOdd"/>
</vector>
27 changes: 27 additions & 0 deletions app/src/main/res/drawable/ic_find_search_20.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!--
~ Copyright (c) 2022 DuckDuckGo
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="20dp"
android:height="20dp"
android:viewportWidth="20"
android:viewportHeight="20">
<path
android:pathData="M9,2C5.134,2 2,5.134 2,9C2,12.866 5.134,16 9,16C10.645,16 12.157,15.433 13.352,14.483L16.634,17.766C16.947,18.078 17.453,18.078 17.766,17.766C18.078,17.453 18.078,16.947 17.766,16.634L14.483,13.352C15.433,12.157 16,10.645 16,9C16,5.134 12.866,2 9,2ZM3.6,9C3.6,6.018 6.018,3.6 9,3.6C11.982,3.6 14.4,6.018 14.4,9C14.4,11.982 11.982,14.4 9,14.4C6.018,14.4 3.6,11.982 3.6,9Z"
android:fillColor="?attr/daxColorPrimaryIcon"
android:fillAlpha="0.5"
android:fillType="evenOdd"/>
</vector>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/ic_fire.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="?attr/toolbarIconColor"
android:fillColor="?attr/daxColorPrimaryIcon"
android:pathData="M10.208,22.307c-2.552,-0.843 -4.667,-2.904 -5.762,-6.043C2.818,11.79 6.172,8.23 6.172,8.23s-0.097,0.913 0.316,1.92c0.413,1.007 1.216,1.734 1.216,1.734S6.926,9.775 8.822,6.26c2.14,-3.959 6.855,-4.803 6.855,-4.803S14.486,3.356 15.02,5.3c0.414,1.453 1.094,2.156 1.848,4.123 0.754,2.015 0.632,3.116 0.632,3.116s0.22,-1.24 0.754,-2.084C19.42,8.603 21,8.159 21,8.159s-0.826,1.686 -0.631,3.958c0.145,1.664 0.388,3.585 -0.511,5.74 -0.706,1.71 -2.747,4.052 -5.615,4.685 1.653,-0.703 2.746,-2.343 2.625,-4.123 -0.073,-1.03 -0.705,-2.015 -1.385,-2.694 -0.413,2.6 -1.896,2.905 -1.896,2.905s0.85,-1.71 0.972,-3.608a5.997,5.997 0,0 0,-0.219 -2.342c-0.777,-2.694 -2.114,-3.42 -2.114,-3.42s0.438,1.568 -1.167,4.099c-1.119,1.757 -3.015,3.045 -2.942,5.669 0.05,1.405 0.9,2.6 2.091,3.28z" />
</vector>
26 changes: 26 additions & 0 deletions app/src/main/res/drawable/ic_globe_20.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!--
~ Copyright (c) 2022 DuckDuckGo
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="20dp"
android:height="20dp"
android:viewportWidth="20"
android:viewportHeight="20">
<path
android:pathData="M1.004,9.715C1.155,4.877 5.125,1 10,1C14.875,1 18.845,4.877 18.996,9.715C18.999,9.743 19,9.771 19,9.8C19,9.815 19,9.831 18.999,9.846C19,9.897 19,9.949 19,10C19,14.971 14.971,19 10,19C5.029,19 1,14.971 1,10C1,9.949 1,9.897 1.001,9.846C1,9.831 1,9.815 1,9.8C1,9.771 1.002,9.743 1.004,9.715ZM2.624,10.6C2.842,13.315 4.525,15.617 6.883,16.713C6.777,16.526 6.679,16.332 6.587,16.135C5.904,14.661 5.478,12.721 5.41,10.6H2.624ZM5.427,9H2.667C3.01,6.46 4.642,4.329 6.883,3.287C6.777,3.474 6.679,3.668 6.587,3.865C5.948,5.246 5.533,7.036 5.427,9ZM7.01,10.6C7.078,12.529 7.469,14.231 8.039,15.462C8.698,16.885 9.449,17.4 10,17.4C10.551,17.4 11.302,16.885 11.961,15.462C12.531,14.231 12.922,12.529 12.99,10.6H7.01ZM12.971,9H7.029C7.133,7.236 7.508,5.683 8.039,4.538C8.698,3.115 9.449,2.6 10,2.6C10.551,2.6 11.302,3.115 11.961,4.538C12.492,5.683 12.866,7.236 12.971,9ZM14.59,10.6C14.522,12.721 14.096,14.661 13.413,16.135C13.321,16.332 13.223,16.526 13.117,16.713C15.475,15.617 17.158,13.315 17.376,10.6H14.59ZM17.333,9H14.573C14.467,7.036 14.052,5.246 13.413,3.865C13.321,3.668 13.223,3.474 13.117,3.287C15.358,4.329 16.99,6.46 17.333,9Z"
android:fillColor="?attr/daxColorPrimaryIcon"
android:fillType="evenOdd"/>
</vector>
26 changes: 0 additions & 26 deletions app/src/main/res/drawable/ic_globe_24dp.xml

This file was deleted.

25 changes: 0 additions & 25 deletions app/src/main/res/drawable/ic_keyboard_arrow_down_24dp.xml

This file was deleted.

25 changes: 0 additions & 25 deletions app/src/main/res/drawable/ic_keyboard_arrow_up_24dp.xml

This file was deleted.

14 changes: 7 additions & 7 deletions app/src/main/res/drawable/ic_loupe_24dp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
-->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="?attr/toolbarIconColor"
android:fillType="nonZero"
android:pathData="M14.774,16.051a6.702,6.702 0,0 1,-8.716 -10.13,6.7 6.7,0 0,1 10.13,8.716l3.446,3.447a1,1 0,0 1,-1.414 1.414l-3.446,-3.447zM7.33,14.124a4.9,4.9 0,1 0,6.93 -6.93,4.9 4.9,0 0,0 -6.93,6.93z" />
android:pathData="M10.5,2C5.806,2 2,5.806 2,10.5C2,15.194 5.806,19 10.5,19C12.487,19 14.314,18.318 15.762,17.176L20.293,21.707C20.683,22.098 21.317,22.098 21.707,21.707C22.098,21.317 22.098,20.683 21.707,20.293L17.176,15.762C18.318,14.314 19,12.487 19,10.5C19,5.806 15.194,2 10.5,2ZM4,10.5C4,6.91 6.91,4 10.5,4C14.09,4 17,6.91 17,10.5C17,14.09 14.09,17 10.5,17C6.91,17 4,14.09 4,10.5Z"
android:fillColor="?attr/daxColorPrimaryIcon"
android:fillType="evenOdd"/>
</vector>
14 changes: 7 additions & 7 deletions app/src/main/res/drawable/ic_loupe_24dp_dark.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
-->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/white"
android:fillType="nonZero"
android:pathData="M14.774,16.051a6.702,6.702 0,0 1,-8.716 -10.13,6.7 6.7,0 0,1 10.13,8.716l3.446,3.447a1,1 0,0 1,-1.414 1.414l-3.446,-3.447zM7.33,14.124a4.9,4.9 0,1 0,6.93 -6.93,4.9 4.9,0 0,0 -6.93,6.93z" />
android:pathData="M10.5,2C5.806,2 2,5.806 2,10.5C2,15.194 5.806,19 10.5,19C12.487,19 14.314,18.318 15.762,17.176L20.293,21.707C20.683,22.098 21.317,22.098 21.707,21.707C22.098,21.317 22.098,20.683 21.707,20.293L17.176,15.762C18.318,14.314 19,12.487 19,10.5C19,5.806 15.194,2 10.5,2ZM4,10.5C4,6.91 6.91,4 10.5,4C14.09,4 17,6.91 17,10.5C17,14.09 14.09,17 10.5,17C6.91,17 4,14.09 4,10.5Z"
android:fillColor="?attr/daxColorWhite"
android:fillType="evenOdd"/>
</vector>
14 changes: 7 additions & 7 deletions app/src/main/res/drawable/ic_loupe_24dp_light.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
-->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/almostBlack"
android:fillType="nonZero"
android:pathData="M14.774,16.051a6.702,6.702 0,0 1,-8.716 -10.13,6.7 6.7,0 0,1 10.13,8.716l3.446,3.447a1,1 0,0 1,-1.414 1.414l-3.446,-3.447zM7.33,14.124a4.9,4.9 0,1 0,6.93 -6.93,4.9 4.9,0 0,0 -6.93,6.93z" />
android:pathData="M10.5,2C5.806,2 2,5.806 2,10.5C2,15.194 5.806,19 10.5,19C12.487,19 14.314,18.318 15.762,17.176L20.293,21.707C20.683,22.098 21.317,22.098 21.707,21.707C22.098,21.317 22.098,20.683 21.707,20.293L17.176,15.762C18.318,14.314 19,12.487 19,10.5C19,5.806 15.194,2 10.5,2ZM4,10.5C4,6.91 6.91,4 10.5,4C14.09,4 17,6.91 17,10.5C17,14.09 14.09,17 10.5,17C6.91,17 4,14.09 4,10.5Z"
android:fillColor="?attr/daxColorBlack"
android:fillType="evenOdd"/>
</vector>
Loading

0 comments on commit 4e0f168

Please sign in to comment.