-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
feat: add hover effects to divider in ResizablePaneManager #18952
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you make the color change much more subtle (probably to another gray)
It's a jarring color transition right now for a hover effect
I chose this because it's the norm for resizing screens on desktop sites: colors.mp4 |
Ok, the video works. Have the area which changes color match the width of the area in the video you provided. |
AnkiDroid/src/main/java/com/ichi2/anki/ui/ResizablePaneManager.kt
Outdated
Show resolved
Hide resolved
true | ||
} | ||
MotionEvent.ACTION_HOVER_EXIT -> { | ||
divider.setBackgroundColor(idleColor) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicates some color-setting behavior from touch events - consider extracting common visual state methods
Something like this:
private fun setDividerVisualState(view: View, backgroundColor: Int, pointerIcon: PointerIcon?) {
view.setBackgroundColor(backgroundColor)
view.pointerIcon = pointerIcon
}
Wait so I should reduce the width of the divider? because all it is doing is changing it's background color. |
|
I'll update it tomorrow! |
5ae9860
to
31d62fe
Compare
AnkiDroid/src/main/java/com/ichi2/anki/ui/ResizablePaneManager.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/ui/ResizablePaneManager.kt
Outdated
Show resolved
Hide resolved
- Resizable divider onHover changes PointerIcon to a resizing indicator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Purpose / Description
Fixes
Approach
ResizablePaneManager
to show users that it is resizableHow Has This Been Tested?
Tested on Chromebook emulator - API 34
hover.webm
Checklist