Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Upgrade of Profile_Activity Layout + image in search user activity #301

Merged
merged 15 commits into from
May 16, 2022

Conversation

MaximeZmt
Copy link
Owner

@MaximeZmt MaximeZmt commented May 15, 2022

photo_2022-05-16_09-45-04
photo_2022-05-16_13-27-44

Upgrade of Profile_Activity Layout: Fit better on any smartphone now
Update images loading to new version for Search User Activity

@MaximeZmt MaximeZmt self-assigned this May 16, 2022
@MaximeZmt MaximeZmt changed the title refactor profile activity xml Upgrade of Profile_Activity Layout May 16, 2022
@MaximeZmt MaximeZmt added the estimated: 2h estimated time to fix label May 16, 2022
@MaximeZmt MaximeZmt marked this pull request as ready for review May 16, 2022 07:26
@MaximeZmt MaximeZmt requested a review from kamilababayeva May 16, 2022 07:43
Copy link
Collaborator

@kamilababayeva kamilababayeva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your pr! I have some suggestions, let me know if you can address them. Also, one of the idea I changed to relative layout was that the tests were failing. They fail now as well.

  • For some reason, in my phone the button LogOut is too close to score stats. I have attached the picture below.
  • If the username is too long, the button to edit and QR code disappears from the screen
  • Maybe we should do these button static and not move based on username length

image

Copy link
Collaborator

@Tsathogguaa Tsathogguaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good short fix, thank you!

@MaximeZmt MaximeZmt changed the title Upgrade of Profile_Activity Layout Upgrade of Profile_Activity Layout + image in search user activity May 16, 2022

private fun setImage(imageURI: Uri) {
CoroutineScope(Dispatchers.Main).launch {
val task = async(Dispatchers.IO) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identical blocks of code found in 2 locations. Consider refactoring.

@@ -89,6 +90,9 @@ class ProfileActivity : AppCompatActivity() {
findViewById<ImageView>(R.id.avatar).setOnClickListener {
showGeneralDialog( "Do you want to change your profile picture?", false)
}
findViewById<CardView>(R.id.myCardView).setOnClickListener {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

@MaximeZmt MaximeZmt added actual: 3h actual time to fix and removed estimated: 2h estimated time to fix labels May 16, 2022
@@ -89,6 +90,9 @@ class ProfileActivity : AppCompatActivity() {
findViewById<ImageView>(R.id.avatar).setOnClickListener {
showGeneralDialog( "Do you want to change your profile picture?", false)
}
findViewById<CardView>(R.id.myCardView).setOnClickListener {
showGeneralDialog( "Do you want to change your profile picture?", false)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we test this?

@@ -159,7 +164,8 @@ class ProfileActivity : AppCompatActivity() {
private fun setQrCodeToProfileBtnListener() {
findViewById<FloatingActionButton>(R.id.qrCode_returnToProfile).setOnClickListener {
setLayoutVisibility(findViewById<ConstraintLayout>(R.id.QrCodePage), false)
setLayoutVisibility(findViewById<RelativeLayout>(R.id.profileContent), true)
setLayoutVisibility(findViewById<ScrollView>(R.id.profileContent), true)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we test this?

Copy link
Collaborator

@kamilababayeva kamilababayeva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

@MaximeZmt MaximeZmt removed the actual: 3h actual time to fix label May 16, 2022
@MaximeZmt MaximeZmt added the actual: 5h actual time to fix label May 16, 2022
*/
private fun setImage(imageURI: Uri) {
CoroutineScope(Dispatchers.Main).launch {
val task = async(Dispatchers.IO) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identical blocks of code found in 2 locations. Consider refactoring.

@@ -54,6 +55,9 @@ class MyProfileActivity : ProfileActivity() {
findViewById<ImageView>(R.id.avatar).setOnClickListener {
showGeneralDialog( "Do you want to change your profile picture?", false)
}
findViewById<CardView>(R.id.myCardView).setOnClickListener {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

@codeclimate
Copy link

codeclimate bot commented May 16, 2022

Code Climate has analyzed commit da08fed and detected 4 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 4

The test coverage on the diff in this pull request is 79.0% (80% is the threshold).

This pull request will bring the total coverage in the repository to 83.9%.

View more on Code Climate.

@MaximeZmt MaximeZmt merged commit cd6927e into main May 16, 2022
@MaximeZmt MaximeZmt deleted the maximezmt/updateUI branch May 16, 2022 23:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
actual: 5h actual time to fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUGFIX Improve the UI for ProfileActivity + repair the image in search user
3 participants