Merged
Conversation
…more inclusive than `String` and `Spannable`. [REMOVED] Redundant `ToolTip.Builder()` with `Spannable` message after the API update, and updated code accordingly. [ADDED] First time tooltip message with span to showcase the possibility. [ADDED] `@Nullable` and `@NonNull` to be future proof _(kotlin tsk tsk)_.
41bc329 to
85911c9
Compare
hossain-khan
commented
Apr 1, 2018
| private @NonNull Context mContext; | ||
| private @NonNull View mAnchorView; | ||
| private @NonNull ViewGroup mRootViewGroup; | ||
| private @NonNull CharSequence mMessage; |
Owner
Author
There was a problem hiding this comment.
This is the key API change.
hossain-khan
commented
Apr 1, 2018
| * @param message spannable message to show | ||
| * @param position put the tip above / below / left to / right to | ||
| */ | ||
| public Builder(Context context, View anchorView, ViewGroup root, Spannable message, @Position int position) { |
Owner
Author
There was a problem hiding this comment.
Note: Spannable does not cover everything. For example Html.fromHtml() returns Spanned which is super class of Spannable, hence can't be used here.
hossain-khan
added a commit
that referenced
this pull request
Apr 1, 2018
API changes were done in #2
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.
Cleanup API to allow user to use the spannable text. Updated sample app with usage.
Changelog
ToolTip.Builder()withCharSequencemessage that is more inclusive thanStringandSpannable.ToolTip.Builder()withSpannablemessage after the API update, and updated code accordingly.@Nullableand@NonNullto be future proof (kotlin tsk tsk).Screenshot
API 26
NOTE: This is an extension of #1
API 16
Reference Usage - Google+ App