Skip to content

Commit

Permalink
ADS: Framework related colors (#2567)
Browse files Browse the repository at this point in the history
Task/Issue URL:
https://app.asana.com/0/1174433894299346/1203412677059168
 
### Description
Update toolbar, statusbar and navigation bar colors to latest spec

### UI changes

| Light  | Dark|
| ------ | ----- |

![Screenshot_20221125_151024](https://user-images.githubusercontent.com/531613/204002612-76f95631-0dea-4bb4-a84a-251150a0dfb5.png)|![Screenshot_20221125_150923](https://user-images.githubusercontent.com/531613/204002617-3e850e89-1ea1-416d-b97a-b1b1fc790278.png)|

Co-authored-by: Noelia Alcala <nalcalag@gmail.com>
  • Loading branch information
2 people authored and aitorvs committed Dec 13, 2022
1 parent 6c2c9f5 commit 8ecc230
Show file tree
Hide file tree
Showing 28 changed files with 221 additions and 738 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ internal class TrackersLottieAssetDelegate(
}

private val textPaint = Paint(Paint.ANTI_ALIAS_FLAG).apply {
color = context.getColorFromAttr(com.duckduckgo.mobile.android.R.attr.omnibarRoundedFieldBackgroundColor)
color = context.getColorFromAttr(com.duckduckgo.mobile.android.R.attr.daxColorContainer)
typeface = Typeface.SANS_SERIF
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ class GlobalPrivacyControlActivity : DuckDuckGoActivity() {
gpcSpannableString.getSpanFlags(it),
)
removeSpan(it)
trim()
}
}
binding.globalPrivacyControlDescription.apply {
Expand Down
150 changes: 82 additions & 68 deletions app/src/main/res/layout/activity_accessibility_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,100 +14,114 @@
~ limitations under the License.
-->

<LinearLayout 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:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.coordinatorlayout.widget.CoordinatorLayout 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:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.duckduckgo.app.accessibility.AccessibilityActivity">

<include
android:id="@+id/includeToolbar"
layout="@layout/include_default_toolbar" />
android:id="@+id/includeToolbar"
layout="@layout/include_default_toolbar"/>

<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:ignore="Overdraw">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="@dimen/keyline_4">
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:ignore="Overdraw">

<com.duckduckgo.mobile.android.ui.view.listitem.TwoLineListItem
android:id="@+id/appFontSizeToggle"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:primaryText="@string/accessibilityTextSizeOverrideTitle"
app:secondaryText="@string/accessibilityTextSizeOverrideSubtitle"
app:showSwitch="true" />
android:paddingTop="@dimen/keyline_4"
android:paddingBottom="@dimen/keyline_4"
android:orientation="vertical">

<com.duckduckgo.mobile.android.ui.view.listitem.TwoLineListItem
android:id="@+id/appFontSizeToggle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:secondaryText="@string/accessibilityTextSizeOverrideSubtitle"
app:primaryText="@string/accessibilityTextSizeOverrideTitle"
app:showSwitch="true"/>

<LinearLayout
android:id="@+id/fontSizeSettingsGroup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:ignore="Overdraw">
android:id="@+id/fontSizeSettingsGroup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:ignore="Overdraw">

<LinearLayout
<com.duckduckgo.mobile.android.ui.view.text.SectionHeaderTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/keyline_4"
android:paddingStart="@dimen/keyline_4"
android:paddingEnd="@dimen/keyline_4">
android:paddingEnd="@dimen/keyline_4"
android:text="@string/accessibilityFontSizeTitle"
tools:text="Text goes here"/>

<com.duckduckgo.mobile.android.ui.view.text.DaxTextView
android:id="@+id/accessibilitySliderValue"
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:minWidth="50dp"
app:typography="body1" />
android:orientation="horizontal"
android:paddingStart="@dimen/keyline_4"
android:paddingEnd="@dimen/keyline_4">

<TextView
android:id="@+id/accessibilitySliderValue"
style="@style/TextAppearance.DuckDuckGo.Body1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center_vertical|start"
android:minWidth="50dp"
android:textColor="?attr/normalTextColor"/>

<com.google.android.material.slider.Slider
android:id="@+id/accessibilitySlider"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingTop="@dimen/keyline_4"
android:paddingBottom="@dimen/keyline_4"
android:stepSize="10"
android:valueFrom="70"
android:valueTo="170"
app:labelBehavior="gone"
app:tickVisible="false" />
android:id="@+id/accessibilitySlider"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingTop="@dimen/keyline_4"
android:paddingBottom="@dimen/keyline_4"
android:stepSize="10"
android:valueFrom="70"
android:valueTo="170"
app:labelBehavior="gone"
app:tickVisible="false"/>
</LinearLayout>

<com.duckduckgo.mobile.android.ui.view.text.DaxTextView
android:id="@+id/accessibilityHint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/keyline_4"
android:layout_marginTop="@dimen/keyline_4"
android:layout_marginEnd="@dimen/keyline_4"
android:layout_marginBottom="16dp"
android:background="@drawable/background_text_view_container"
android:padding="@dimen/keyline_4"
android:text="@string/accessibilityFontSizeHint"
app:typography="body1" />
<TextView
android:id="@+id/accessibilityHint"
style="@style/TextAppearance.DuckDuckGo.Body1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginStart="@dimen/keyline_4"
android:layout_marginTop="@dimen/keyline_4"
android:layout_marginEnd="@dimen/keyline_4"
android:background="?lightContainerBackground"
android:ellipsize="end"
android:padding="@dimen/keyline_2"
android:text="@string/accessibilityFontSizeHint"
android:textColor="?attr/normalTextColor"/>
</LinearLayout>

<com.duckduckgo.mobile.android.ui.view.divider.HorizontalDivider
android:id="@+id/accessibilityDivider"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:id="@+id/accessibilityDivider"/>

<com.duckduckgo.mobile.android.ui.view.listitem.TwoLineListItem
android:id="@+id/forceZoomToggle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:primaryText="@string/accessibilityForceZoomTitle"
app:secondaryText="@string/accessibilityForceZoomSubtitle"
app:showSwitch="true" />
android:id="@+id/forceZoomToggle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:secondaryText="@string/accessibilityForceZoomSubtitle"
app:primaryText="@string/accessibilityForceZoomTitle"
app:showSwitch="true"/>

</LinearLayout>
</ScrollView>
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
49 changes: 31 additions & 18 deletions app/src/main/res/layout/activity_global_privacy_control.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,42 @@
-->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.duckduckgo.app.globalprivacycontrol.ui.GlobalPrivacyControlActivity">

<include
android:id="@+id/includeToolbar"
layout="@layout/include_default_toolbar" />

<com.duckduckgo.mobile.android.ui.view.text.DaxTextView
android:id="@+id/globalPrivacyControlDescription"
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/keyline_4"
android:text="@string/globalPrivacyControlDescription"
app:textType="secondary"
app:typography="body2" />

<com.duckduckgo.mobile.android.ui.view.listitem.OneLineListItem
android:id="@+id/globalPrivacyControlToggle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:primaryText="@string/globalPrivacyControlToggle"
app:showSwitch="true" />
android:layout_height="match_parent">

<com.google.android.material.textview.MaterialTextView
android:id="@+id/globalPrivacyControlDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:layout_margin="16dp"
android:paddingTop="12dp"
android:lineSpacingExtra="4sp"
android:text="@string/globalPrivacyControlDescription"
android:textColor="?attr/settingsMinorTextColor"
android:textSize="14sp"
android:textStyle="normal" />

<com.duckduckgo.mobile.android.ui.view.listitem.OneLineListItem
android:id="@+id/globalPrivacyControlToggle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:primaryText="@string/globalPrivacyControlToggle"
app:showSwitch="true"/>

</LinearLayout>

</LinearLayout>
1 change: 1 addition & 0 deletions app/src/main/res/layout/include_new_browser_tab.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:clipChildren="false"
tools:context="com.duckduckgo.app.browser.BrowserActivity"
tools:showIn="@layout/fragment_browser_tab">

Expand Down
1 change: 0 additions & 1 deletion autoconsent/autoconsent-impl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ dependencies {
implementation AndroidX.appCompat
implementation JakeWharton.timber
implementation KotlinX.coroutines.core
implementation Google.android.material

testImplementation (KotlinX.coroutines.test) {
// https://github.com/Kotlin/kotlinx.coroutines/issues/2023
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,34 @@
-->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">

<include
android:id="@+id/includeToolbar"
layout="@layout/include_default_toolbar" />
layout="@layout/include_default_toolbar"/>

<com.duckduckgo.mobile.android.ui.view.text.DaxTextView
<TextView
android:id="@+id/autoconsentDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/keyline_4"
style="@style/TextAppearance.AppCompat.Body2"
android:fontFamily="sans-serif"
android:layout_margin="16dp"
android:paddingTop="12dp"
android:lineSpacingExtra="4sp"
android:text="@string/autoconsentDescription"
app:textType="secondary"
app:typography="body2" />
android:textColor="?attr/settingsMinorTextColor"
android:textSize="14sp"
android:textStyle="normal"/>

<com.duckduckgo.mobile.android.ui.view.listitem.OneLineListItem
android:id="@+id/autoconsentToggle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:primaryText="@string/autoconsentToggle"
app:primaryTextTruncated="false"
app:showSwitch="true" />
app:showSwitch="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>

</LinearLayout>

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ import com.duckduckgo.autofill.store.RealAutofillPrefsStore
import com.duckduckgo.autofill.store.RealInternalTestUserStore
import com.duckduckgo.autofill.store.RealLastUpdatedTimeProvider
import com.duckduckgo.autofill.store.SecureStoreBackedAutofillStore
import com.duckduckgo.autofill.store.urlmatcher.AutofillDomainNameUrlMatcher
import com.duckduckgo.autofill.ui.urlmatcher.AutofillUrlMatcher
import com.duckduckgo.di.scopes.AppScope
import com.duckduckgo.securestorage.api.SecureStorage
import com.squareup.anvil.annotations.ContributesTo
Expand All @@ -46,17 +44,12 @@ class AutofillModule {
secureStorage: SecureStorage,
context: Context,
internalTestUserChecker: InternalTestUserChecker,
autofillUrlMatcher: AutofillUrlMatcher,
): AutofillStore {
return SecureStoreBackedAutofillStore(
secureStorage = secureStorage,
internalTestUserChecker = internalTestUserChecker,
lastUpdatedTimeProvider = RealLastUpdatedTimeProvider(),
autofillPrefsStore = RealAutofillPrefsStore(context, internalTestUserChecker),
autofillUrlMatcher = autofillUrlMatcher,
secureStorage,
internalTestUserChecker,
RealLastUpdatedTimeProvider(),
RealAutofillPrefsStore(context, internalTestUserChecker),
)
}

@Provides
fun provideAutofillUrlMatcher(): AutofillUrlMatcher = AutofillDomainNameUrlMatcher()
}
Loading

0 comments on commit 8ecc230

Please sign in to comment.