ml-opensource / ml-opensource/CutoutViewIndicator
Add new `OffsetHint` constants for disabling animations
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 21
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
Credits to @agrosner for reporting this.
Currently, the value 0 (the standard 'disabled' value for an integer flag) is accepted by CutoutViewIndicator::setOffsetHints(int). Passing that to the function prevents any sort of offset in CutoutImageCell from working, which in turn prevents the indicator from...well, indicating anything.
To make this more transparent, and simpler for new users of the library, I propose two new OffsetHint constants:
- an explicit constant
STOP_EVERYTHINGwith value 0- this'd disable offset-event visual effects
- well, at least until a different value is set on the indicator
- a constant
ONLY_ROUND_NUMBERSwith value 1 << 4- that'd cause cells to only react to OffsetEvents which return an integer from
::getFraction() - ideally some minor rounding to handle floating-point nonsense
- that'd cause cells to only react to OffsetEvents which return an integer from
Also, a new convenience method or two for setting that second flag: not sure on the name(s), but the should have the same vibe as ::justShowTheSelectionsWithoutAnimatingAnything() and ::pleaseGoBackToAnimatingEverything().
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with CutoutViewIndicator::setOffsetHints(int), CutoutImageCell, OffsetHint, and the existing methods ::justShowTheSelectionsWithoutAnimatingAnything() and ::pleaseGoBackToAnimatingEverything(). Define the requested constants and clarify the convenience-method names and floating-point rounding behavior before considering the feature complete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100