Support keyboardHeight and maxKeyboardHeight to Keyboard XML
This change introduces,
- new attribute keyboardHeight to specify default keyboard height.
- new attribute maxKeyboardHeight to specify maximum keyboard height,
usually specified by percentage to the screen height.
- keyHeight attribute is obsoleted
- new attribute rowHeight to specify a row height, can be specifed as
percentage of the keyboard height. And verticalGap is included to
the row height (row height = key height + vertical gap).
Change-Id: I48a2f2661e8a91a998503a847437c1baf1de9b9c
diff --git a/java/res/xml/kbd_number.xml b/java/res/xml/kbd_number.xml
index cde7205..f09da86 100644
--- a/java/res/xml/kbd_number.xml
+++ b/java/res/xml/kbd_number.xml
@@ -20,10 +20,12 @@
<Keyboard
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+ latin:keyboardHeight="@dimen/keyboardHeight"
+ latin:maxKeyboardHeight="50%p"
+ latin:rowHeight="25%p"
latin:keyWidth="26.67%p"
latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap"
- latin:keyHeight="@dimen/key_height"
>
<include
latin:keyboardLayout="@xml/kbd_key_styles" />
diff --git a/java/res/xml/kbd_phone.xml b/java/res/xml/kbd_phone.xml
index 7e146ed..fb0e6d7 100644
--- a/java/res/xml/kbd_phone.xml
+++ b/java/res/xml/kbd_phone.xml
@@ -20,10 +20,12 @@
<Keyboard
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+ latin:keyboardHeight="@dimen/keyboardHeight"
+ latin:maxKeyboardHeight="50%p"
+ latin:rowHeight="25%p"
latin:keyWidth="26.67%p"
latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap"
- latin:keyHeight="@dimen/key_height"
>
<include
latin:keyboardLayout="@xml/kbd_key_styles" />
diff --git a/java/res/xml/kbd_phone_symbols.xml b/java/res/xml/kbd_phone_symbols.xml
index 1bb4bac..a5ff5d2 100644
--- a/java/res/xml/kbd_phone_symbols.xml
+++ b/java/res/xml/kbd_phone_symbols.xml
@@ -20,10 +20,12 @@
<Keyboard
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+ latin:keyboardHeight="@dimen/keyboardHeight"
+ latin:maxKeyboardHeight="50%p"
+ latin:rowHeight="25%p"
latin:keyWidth="26.67%p"
latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap"
- latin:keyHeight="@dimen/key_height"
>
<include
latin:keyboardLayout="@xml/kbd_key_styles" />
diff --git a/java/res/xml/kbd_popup_narrow_template.xml b/java/res/xml/kbd_popup_narrow_template.xml
index 9b78711..36caf1c 100644
--- a/java/res/xml/kbd_popup_narrow_template.xml
+++ b/java/res/xml/kbd_popup_narrow_template.xml
@@ -22,6 +22,6 @@
latin:keyWidth="9.45%p"
latin:horizontalGap="0px"
latin:verticalGap="0px"
- latin:keyHeight="@dimen/popup_key_height"
+ latin:rowHeight="@dimen/popup_key_height"
>
</Keyboard>
diff --git a/java/res/xml/kbd_popup_template.xml b/java/res/xml/kbd_popup_template.xml
index 004d490..9ee2749 100644
--- a/java/res/xml/kbd_popup_template.xml
+++ b/java/res/xml/kbd_popup_template.xml
@@ -22,6 +22,6 @@
latin:keyWidth="10%p"
latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="0px"
- latin:keyHeight="@dimen/popup_key_height"
+ latin:rowHeight="@dimen/popup_key_height"
>
</Keyboard>
diff --git a/java/res/xml/kbd_qwerty.xml b/java/res/xml/kbd_qwerty.xml
index 42f1515..b102eb6 100644
--- a/java/res/xml/kbd_qwerty.xml
+++ b/java/res/xml/kbd_qwerty.xml
@@ -20,10 +20,12 @@
<Keyboard
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+ latin:keyboardHeight="@dimen/keyboardHeight"
+ latin:maxKeyboardHeight="50%p"
+ latin:rowHeight="25%p"
latin:keyWidth="10%p"
latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap"
- latin:keyHeight="@dimen/key_height"
>
<include
latin:keyboardLayout="@xml/kbd_qwerty_rows" />
diff --git a/java/res/xml/kbd_symbols.xml b/java/res/xml/kbd_symbols.xml
index 7264179..a7da011 100644
--- a/java/res/xml/kbd_symbols.xml
+++ b/java/res/xml/kbd_symbols.xml
@@ -20,10 +20,12 @@
<Keyboard
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+ latin:keyboardHeight="@dimen/keyboardHeight"
+ latin:maxKeyboardHeight="50%p"
+ latin:rowHeight="25%p"
latin:keyWidth="10%p"
latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap"
- latin:keyHeight="@dimen/key_height"
>
<include
latin:keyboardLayout="@xml/kbd_key_styles" />
diff --git a/java/res/xml/kbd_symbols_shift.xml b/java/res/xml/kbd_symbols_shift.xml
index 83963bf..ee8d882 100644
--- a/java/res/xml/kbd_symbols_shift.xml
+++ b/java/res/xml/kbd_symbols_shift.xml
@@ -20,10 +20,12 @@
<Keyboard
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+ latin:keyboardHeight="@dimen/keyboardHeight"
+ latin:maxKeyboardHeight="50%p"
+ latin:rowHeight="25%p"
latin:keyWidth="10%p"
latin:horizontalGap="@dimen/key_horizontal_gap"
latin:verticalGap="@dimen/key_bottom_gap"
- latin:keyHeight="@dimen/key_height"
>
<include
latin:keyboardLayout="@xml/kbd_key_styles" />
diff --git a/java/res/xml/popup_at.xml b/java/res/xml/popup_at.xml
index 4b19d4f..92ad816 100644
--- a/java/res/xml/popup_at.xml
+++ b/java/res/xml/popup_at.xml
@@ -23,7 +23,7 @@
latin:keyWidth="10%p"
latin:horizontalGap="0px"
latin:verticalGap="0px"
- latin:keyHeight="@dimen/popup_key_height"
+ latin:rowHeight="@dimen/popup_key_height"
>
<Row
latin:rowEdgeFlags="top|bottom"
diff --git a/java/res/xml/popup_comma.xml b/java/res/xml/popup_comma.xml
index cef836a..9ef49df 100644
--- a/java/res/xml/popup_comma.xml
+++ b/java/res/xml/popup_comma.xml
@@ -23,7 +23,7 @@
latin:keyWidth="10%p"
latin:horizontalGap="0px"
latin:verticalGap="0px"
- latin:keyHeight="@dimen/popup_key_height"
+ latin:rowHeight="@dimen/popup_key_height"
>
<Row
latin:rowEdgeFlags="top|bottom"
diff --git a/java/res/xml/popup_domains.xml b/java/res/xml/popup_domains.xml
index 5f92e2f..9fbbdec 100644
--- a/java/res/xml/popup_domains.xml
+++ b/java/res/xml/popup_domains.xml
@@ -23,7 +23,7 @@
latin:keyWidth="15%p"
latin:horizontalGap="0px"
latin:verticalGap="0px"
- latin:keyHeight="@dimen/popup_key_height"
+ latin:rowHeight="@dimen/popup_key_height"
>
<Row
latin:rowEdgeFlags="top|bottom"
diff --git a/java/res/xml/popup_mic.xml b/java/res/xml/popup_mic.xml
index 99c97ce..1851eba 100644
--- a/java/res/xml/popup_mic.xml
+++ b/java/res/xml/popup_mic.xml
@@ -23,7 +23,7 @@
latin:keyWidth="10%p"
latin:horizontalGap="0px"
latin:verticalGap="0px"
- latin:keyHeight="@dimen/popup_key_height"
+ latin:rowHeight="@dimen/popup_key_height"
>
<Row
latin:rowEdgeFlags="top|bottom"
diff --git a/java/res/xml/popup_punctuation.xml b/java/res/xml/popup_punctuation.xml
index 76572b0..6c778c7 100644
--- a/java/res/xml/popup_punctuation.xml
+++ b/java/res/xml/popup_punctuation.xml
@@ -23,7 +23,7 @@
latin:keyWidth="10%p"
latin:horizontalGap="0px"
latin:verticalGap="0px"
- latin:keyHeight="@dimen/popup_key_height"
+ latin:rowHeight="@dimen/popup_key_height"
>
<Row
latin:rowEdgeFlags="top"
diff --git a/java/res/xml/popup_slash.xml b/java/res/xml/popup_slash.xml
index 1ace909..611500c 100644
--- a/java/res/xml/popup_slash.xml
+++ b/java/res/xml/popup_slash.xml
@@ -23,7 +23,7 @@
latin:keyWidth="10%p"
latin:horizontalGap="0px"
latin:verticalGap="0px"
- latin:keyHeight="@dimen/popup_key_height"
+ latin:rowHeight="@dimen/popup_key_height"
>
<Row
latin:rowEdgeFlags="top|bottom"
diff --git a/java/res/xml/popup_smileys.xml b/java/res/xml/popup_smileys.xml
index 2f08231..b876672 100644
--- a/java/res/xml/popup_smileys.xml
+++ b/java/res/xml/popup_smileys.xml
@@ -23,7 +23,7 @@
latin:keyWidth="15%p"
latin:horizontalGap="0px"
latin:verticalGap="0px"
- latin:keyHeight="@dimen/popup_key_height"
+ latin:rowHeight="@dimen/popup_key_height"
>
<Row
latin:rowEdgeFlags="top"