Skip to content

Commit

Permalink
fix: Update minor UI changes on Profile
Browse files Browse the repository at this point in the history
- Update the profile avatar
- update warning icon on delete account dialog

LEARNER-10081
  • Loading branch information
omerhabib26 committed Aug 23, 2024
1 parent dd757fe commit 528c3f4
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 104 deletions.
Binary file not shown.
15 changes: 15 additions & 0 deletions core/src/main/res/drawable/core_ic_default_profile_picture.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="44dp"
android:height="44dp"
android:viewportWidth="44"
android:viewportHeight="44">
<group>
<clip-path android:pathData="M22,0L22,0A22,22 0,0 1,44 22L44,22A22,22 0,0 1,22 44L22,44A22,22 0,0 1,0 22L0,22A22,22 0,0 1,22 0z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M0,0h44v44h-44z" />
<path
android:fillColor="#00262B"
android:pathData="M22,22C24.578,22 26.667,19.912 26.667,17.333C26.667,14.755 24.578,12.667 22,12.667C19.422,12.667 17.333,14.755 17.333,17.333C17.333,19.912 19.422,22 22,22ZM22,24.333C18.885,24.333 12.667,25.897 12.667,29V31.333H31.333V29C31.333,25.897 25.115,24.333 22,24.333Z" />
</group>
</vector>
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ fun DeleteProfileScreen(
modifier = Modifier
.size(145.dp)
.align(Alignment.CenterHorizontally),
painter = painterResource(id = profileR.drawable.profile_delete_box),
painter = painterResource(id = profileR.drawable.profile_ic_warning),
contentDescription = null,
)
Spacer(Modifier.height(32.dp))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@ private fun EditProfileScreen(
MaterialTheme.appColors.onSurface,
CircleShape
)
.background(Color.White, CircleShape)
.padding(2.dp)
.size(100.dp)
.clip(CircleShape)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ internal fun ManageAccountView(
borderColor = MaterialTheme.appColors.primaryButtonBorderedText,
textColor = MaterialTheme.appColors.primaryButtonBorderedText
)
Spacer(modifier = Modifier.height(12.dp))
IconText(
text = stringResource(id = ProfileR.string.profile_delete_profile),
painter = painterResource(id = ProfileR.drawable.profile_ic_trash),
Expand All @@ -186,7 +185,6 @@ internal fun ManageAccountView(
onClick = {
onAction(ManageAccountViewAction.DeleteAccount)
})
Spacer(modifier = Modifier.height(12.dp))
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ fun ProfileTopic(image: String, title: String, subtitle: String) {
),
modifier = Modifier
.testTag("img_profile")
.size(80.dp)
.size(60.dp)
.clip(CircleShape)
)
Spacer(modifier = Modifier.width(12.dp))
Expand Down
50 changes: 0 additions & 50 deletions profile/src/main/res/drawable-night/profile_delete_box.xml

This file was deleted.

50 changes: 0 additions & 50 deletions profile/src/main/res/drawable/profile_delete_box.xml

This file was deleted.

12 changes: 12 additions & 0 deletions profile/src/main/res/drawable/profile_ic_warning.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="144dp"
android:height="144dp"
android:viewportWidth="144"
android:viewportHeight="144">
<path
android:fillColor="#1F453D"
android:pathData="M72,72m-71.11,0a71.11,71.11 0,1 1,142.22 0a71.11,71.11 0,1 1,-142.22 0" />
<path
android:fillColor="#ffffff"
android:pathData="M34.46,100.15C33.72,100.15 33.05,99.97 32.46,99.6C31.87,99.24 31.41,98.76 31.09,98.17C30.74,97.58 30.56,96.94 30.52,96.26C30.49,95.57 30.67,94.89 31.08,94.22L68.55,29.53C68.96,28.86 69.47,28.36 70.08,28.04C70.68,27.72 71.33,27.56 72,27.56C72.67,27.56 73.31,27.72 73.92,28.04C74.53,28.36 75.04,28.86 75.44,29.53L112.92,94.22C113.33,94.89 113.51,95.57 113.48,96.26C113.44,96.94 113.25,97.58 112.91,98.17C112.59,98.76 112.13,99.24 111.54,99.6C110.94,99.97 110.28,100.15 109.54,100.15H34.46ZM38.95,93.59H105.05L72,36.72L38.95,93.59ZM72,88.37C73,88.37 73.84,88.03 74.52,87.36C75.2,86.68 75.54,85.84 75.54,84.84C75.54,83.84 75.2,83 74.52,82.32C73.84,81.64 73,81.31 72,81.31C71,81.31 70.16,81.64 69.48,82.32C68.8,83 68.46,83.84 68.46,84.84C68.46,85.84 68.8,86.68 69.48,87.36C70.16,88.03 71,88.37 72,88.37ZM72,76.93C72.93,76.93 73.71,76.62 74.34,75.99C74.97,75.36 75.28,74.58 75.28,73.65V58.34C75.28,57.41 74.97,56.63 74.34,56C73.71,55.38 72.93,55.06 72,55.06C71.07,55.06 70.29,55.38 69.66,56C69.03,56.63 68.72,57.41 68.72,58.34V73.65C68.72,74.58 69.03,75.36 69.66,75.99C70.29,76.62 71.07,76.93 72,76.93Z" />
</vector>

0 comments on commit 528c3f4

Please sign in to comment.