Merged
Conversation
const-cloudinary
requested changes
Aug 22, 2023
const-cloudinary
left a comment
There was a problem hiding this comment.
good PR. Please fix a few very minor issues.
| SpannableString spannableString = new SpannableString(text); | ||
| spannableString.setSpan(new ForegroundColorSpan(holder.statusText.getContext().getResources().getColor(R.color.buttonColor)), text.indexOf(progressStr), text.length(), 0); | ||
| if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { | ||
| spannableString.setSpan(new ForegroundColorSpan(holder.statusText.getContext().getColor(R.color.buttonColor)), text.indexOf(progressStr), text.length(), 0); |
There was a problem hiding this comment.
why don't you just extract holder.statusText.getContext().getColor(R.color.buttonColor)) to a variable ? and reuse the rest of the code?
Contributor
Author
There was a problem hiding this comment.
Becase getColor from getResources is deprecated, and from getContext is supported in Android M+
| return Bitmap.CompressFormat.WEBP; | ||
| if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { | ||
| return Bitmap.CompressFormat.WEBP_LOSSY; | ||
| } else { |
Contributor
Author
There was a problem hiding this comment.
The else is for older versions of Android that do not support WEBP
| return point.x; | ||
| if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { | ||
| return window.getCurrentWindowMetrics().getBounds().width(); | ||
| } else { |
Contributor
Author
There was a problem hiding this comment.
The else is for Old android version < Android R
const-cloudinary
approved these changes
Aug 27, 2023
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.
Brief Summary of Changes
Fix deprecations around the SDK
What does this PR address?
Are tests included?
Reviewer, please note:
Checklist: