-
Notifications
You must be signed in to change notification settings - Fork 0
[WIP] Explore nearby pictures #11
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
base: master
Are you sure you want to change the base?
Conversation
…rfaces to presenter
…map initialisation operations, however, needs to be tested and reactor
class ExploreMapMediaPresenterIml @Inject constructor( | ||
@Named(CommonsApplicationModule.MAIN_THREAD) mainThreadScheduler: Scheduler, | ||
dataSourceFactory: ExploreMapMediaDataSource, | ||
isFromSearchActivity: Boolean |
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 dependency isn't defined so the dagger does not know how to inject it here.
class ExploreMapMediaDataSource @Inject constructor( | ||
liveDataConverter: LiveDataConverter, | ||
private val mediaClient: MediaClient, | ||
val isFromSearchActivity: Boolean |
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 dependency isn't defined so the dagger does not know how to inject it here.
override val loadFunction: LoadFunction<Media> = { loadSize: Int, startPosition: Int -> | ||
//TODO: change this method | ||
// TODO: filter this result by location or display all of them on map | ||
if (isFromSearchActivity) { |
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 am not sure what the objective is here but you can create a setter for isFromSearchActivity
and set it manually when needed.
explorePlace.location.getLatitude(), | ||
explorePlace.location.getLongitude())); | ||
nearbyBaseMarker.place(explorePlace); | ||
/* Help needed, Madhur another point that would be nice to have help is here where I want to create marker icons from thumbnails of places. |
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 think you can do something like this
Glide.with(context)
.asBitmap()
.load(explorePlace.thumb)
.into(new CustomTarget<Bitmap>() {
@Override
public void onResourceReady(@NonNull Bitmap resource, @Nullable Transition<? super Bitmap> transition) {
nearbyBaseMarker.setIcon(IconFactory.getInstance(context).fromBitmap(resource));
}
@Override
public void onLoadCleared(@Nullable Drawable placeholder) {
}
});
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.
Ah I see you already tried this, not sure why it isn't working, can you confirm if onResourceReady
is called?
Codecov Report
@@ Coverage Diff @@
## master #11 +/- ##
============================================
- Coverage 50.56% 49.04% -1.53%
- Complexity 2225 2259 +34
============================================
Files 338 351 +13
Lines 15546 16302 +756
Branches 1359 1433 +74
============================================
+ Hits 7861 7995 +134
- Misses 7101 7703 +602
- Partials 584 604 +20
Continue to review full report at Codecov.
|
Description (required)
Fixes #INSERT_ISSUE_NUMBER_HERE
What changes did you make and why?
Tests performed (required)
Tested {build variant, e.g. ProdDebug} on {name of device or emulator} with API level {API level}.
Screenshots (for UI changes only)
Need help? See https://support.google.com/android/answer/9075928
Note: Please ensure that you have read CONTRIBUTING.md if this is your first pull request.