-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Use vector icons for nearby-map markers #621 #786
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
Conversation
This looks good to me, but I will ping @neslihanturan for input first. |
@neslihanturan I am hoping to merge this soon, if no issues from your end. |
It looks very nice, sorry for delay of mine. I think we should carry all of our png's to svg in near future. There is some failed tests, should we ignore them? |
At this stage, unfortunately I never really know if that indicates an issue with the test, with the PR, or with Travis (Travis has given us a lot of false negatives). Regardless, I will restart the build and hopefully we'll find out! |
@neslihanturan great! |
@@ -98,21 +100,24 @@ public int compare(Place lhs, Place rhs) { | |||
|
|||
placeList = placeList.subList(0, Math.min(placeList.size(), MAX_RESULTS)); | |||
|
|||
Bitmap icon = UiUtils.getBitmap( | |||
VectorDrawableCompat.create( |
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.
This line appears to cause a connected test error when called by NearbyControllerTest:
android.content.res.Resources$NotFoundException: Resource ID #0x7f02005d
at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:190)
at android.content.res.Resources.getDrawable(Resources.java:766)
at android.support.v4.content.res.ResourcesCompatApi21.getDrawable(ResourcesCompatApi21.java:31)
at android.support.v4.content.res.ResourcesCompat.getDrawable(ResourcesCompat.java:60)
at android.support.graphics.drawable.VectorDrawableCompat.create(VectorDrawableCompat.java:579)
at fr.free.nrw.commons.nearby.NearbyController.loadAttractionsFromLocationToBaseMarkerOptions(NearbyController.java:104)
at fr.free.nrw.commons.NearbyControllerTest.testEmptyList(NearbyControllerTest.java:49)
You can run connected tests with "gradle connectedCheck" after launching an emulator.
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.
@tobias47n9e I believe you wrote NearbyControllerTest. Perhaps could you figure out what is happening here?
Regarding the codacy results, please try adding a period after "Draws a vectorial image onto a bitmap". (It says "First sentence of Javadoc is incomplete (period is missing) or not present.") Regarding tests, I have commented in line. |
Oh, my bad. I admit I didn't run the tests. I didn't change any method, so I assumed it would be fine... :( Also fixed the codacy issue. Thanks for clearing that up for me @whym ! |
Codecov Report
@@ Coverage Diff @@
## master #786 +/- ##
========================================
Coverage ? 6.75%
========================================
Files ? 100
Lines ? 5151
Branches ? 468
========================================
Hits ? 348
Misses ? 4776
Partials ? 27
Continue to review full report at Codecov.
|
As described in the issue #621, replacing pngs like this:
With this svg:
Which looks like this: