-
Notifications
You must be signed in to change notification settings - Fork 379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Members List and Member profile #25
Conversation
4f6440f
to
cb5d306
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will request some more changes once I review the code in an IDE
/** | ||
* @return a pointer to an initialised [UserService] | ||
*/ | ||
fun getUserService() = userService |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep the getUserService()
and getAuthService()
similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I make getAuthService like getUserService? use = instead of { } ? @m-murad
app/src/main/AndroidManifest.xml
Outdated
@@ -25,6 +25,7 @@ | |||
<activity android:name=".view.activities.SignUpActivity" | |||
android:theme="@style/AppTheme.NoActionBar" /> | |||
<activity android:name=".view.activities.MainActivity" /> | |||
<activity android:name=".view.activities.MemberProfileActivity" /> | |||
</application> | |||
|
|||
</manifest> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blank line
* @return an Observable of [UserResponse] | ||
*/ | ||
fun getUser(userId: Int): Observable<UserResponse> { | ||
return apiManager.getUserService().getOtherUser(userId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change getOtherUser(userId)
to getUserById(userId)
* This will call the getOtherUser method of UserService interface | ||
* @return an Observable of [UserResponse] | ||
*/ | ||
fun getUser(userId: Int): Observable<UserResponse> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change getUser(userId: Int)
to getUserById(userId: Int)
* @return an observable instance of the [UserResponse] | ||
*/ | ||
@GET("users/{userId}") | ||
fun getOtherUser(@Path("userId") userId: Int): Observable<UserResponse> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to getUserById()
I'll address all of your comments when you finish your review @m-murad ok? |
*/ | ||
class MembersAdapter ( | ||
private val usersList: List<UserResponse>, | ||
private val openDetailFunction: (movieDetailId: Int) -> Unit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy paste mistake, possibly change movieDetailId
to memberId
app/src/main/res/values/strings.xml
Outdated
@@ -5,6 +5,8 @@ | |||
<string name="sign_up">Sign Up</string> | |||
<string name="logging_in">Logging in…</string> | |||
<string name="signing_up">Signing up…</string> | |||
<string name="getting_users">Fetching users…</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change getting_users
to fetching_users
android:layout_width="150dp" | ||
android:layout_height="150dp" | ||
android:layout_marginTop="24dp" | ||
app:layout_constraintEnd_toEndOf="parent" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Data that is not available via the API should be hidden.
@@ -0,0 +1,53 @@ | |||
<?xml version="1.0" encoding="utf-8"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename this file to list_member_item.xml
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/imageView" /> | ||
|
||
<TextView |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this as a pair of 2 textViews. One having the constant text "Username : " and another with the variable text name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created a function that make the initial text bold before the ":" and the rest a normal value or "----".
I'm using one text view only to avoid this following situation:
Still you want me to use two different text views and have the situation on the right? @m-murad
cb5d306
to
52c2018
Compare
@roopalJazz can you please review this? |
This is such a relief! |
Members List and Member profile
Description
I created Members list and Member Profile.
Fixes #6
Fixes #19
Members screen without the placeholders for the pictures:
Members Profile without picture:
Type of Change:
Code/Quality Assurance Only
How Has This Been Tested?
Describe the tests you ran to verify your changes. Provide instructions or GIFs so we can reproduce. List any relevant details for your test.
Checklist:
Code/Quality Assurance Only