Utilize KeyboardSet XML definitions

This change introduces KeyboardSet and SubKeyboard XML definitions to
represent a set of keyboard layouts.

Bug: 5002108
Bug: 5679585
Change-Id: Ib6c8d5936187381bb6725c9fe574e93871c01a86
diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index 15e0065..94f7ab7 100644
--- a/java/res/values/attrs.xml
+++ b/java/res/values/attrs.xml
@@ -164,8 +164,6 @@
         <attr name="verticalGap" format="dimension|fraction" />
         <!-- More keys keyboard layout template -->
         <attr name="moreKeysTemplate" format="reference" />
-        <!-- Locale of the keyboard layout -->
-        <attr name="keyboardLocale" format="string" />
         <!-- True if the keyboard is Right-To-Left -->
         <attr name="isRtlKeyboard" format="boolean" />
         <!-- Icon set for key top and key preview. -->
@@ -328,4 +326,29 @@
         <attr name="spacebarTextColor" format="color" />
         <attr name="spacebarTextShadowColor" format="color" />
     </declare-styleable>
+
+    <declare-styleable name="KeyboardSet">
+        <!-- Locale of the keyboard layouts -->
+        <attr name="keyboardLocale" format="string" />
+    </declare-styleable>
+
+    <declare-styleable name="KeyboardSet_Element">
+        <!-- This should be aligned with KeyboardId.ELEMENT_* -->
+        <attr name="elementName" format="enum">
+          <enum name="alphabet" value="0" />
+          <!--  TODO: Implement alphabet variant shift keyboards
+          <enum name="alphabetManualTemporaryShift" value="1" />
+          <enum name="alphabetAutomaticTemporaryShift" value="2" />
+          <enum name="alphabetShiftLock" value="3" />
+          <enum name="alphabetShiftLockShift" value="4" />
+          -->
+          <enum name="symbols" value="5" />
+          <enum name="symbolsShift" value="6"  />
+          <enum name="phone" value="7"  />
+          <enum name="phoneShift" value="8"  />
+          <enum name="number" value="9"  />
+        </attr>
+        <attr name="elementKeyboard" format="reference" />
+        <!-- TODO: Add setShifted and setShiftLocked attribute. -->
+    </declare-styleable>
 </resources>