dotdash-keyboard-android
dotdash-keyboard-android copied to clipboard
Cheat sheet dialog doesn't show properly in landscape
The alphabet cheat sheet is too tall to show properly in landscape mode on my
phone. Due to my decision to make it "tap to show next", you can't scroll to
see the rest of it.
Original issue reported on code.google.com by aaronwells
on 7 Apr 2012 at 11:08
One solution is to change it from a Dialog to an AlertDialog, because those are
fixed size. However, it's not easy to get an AlertDialog to center-justify its
text. The one solution I've found online only works for API >= 11.
Possibly the solution to this and the resizing is just to use a custom view for
the cheat sheet rather than one of the built-in types, but I'm not sure I want
to put in that effort yet.
Original comment by aaronwells
on 7 Apr 2012 at 11:11
An update on this one. I introduced an alternate style for short screens, which switches the cheat sheet to large text when there's space, and small text when there is not. Now on my hdpi phone, both sheets look great in portrait mode with large text, and the alphabet looks fine in landscape mode with small text, but the (newly extended) punctuation sheet goes off the screen in landscape even with small text.
I can think of a couple possible fixes for this:
- Alternate layouts for short screens
- Split the punctuation sheet into two (shorter) pages
- Change the cheat sheet to be scrollable.
I tried #3, but just wrapping the cheat sheet view in a ScrollableLayout doesn't work, because my hacky code to turn the page when you tap on it, prevents the scrolling from working. So perhaps what I need to do for #3 is make it scrollable, and add a "next" button instead of saying "tap to change". Maybe even make the cheat sheet into a more proper window with a close button and a next button, which might please the people who want it to persist while they type.
In 1.2.0 I've improved this by adding an alternate layout file for shorter screens, that reduces the font size of the cheat sheets. But it's not perfect. I think ultimately I need to make it into a scrollable or something similar.