HeliBoard
HeliBoard copied to clipboard
Add separate height and padding scale for foldables?
Basically on the smaller outer screen I like the height to be a little higher but when opened it can be A LOT shorter. I like my cover screen set to 120% but when opened the keyboard takes a bit more than 3/4 the screen but looks good when set to 85%, so 2 options would be good and you don't have to make it foldable specific, it could easily be a toolbar toggle imho
This needs to be done by someone who actually has such a phone.
Not sure how detection works, but it could also be done using the display size.
I have the same issue. But i think it can be tied Tod split keyboard settings. In the Liter screen it is not spielt, only in opened. So if there would be an additional size Option for split layout it could solve it already
I just added additional settings for foldable phones to the newest beta. It works on my Fold 6. I'm not sure how to go about contributing what I did (I read the guidelines)
I just added additional settings for foldable phones to the newest beta. It works on my Fold 6. I'm not sure how to go about contributing what I did (I read the guidelines)
If you have questions I'd start with tagging the owner @Helium314
And secondly are the changes on your github in a way I could download the apk and use it as an update to heliboard?
I just added additional settings for foldable phones to the newest beta. It works on my Fold 6. I'm not sure how to go about contributing what I did (I read the guidelines)
If you have questions I'd start with tagging the owner @Helium314
And secondly are the changes on your github in a way I could download the apk and use it as an update to heliboard?
I'll fork it there, likely tomorrow. I have to put in the padding and font scale settings first (I've only done height scale and split so far). I'll let you know when it's up.
@spart0n654 @Helium314 @WhiteBahamut
fork for foldable phones here:
https://github.com/stevenrobday/HeliBoard-for-Foldables/releases/tag/v3.0-beta2-foldables-debug
I LOVE YOU THANK YOU!
I LOVE YOU THANK YOU!
Cool. It's working for you?
Instead of the keyboard taking over half the screen
@stevenrobday so essentially you're duplicating a bunch of settings, and decide which variants are used depending on a setting and on the display size? Do you know of any way to actually detect whether a device is foldable?
You can do a pull request, but I'll probably request some changes for readability and less duplicate code.
Foldables can be detected by the hinge sensor in newer models. WindowManager can detect if the screen is folded or flat. I'll clean up SettingsValues and AppearanceScreen. Also, I don't know of a better way than using additional settings, you need to have separate values for the outside and inside screen.
Awsome, thanks for looking into this!
@stevenrobday separate settings are fine and I think necessary, but copy / paste code is a pain to maintain (it's already not nice in the appearance settings). I'm sure we can find a better solution for this.
The folded / flat & portrait / landscape thiungs should be rearranged in both appearance screen and settings values. But I can do this if you don't feel confident on this or aren't willing to spend the time.
Ideally users wouldn't even be aware of the foldable settings if the device isn't foldable. If the hinge sensor isn't available on all foldables, we unfortunately can't use absence to hide those settings. Does the WindowManager simply detect all non-foldable screens as flat?
@stevenrobday separate settings are fine and I think necessary, but copy / paste code is a pain to maintain (it's already not nice in the appearance settings). I'm sure we can find a better solution for this.
The folded / flat & portrait / landscape thiungs should be rearranged in both appearance screen and settings values. But I can do this if you don't feel confident on this or aren't willing to spend the time.
Ideally users wouldn't even be aware of the foldable settings if the device isn't foldable. If the hinge sensor isn't available on all foldables, we unfortunately can't use absence to hide those settings. Does the WindowManager simply detect all non-foldable screens as flat?
I know its not a perfect solution but maybe just a collapsible setting tab at the bottom that says foldable settings only and the default for the setting to have the tab closed so if you have a foldable you know the settings are there and if you don't then its not expanded by default anyway for users to play with
@Helium314 It wasn't the best way to do it, and it'll run into problems eventually, maybe starting with the Fold 7 having a larger front screen.
Detecting foldables by hinge sensor is done with Project Manager's hasSystemFeature.
Jetpack WindowManager is able to grab a phone's "FoldableFeatures" through a coroutine. This will come back as null if it's not a foldable, empty if it's closed, flat state when it's fully opened, or half-opened. That'll work with all foldables. I'm still figuring it out, but I want to do it..
@spart0n654 a setting for everyone is the current approach from how I read the code. I'm not 100% happy with this, but it would certainly be acceptable if the alternative requires a lot of work or some heavy dependency.
starting with the Fold 7 having a larger front screen.
It should still be far away from 600 dp smallest width I guess. That's already what AOSP keyboard & Heliboard internally classify as tablet.
Detecting foldables by hinge sensor is done with Project Manager's hasSystemFeature.
Just detecting FEATURE_SENSOR_HINGE_ANGLE would be great. Do you have some overview which foldabled don't have that feature? I assume all new foldables have one, so we could query hinge sensor, and add a list of device models to cover old models.
Jetpack WindowManager
Ah, now I understand why I didn't find that stuff in "normal" (Android) WindowManager. If it's just for detecting folded state, maybe we can avoid yet another (apparently not so small) dependency and only extract the related code.
@Helium314 I just updated the fork, including rearranging the settings and it should be cleaner now. Let me know..
I read that FEATURE_SENSOR_HINGE_ANGLE may not work on older foldables, but I couldn't find a list. Samsung Fold 1 has it. I went with doing it this way over Jetpack WindowManager, as that relies on getting all the information in a coroutine and the layout changes are supposed to happen there.
The cleanup definitely helps for readability!
I think the related settings should be rearranged (internally and visually) now that we not only have portrait / landscape, but also folded / unfolded. Some ideas:
- use categories
- so instead of having bottom padding and then bottom padding (landscape), we'd have a "normal" (portrait?) category, then a "landscape" category, ...
- means we have the each setting 4 times (e.g. bottom padding for normal / landscape / unfolded / unfolded landscape)
- use a dialog
- so on selecting bottom padding, you first open a selector dialog for the normal / landscape / unfolded / unfolded landscape category, and then get to the slider
- means it's not so simple to show the currently selected value below the setting name
By categories, do you mean instead of grouping everything under Miscellaneous, group them by portrait, landscape, unfolded portrait, unfolded landscape?
By categories, do you mean instead of grouping everything under Miscellaneous, group them by portrait, landscape, unfolded portrait, unfolded landscape?
Yes
I may have found a bug in this debug version but wasn't for sure. The emoji section is half the size of normal even when folded
Ive attached screenshots
@spart0n654
There's a setting for unfolded emoji font scale. If you don't have it, try the newest debug version
@Helium314 I thought doing the settings in their own dialog would be much neater. Then what I tried caused the app to crash. So I went with the categories route. I added settings for landscape/unfolded landscape settings that only existed for portrait/unfolded portrait before. Narrow key gaps only works in portrait, not sure why.
I thought doing the settings in their own dialog would be much neater. Then what I tried caused the app to crash
I'll try adding this dialog to the app, then you would only need to add more entries to the dialog.
How about something like this?
I'm thinking about some checkbox users could use to hide the "landscape" and / or "folded" sliders. This would help against the dialog blowing up in case another dimension like "split keyboard" is added.
That looks great! It should be "unfolded" though. For split keyboard, you could put the toggle to the right of the orientation/unfolded
#1580 should be ready soon. @stevenrobday currently you have the follwing settings for folded / unfolded:
- split keyboard (needs a dialog with multiple switches, but that's simple)
- split distance
- height scale
- bottom padding scale
- side padding scale
- font scale
- emoji font scale
- narrow key gaps
Not sure about how useful it is to have a narrow key gaps setting for the (currently) 4 different modes. Would anyone really use it?
The what about one-handed mode (not in settings UI) and background image? Here I can imagine users might want it separate for folded / unfolded.
@stevenrobday the new slider dialog is now merged.
Here is a test (debug) version using the fold branch: HeliBoard_3.5-beta1-debug.zip
This is using existence of the hinge sensor to detect whether a device is foldable, and reads the hinge angle sensor for detection of folded state. I don't have a foldable device, so I can't test it. Sensor readout might have issues, if it doesn't work we might need to use a different method for detection of folded state.
on my Fold7, enabling split keyboard (with landscape disabled) splits when the phone is closed (so on the front screen). Happy to test if I need to set specific settings.
@DaveHenning does the "normal" setting apply to both folded and unfolded, or is it inverted, i.e. folded applies when the phone is open?