Skip to content

Commit

Permalink
ADS: Line Items Style update (#4619)
Browse files Browse the repository at this point in the history
Task/Issue URL:
https://app.asana.com/0/276630244458377/1206543781454793/f

### Description
Several updates to line items, switch and other screens in the app

### Steps to test this PR
https://app.asana.com/0/0/1207502672084300/f

### UI changes
https://app.asana.com/0/0/1207502672084300/f
  • Loading branch information
malmstein authored Jun 18, 2024
1 parent 6d27e34 commit 471d4e2
Show file tree
Hide file tree
Showing 38 changed files with 489 additions and 536 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ import androidx.lifecycle.lifecycleScope
import com.bumptech.glide.Glide
import com.duckduckgo.anvil.annotations.InjectWith
import com.duckduckgo.app.di.AppCoroutineScope
import com.duckduckgo.app.global.*
import com.duckduckgo.browser.api.ui.BrowserScreens.WebViewActivityWithParams
import com.duckduckgo.common.ui.DuckDuckGoActivity
import com.duckduckgo.common.ui.view.DaxSwitch
import com.duckduckgo.common.ui.view.InfoPanel
import com.duckduckgo.common.ui.view.SwitchView
import com.duckduckgo.common.ui.view.addClickableLink
import com.duckduckgo.common.ui.view.gone
import com.duckduckgo.common.ui.view.quietlySetIsChecked
Expand Down Expand Up @@ -233,7 +232,7 @@ class AppTPCompanyTrackersActivity : DuckDuckGoActivity() {
menuInflater.inflate(R.menu.menu_company_trackers_activity, menu)

val switchMenuItem = menu.findItem(R.id.deviceShieldSwitch)
appEnabledSwitch = switchMenuItem?.actionView as SwitchView
appEnabledSwitch = switchMenuItem?.actionView as DaxSwitch
appEnabledSwitch.setOnCheckedChangeListener(toggleAppSwitchListener)
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ import com.duckduckgo.appbuildconfig.api.AppBuildConfig
import com.duckduckgo.browser.api.ui.BrowserScreens.WebViewActivityWithParams
import com.duckduckgo.common.ui.DuckDuckGoActivity
import com.duckduckgo.common.ui.view.DaxDialogListener
import com.duckduckgo.common.ui.view.DaxSwitch
import com.duckduckgo.common.ui.view.InfoPanel.Companion.APPTP_SETTINGS_ANNOTATION
import com.duckduckgo.common.ui.view.InfoPanel.Companion.REPORT_ISSUES_ANNOTATION
import com.duckduckgo.common.ui.view.SwitchView
import com.duckduckgo.common.ui.view.TypewriterDaxDialog
import com.duckduckgo.common.ui.view.dialog.StackedAlertDialogBuilder
import com.duckduckgo.common.ui.view.dialog.TextAlertDialogBuilder
Expand Down Expand Up @@ -113,7 +113,7 @@ class DeviceShieldTrackerActivity :

private val binding: ActivityDeviceShieldActivityBinding by viewBinding()

private lateinit var deviceShieldSwitch: SwitchView
private lateinit var deviceShieldSwitch: DaxSwitch

// we might get an update before options menu has been populated; temporarily cache value to use when menu populated
private var vpnCachedState: VpnState? = null
Expand Down Expand Up @@ -596,7 +596,7 @@ class DeviceShieldTrackerActivity :
menuInflater.inflate(R.menu.menu_device_tracker_activity, menu)

val switchMenuItem = menu.findItem(R.id.deviceShieldSwitch)
deviceShieldSwitch = switchMenuItem?.actionView as SwitchView
deviceShieldSwitch = switchMenuItem?.actionView as DaxSwitch
deviceShieldSwitch.setOnCheckedChangeListener(enableAppTPSwitchListener)
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
~ limitations under the License.
-->

<com.duckduckgo.common.ui.view.SwitchView xmlns:android="http://schemas.android.com/apk/res/android"
<com.duckduckgo.common.ui.view.DaxSwitch xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/deviceShieldTrackerSwitch"
android:layout_width="wrap_content"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
android:gravity="center"
android:orientation="horizontal"
android:background="?attr/selectableItemBackground"
android:minHeight="@dimen/twoLineItemWithLargeImageHeight">
android:minHeight="@dimen/oneLineItemWithLargeImageHeight">

<ImageView
android:id="@+id/deviceShieldAppEntryIcon"
Expand Down Expand Up @@ -58,7 +58,7 @@
app:typography="caption"
tools:text="App issues may occur if enabled" />

<com.duckduckgo.common.ui.view.SwitchView
<com.duckduckgo.common.ui.view.DaxSwitch
android:id="@+id/deviceShieldAppEntryShieldEnabled"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -86,7 +86,7 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.541"
app:layout_constraintVertical_chainStyle="packed"
app:typography="h4"
app:typography="body1"
tools:text="Facebook" />

</androidx.constraintlayout.widget.ConstraintLayout>
295 changes: 0 additions & 295 deletions app/src/main/java/com/duckduckgo/app/bookmarks/ui/BookmarkListItem.kt

This file was deleted.

2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_appearance.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/changeIconCtaLabel"
app:typography="h4" />
app:typography="body1" />

<ImageView
android:id="@+id/changeAppIcon"
Expand Down
Loading

0 comments on commit 471d4e2

Please sign in to comment.