-
Notifications
You must be signed in to change notification settings - Fork 1
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
Migrated KotlinSynthetics to ViewBinding #5
Migrated KotlinSynthetics to ViewBinding #5
Conversation
I think we have KotlineSynthetics in other Fragments as well :( Are you planning to raise seperate PRs for them? |
Yeah I was thinking of doing it a bit by bit. It would be easy to review rather than ten-twelve classes all at once. More chances of getting something wrong unnoticed. |
And this is why I wanted the #3 to be merged first 🥹 |
Sure, if you think there are not many changes, you can do it at once as well. As a sanity check after we have fully migrated, remove the dependency for KotlinSynthetics |
0696143
to
4c65b2d
Compare
making commit fragment by fragment, can be merged all at once. |
@anuragshukla06 since I din't had tasks for all scenario, haven been able to test all of the fragments. Once tested, will mark it ready. Meanwhile if you want to review each commit could parallely do as well. |
All the commits are independent, so if one commit it changed it won't cause any conflict to other ones. So that's a good part. |
8d67043
to
bb9decf
Compare
@anuragshukla06 these five commits are checked, can be merged. |
These three also done. Seven fragments migrated and checked. Six more remaining. |
// Create label detail array // TODO: It is throwing ArrayIndexOutOfBounds (colors is always of size 4 but labels not) | ||
labelDetailArray = Array(labels.size) { idx -> | ||
Pair(labels[idx], colors[idx]) | ||
} |
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.
@anuragshukla06 this line is throwing ArrayIndexOutOfBounds
because colors is static array with size 4 but label may have different lengths.
Anyhow, I don't understand label here??
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.
labels come from the server. At the time, we dont receive colors corresponding to labels from the server and the labels are not supposed to be more than 4.
Label in this image annotation task denotes one type of classification that the user can mark. We differentiate labels from each other visually by the colors for the user. There exists a one-to-one mapping from label to color
app/src/main/java/com/microsoft/research/karya/ui/scenarios/imageData/ImageDataFragment.kt
Show resolved
Hide resolved
app/src/main/java/com/microsoft/research/karya/ui/scenarios/imageData/ImageDataFragment.kt
Outdated
Show resolved
Hide resolved
6e3378f
to
e9ac013
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.
Did you remove the gradle dependency on Kotlin synthetic? Rest looks good to me
@anuragshukla06 finally done with the migration, removed the dependency as well. Next on list is gradle upgrade. |
Purpose / Description
Migration to ViewBindings
Fixes
Fixes #4
How Has This Been Tested?
Tested on Pixel 4a API 30 and Realme 6i API 30
Learning (optional, can help others)
https://developer.android.com/topic/libraries/view-binding/migration
Checklist
Please, go through these checks before submitting the PR.