-
Notifications
You must be signed in to change notification settings - Fork 667
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
fix : migrating fragments from butterknife to viewbinding #2146
fix : migrating fragments from butterknife to viewbinding #2146
Conversation
@gururani-abhishek do review this whenever you are free |
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.
-
In LocationsFragment.kt, line 8,9 please remove unused Butterknife imports.
-
In ThirdPartyTransferFragment.kt, RecentTransactionsFragment.kt, please double check if errorLayoutBinding is required. I think we can use binding to get a reference of the included error_layout.
-
At some places I've remarked to do view interactions in onViewCreated(), according to android documentation for onCreateView() : "It is recommended to only inflate the layout in this method and move logic that operates on the returned View to onViewCreated()"
Here's the documentation link for better reference. -
In RecentTransactionsFragment.kt bang-bang operator is used with activity and context to assert them as non-null. In all these places(lines : 99,117, 178, 186) please reformat the code to requireActivity() and requireContext().
app/src/main/java/org/mifos/mobile/ui/fragments/ThirdPartyTransferFragment.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/mifos/mobile/ui/fragments/ThirdPartyTransferFragment.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/mifos/mobile/ui/fragments/RecentTransactionsFragment.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/mifos/mobile/ui/fragments/RecentTransactionsFragment.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/mifos/mobile/ui/fragments/ThirdPartyTransferFragment.kt
Show resolved
Hide resolved
recentTransactionsPresenter?.attachView(this) | ||
sweetUIErrorHandler = SweetUIErrorHandler(activity, rootView) |
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.
We are using "binding.root" twice, it'll be a great for the purpose of clean coding if we create a val rootView = binding.root, and use it wherever Root View is required. Just a suggestion, totally your call.
6a42c46
to
9995f8c
Compare
9995f8c
to
2ca13a6
Compare
hey @jawidMuhammadi do review this whenever you are free |
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.
LGTM! :)
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.
Looks good to me
262160d
into
openMF:migrate_to_view_binding
Fixes #2142
This PR lists the fragments that have been migrated to viewbinding :