Skip to content

Commit

Permalink
replacing the ftue icons with only the foreground asset to allow for …
Browse files Browse the repository at this point in the history
…tinting

- making use of the generic circle shape the background, this allows the foreground and background layers to be tintable separately
  • Loading branch information
ouchadam committed Mar 7, 2022
1 parent b0c0828 commit 6ded764
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 17 deletions.
12 changes: 4 additions & 8 deletions vector/src/main/res/drawable/ic_celebration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,16 @@
android:height="70dp"
android:viewportWidth="70"
android:viewportHeight="70">
<path
android:pathData="M35,70C54.33,70 70,54.33 70,35C70,15.67 54.33,0 35,0C15.67,0 0,15.67 0,35C0,54.33 15.67,70 35,70Z"
android:fillColor="#0DBD8B"
android:fillType="evenOdd"/>
<path
android:pathData="M21,23L19,27L23,25L27,27L25,23L27,19L23,21L19,19L21,23Z"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#ffffff"
android:strokeColor="#ffffff"/>
android:fillColor="#FF0000"
android:strokeColor="#FF0000"/>
<path
android:pathData="M35.653,41.423L38.538,50.076L41.422,41.423L50.076,38.538L41.422,35.654L38.538,27L35.653,35.654L27,38.538L35.653,41.423Z"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#ffffff"
android:strokeColor="#ffffff"/>
android:fillColor="#FF0000"
android:strokeColor="#FF0000"/>
</vector>
22 changes: 22 additions & 0 deletions vector/src/main/res/drawable/ic_celebration_bg.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="70dp"
android:height="70dp"
android:viewportWidth="70"
android:viewportHeight="70">
<path
android:pathData="M35,70C54.33,70 70,54.33 70,35C70,15.67 54.33,0 35,0C15.67,0 0,15.67 0,35C0,54.33 15.67,70 35,70Z"
android:fillColor="#0DBD8B"
android:fillType="evenOdd"/>
<path
android:pathData="M21,23L19,27L23,25L27,27L25,23L27,19L23,21L19,19L21,23Z"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#ffffff"
android:strokeColor="#ffffff"/>
<path
android:pathData="M35.653,41.423L38.538,50.076L41.422,41.423L50.076,38.538L41.422,35.654L38.538,27L35.653,35.654L27,38.538L35.653,41.423Z"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#ffffff"
android:strokeColor="#ffffff"/>
</vector>
10 changes: 10 additions & 0 deletions vector/src/main/res/drawable/ic_user_fg.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="70dp"
android:height="70dp"
android:viewportWidth="70"
android:viewportHeight="70">
<path
android:pathData="M35,36.742C40.771,36.742 45.45,31.673 45.45,25.421C45.45,19.169 40.771,14.1 35,14.1C29.229,14.1 24.55,19.169 24.55,25.421C24.55,31.673 29.229,36.742 35,36.742ZM35,62.867C42.531,62.867 49.364,59.879 54.379,55.025C51.278,47.368 43.77,41.967 35,41.967C26.23,41.967 18.722,47.368 15.621,55.025C20.636,59.879 27.469,62.867 35,62.867Z"
android:fillColor="#FF0000"
android:fillType="evenOdd"/>
</vector>
8 changes: 5 additions & 3 deletions vector/src/main/res/layout/fragment_ftue_account_created.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,16 @@
android:layout_width="wrap_content"
android:layout_height="0dp"
android:adjustViewBounds="true"
android:background="@drawable/circle"
android:backgroundTint="@color/element_background_light"
android:importantForAccessibility="no"
android:src="@drawable/ic_user_round"
android:src="@drawable/ic_user_fg"
app:layout_constraintBottom_toTopOf="@id/accountCreatedSpace2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_percent="0.15"
app:layout_constraintHeight_percent="0.12"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/accountCreatedSpace1"
app:tint="@color/element_background_light" />
app:tint="?colorSecondary" />

<Space
android:id="@+id/accountCreatedSpace2"
Expand Down
8 changes: 5 additions & 3 deletions vector/src/main/res/layout/fragment_ftue_display_name.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@
android:layout_height="0dp"
android:adjustViewBounds="true"
android:contentDescription="@null"
android:src="@drawable/ic_user_round"
android:background="@drawable/circle"
android:backgroundTint="?colorSecondary"
android:src="@drawable/ic_user_fg"
app:layout_constraintBottom_toTopOf="@id/displayNameHeaderTitle"
app:layout_constraintEnd_toEndOf="@id/displayNameGutterEnd"
app:layout_constraintHeight_percent="0.15"
app:layout_constraintHeight_percent="0.12"
app:layout_constraintStart_toStartOf="@id/displayNameGutterStart"
app:layout_constraintTop_toTopOf="parent"
app:tint="?colorSecondary" />
app:tint="@color/palette_white" />

<TextView
android:id="@+id/displayNameHeaderTitle"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,16 @@
android:layout_width="wrap_content"
android:layout_height="0dp"
android:adjustViewBounds="true"
android:background="@drawable/circle"
android:backgroundTint="?colorSecondary"
android:importantForAccessibility="no"
android:src="@drawable/ic_celebration"
app:layout_constraintBottom_toTopOf="@id/personalizationCompleteSpace2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_percent="0.15"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/personalizationCompleteSpace1" />
app:layout_constraintTop_toBottomOf="@id/personalizationCompleteSpace1"
app:tint="@color/palette_white" />

<Space
android:id="@+id/personalizationCompleteSpace2"
Expand Down
4 changes: 2 additions & 2 deletions vector/src/main/res/layout/fragment_ftue_profile_picture.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
android:layout_width="wrap_content"
android:layout_height="0dp"
android:adjustViewBounds="true"
android:background="@drawable/bg_rounded_button"
android:contentDescription="@null"
android:foreground="@drawable/bg_rounded_button"
android:src="@drawable/ic_user_round"
android:src="@drawable/ic_user_fg"
app:layout_constraintBottom_toTopOf="@id/avatarTitleSpacing"
app:layout_constraintEnd_toEndOf="@id/profilePictureGutterEnd"
app:layout_constraintHeight_percent="@dimen/ftue_auth_profile_picture_height"
Expand Down

0 comments on commit 6ded764

Please sign in to comment.