Improve UX of settings toggle with custom IconSwitch#138
Conversation
…onSwitch supporting thumb icons
|
It looks ok, I will check the code letter. |
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the settings toggle user experience by replacing the default Material 2 Switch with a custom IconSwitch component that displays icons inside the thumb for clearer visual feedback.
- Replaced Material Switch with custom IconSwitch in SettingToggleRow
- Created new IconSwitch composable with animated thumb positioning and color transitions
- Added check/close icons inside the switch thumb to indicate on/off states
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Please fix the formatting, and if reasonable (copilot gives a lot of bad suggestions) other problems. @rezad1393 please give your opinion about it, as you originally proposed the change. |
|
Fixed the formatting. Copilot's third suggestion is not required as the current order with modifier first is correct. |
Am I missing something? |
There is a screenshot above, I think it should be enough for now -- it's only visual change |
oh. my opinion about it: E-ink color is not great and using color to differentiate is not a good idea for it. that does not mean color should not be used, just that when UX designer uses color on a normal colorful screen he can forget that on e-ink color it doesn't look like that at all and on black and white e-ink it has no color. I can't test this but I think on B/W e-ink the buttons above look the same color wise (both very similar shades of grey) but the visual X and tick (if that is the name for it) show the user that the option is off or on. p.s. |
|
|
looks good. btw did you see the attached image in previous top post? attached again here to see difference between off/on and options disabled. |
|
|
that works great. because E-ink doesn't use light source for shade creation (it just reflects) using a white background is great on it. another reason for not using dark or color background is that E-ink screen has a limited life span (number of pixel state changes - dark white and shades of grey). btw I don't know what that Icon library is (I am not a dev) but can you make sure it does not have animations? |
|
@Ethran I have made the changes as mentioned by @rezad1393. Please review the code whenever you feel like |
I am curious about "e-ink friendly toggle switch" isn't this app almost exclusive to Boox android e-ink devices ecosystem? EDIT: |
|
App is not exclusive to onyx devices, it can run on other android devices. BUT, the handwriting won't work properly on non-boox devices. I plan to implement something so that it can work on normal devices, but it's a long term plan. |
I don't know how much of boox sdk can be made separate from other part of the app so that you can make it work on other androids. my suggestion is to make this boox (or e-ink) only because there are apps targeting none-e-ink devices. maybe add some of the other usefull features that the official notes app from boox has. but this is your app and at the end it is your to decide what to do. and thank you for this great app.( I hate proprietary apps) |
… parameter to explicitly turn of animation. Added documentation to IconSwitch.
|
I added explicit flag to not use animation, and reordered logic in function. Also, moved function to separate file, and removed all default android switches with this one. Check if it is correct, and I think it can be merged. |
|
Looks good! |
|
@Sovan22 |
|
Sure! |






This pr should close #121. It replaces the default Material 2 Switch in settings rows with a custom IconSwitch that supports displaying icons inside the thumb. The new implementation provides clearer visual feedback while maintaining accessibility and theming consistency.
