Skip to content

Commit

Permalink
ADS: Manage Cookie Pop-ups migration (#2559)
Browse files Browse the repository at this point in the history
<!--
Note: This checklist is a reminder of our shared engineering
expectations.
The items in Bold are required
If your PR involves UI changes:
1. Upload screenshots or screencasts that illustrate the changes before
/ after
2. Add them under the UI changes section (feel free to add more columns
if needed)
    3. Make sure these changes are tested in API 23 and API 26
If your PR does not involve UI changes, you can remove the **UI
changes** section
-->

Task/Issue URL: https://app.asana.com/0/0/1203418963160799/f

### Description
Manage Cookie Pop-ups screen 100% migrated to new components

### Steps to test this PR

- Install from this branch
- Go to Settings > Manage Cookie Pop-ups
- [ ] Check screen looks as expected

### UI changes
| Before  | After |
| ------ | ----- |

![autoconsent_old_light](https://user-images.githubusercontent.com/20798495/203774974-082d4088-f957-4be8-81aa-7e8735eed21e.jpg)|![autoconsent_new_light](https://user-images.githubusercontent.com/20798495/203776081-2ea13174-f709-4b34-9473-933438dc33b6.jpg)|

![autoconsent_old_dark](https://user-images.githubusercontent.com/20798495/203774991-473012a1-a9c7-40a4-b97d-be230f07614a.jpg)|![autoconsent_new_dark](https://user-images.githubusercontent.com/20798495/203776142-97517f5c-c4c4-431d-a8b1-cf10dad3887d.jpg)|
  • Loading branch information
nalcalag authored and aitorvs committed Dec 13, 2022
1 parent 8fdee27 commit dee1454
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
1 change: 1 addition & 0 deletions autoconsent/autoconsent-impl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ 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,34 +15,30 @@
-->

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

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

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

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

</LinearLayout>
2 changes: 1 addition & 1 deletion common-ui/src/main/res/values/design-system-typograhy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

<style name="TextAppearance.DuckDuckGo.Body2">
<item name="android:textSize">14sp</item>
<item name="android:lineSpacingExtra">6sp</item>
<item name="android:lineSpacingExtra">3sp</item>
</style>

<style name="TextAppearance.DuckDuckGo.Button1">
Expand Down

0 comments on commit dee1454

Please sign in to comment.