This repository has been archived by the owner on Oct 8, 2021. It is now read-only.
(3) Add other options to find RichPaths in RichPathView #6
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.
Add other ways to find RichPaths :
findFirstRichPath()
This can be useful if the vector has one path, so no need for searching by name and creating iterator for this.findRichPathByIndex(int index)
This can be useful to find the paths in O(1) instead of O(n), This could be messy if the vector has many paths with complex structure, but it could be useful in cases like hamburger icon where the paths can be recognized easily by the index, This method returns null if the index out of bounds instead of throwing exception to match the existentfindRichPathByName
behavior.I also updated couple of examples in the sample app to use them, and updated the code snippet in the readme file to include them.