Skip to content
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

Issue 780 Stage 1 - [ENCHANCEMENT] upgrade project to use BindView #792

Closed

Conversation

@RyanMarzec
Copy link
Contributor

RyanMarzec commented Nov 15, 2019

Description

I have begun the work to upgrade the project to use ButterKnife @BindView instead of FindViewById.
Some sections that were not using Butterknife I updated to use a ViewHolder class for the variables.

Other classes that were already using BindView I change to follow the format being used that I will update at a later stage to use ViewHolder classes so that there is a consistent implementation and style.

Lastly, there are still some more findViewById that were either casted or embedded in a snackBar call that my initial grep to search for "= FindViewById" that I will look at in the next stage.

Fixes #(issue)

Type of change

Just put an x in the [] which are valid.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

  • ./gradlew assembleDebug assembleRelease
  • ./gradlew checkstyle

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
@RyanMarzec

This comment has been minimized.

Copy link
Contributor Author

RyanMarzec commented Nov 20, 2019

I have been busy with school assignments but ill fix these changes soon as I can!

@RyanMarzec

This comment has been minimized.

Copy link
Contributor Author

RyanMarzec commented Nov 21, 2019

@Swati4star @prabhakar267 hopefully I didn't miss anything, there are just the issues in FunFactsActivity and ShareContactActivity I need your feedback on first.

@RyanMarzec

This comment has been minimized.

Copy link
Contributor Author

RyanMarzec commented Dec 7, 2019

$ ./gradlew assembleDebug assembleRelease
....
BUILD SUCCESSFUL in 6m 49s
55 actionable tasks: 37 executed, 18 up-to-date

$ ./gradlew checkstyle

BUILD SUCCESSFUL in 4s
1 actionable task: 1 up-to-date

When I run tests locally they seem to pass but Travis Ci failing on GitHub and I was wondering if you could help me understand? I am relatively new to open source and open source testing.

@Swati4star

This comment has been minimized.

Copy link
Member

Swati4star commented Dec 9, 2019

@RyanMarzec There are multiple unused imports:

[ant:checkstyle] [ERROR] /home/travis/build/project-travel-mate/Travel-Mate/Android/app/src/main/java/io/github/project_travel_mate/MainActivity.java:25:8: Unused import - android.support.v7.widget.RecyclerView. [UnusedImports]
[ant:checkstyle] [ERROR] /home/travis/build/project-travel-mate/Travel-Mate/Android/app/src/main/java/io/github/project_travel_mate/MainActivity.java:31:8: Unused import - android.widget.FrameLayout. [UnusedImports]
[ant:checkstyle] [ERROR] /home/travis/build/project-travel-mate/Travel-Mate/Android/app/src/main/java/io/github/project_travel_mate/SplashActivity.java:9:8: Unused import - android.view.View. [UnusedImports]
[ant:checkstyle] [ERROR] /home/travis/build/project-travel-mate/Travel-Mate/Android/app/src/main/java/io/github/project_travel_mate/mytrips/TripImageActivity.java:8:8: Unused import - android.view.View. [UnusedImports]
[ant:checkstyle] [ERROR] /home/travis/build/project-travel-mate/Travel-Mate/Android/app/src/main/java/io/github/project_travel_mate/travel/HotelsActivity.java:12:8: Unused import - android.support.annotation.Nullable. [UnusedImports]
[ant:checkstyle] [ERROR] /home/travis/build/project-travel-mate/Travel-Mate/Android/app/src/main/java/io/github/project_travel_mate/utilities/ChecklistActivity.java:11:8: Unused import - android.view.View. [UnusedImports]
[ant:checkstyle] [ERROR] /home/travis/build/project-travel-mate/Travel-Mate/Android/app/src/main/java/io/github/project_travel_mate/utilities/ChecklistActivity.java:12:8: Unused import - android.widget.FrameLayout. [UnusedImports]
[ant:checkstyle] [ERROR] /home/travis/build/project-travel-mate/Travel-Mate/Android/app/src/main/java/io/github/project_travel_mate/utilities/ChecklistActivity.java:17:8: Unused import - butterknife.ButterKnife. [UnusedImports]
/**
* Viewholder for the SplashActivity item
*/
class ViewHolder {

This comment has been minimized.

Copy link
@Swati4star

Swati4star Dec 9, 2019

Member

you removed viewholder from ChecklistActivity.java activity, but it's still here.
Can we have consistency in this refactoring?

@Swati4star

This comment has been minimized.

Copy link
Member

Swati4star commented Jan 8, 2020

Closing due to inactivity. Feel free to reopen if you continue to work on this.

@Swati4star Swati4star closed this Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.