Skip to content

Commit

Permalink
ADS: Fix Dax Bubble (#2706)
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/1157893581871903/1203641318924982

### Description
This PR fixes. the issue in Android 8 where the dax bubble wasn't
appearing

### Steps to test this PR

_Fresh install_
- [ ] Fresh install
- [ ] Ensure Dax Bubble appears during onboarding
  • Loading branch information
malmstein committed Jan 12, 2023
1 parent 84b7e02 commit a41b936
Showing 1 changed file with 5 additions and 9 deletions.
Expand Up @@ -22,7 +22,6 @@ import android.util.AttributeSet
import com.duckduckgo.mobile.android.R
import com.duckduckgo.mobile.android.ui.view.getColorFromAttr
import com.google.android.material.card.MaterialCardView
import com.google.android.material.shape.MaterialShapeDrawable
import com.google.android.material.shape.ShapeAppearanceModel

class DaxBubbleCardView
Expand All @@ -39,13 +38,10 @@ constructor(
val distanceFromEdge = resources.getDimension(R.dimen.daxBubbleDialogDistanceFromEdge)
val edgeTreatment = DaxBubbleEdgeTreatment(cornerSize, distanceFromEdge)

background = MaterialShapeDrawable(
ShapeAppearanceModel.builder()
.setAllCornerSizes(cornderRadius)
.setTopEdge(edgeTreatment)
.build(),
).apply {
fillColor = ColorStateList.valueOf(context.getColorFromAttr(R.attr.daxColorSurface))
}
setCardBackgroundColor(ColorStateList.valueOf(context.getColorFromAttr(R.attr.daxColorSurface)))
shapeAppearanceModel = ShapeAppearanceModel.builder()
.setAllCornerSizes(cornderRadius)
.setTopEdge(edgeTreatment)
.build()
}
}

0 comments on commit a41b936

Please sign in to comment.