Allow custom functionality on the TedImagePickerActivity by opening some classes and functions#95
Open
arqlz wants to merge 3 commits intoParkSangGwon:masterfrom
Open
Allow custom functionality on the TedImagePickerActivity by opening some classes and functions#95arqlz wants to merge 3 commits intoParkSangGwon:masterfrom
arqlz wants to merge 3 commits intoParkSangGwon:masterfrom
Conversation
The TedImagePickerActivity and onCameraTileClick can be overriden
The Builder class can be extended
Allow the use of custom activity intent
ParkSangGwon
requested changes
May 19, 2022
Owner
There was a problem hiding this comment.
I thinks this is not good solution.
If you need custom camera pick intent, you can provide custom camera intent listener
interface OnCameraTileClickListener {
fun onCameraTileClick(completeListener: () -> Uri)
}
And you can use this listener
private fun onCameraTileClick() {
if(onCameraTileClickListener!=null){
onCameraTileClickListener.onCameraTileClick {
MediaUtil.scanMedia(this, uri)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe {
loadMedia(true)
onMediaClick(uri)
}
}
}
...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For some applications the default camera intent is not functional enough, those projects, will need extra control on the camera (image recognition, video annotation, resolution adjustments, filtering, etc), so while adding custom buttons for TedImagePicker can be a reasonable solution a middle term (a way to add tiles to the gallery), another solution can be to allow the extension of the already built clases, witch can be a faster way to solve this issue.
How can this be done?: