mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-27 01:56:26 +00:00
don't align keys off-center if hints are disabled, fixes #155
This commit is contained in:
parent
3d0e590852
commit
bca519efe4
1 changed files with 3 additions and 2 deletions
|
@ -412,8 +412,9 @@ public class KeyboardView extends View {
|
||||||
labelBaseline = centerY + labelCharHeight / 2.0f;
|
labelBaseline = centerY + labelCharHeight / 2.0f;
|
||||||
|
|
||||||
// Horizontal label text alignment
|
// Horizontal label text alignment
|
||||||
if (key.isAlignLabelOffCenter()) {
|
if (key.isAlignLabelOffCenter() && mShowsHints) {
|
||||||
// The label is placed off center of the key. Used mainly on "phone number" layout.
|
// The label is placed off center of the key. Currently used only on "phone number" layout
|
||||||
|
// to have letter hints shown nicely. We don't want to align it off center if hints are off.
|
||||||
labelX = centerX + params.mLabelOffCenterRatio * labelCharWidth;
|
labelX = centerX + params.mLabelOffCenterRatio * labelCharWidth;
|
||||||
paint.setTextAlign(Align.LEFT);
|
paint.setTextAlign(Align.LEFT);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue