Add the pin entry layout

The layout is used for phone number and datetime input boxes as well as
some numbers.
It is easier to use when the full numeric layout is not needed.
This commit is contained in:
Jules Aguillon
2022-10-24 00:17:55 +02:00
parent e1145d3851
commit e01a2733b1
3 changed files with 46 additions and 5 deletions

View File

@@ -136,10 +136,11 @@ class KeyboardData
boolean bottom_row = parser.getAttributeBooleanValue(null, "bottom_row", true);
boolean extra_keys = parser.getAttributeBooleanValue(null, "extra_keys", true);
boolean num_pad = parser.getAttributeBooleanValue(null, "num_pad", true);
float specified_kw = parser.getAttributeFloatValue(null, "width", 0f);
ArrayList<Row> rows = new ArrayList<Row>();
while (expect_tag(parser, "row"))
rows.add(Row.parse(parser));
float kw = compute_max_width(rows);
float kw = (specified_kw != 0f) ? specified_kw : compute_max_width(rows);
if (bottom_row)
rows.add(_bottomRow.updateWidth(kw));
return new KeyboardData(rows, kw, extra_keys, num_pad);