Skip to content
This repository was archived by the owner on Feb 1, 2020. It is now read-only.

Commit 913a77e

Browse files
committed
Allowing setting key-preview on keyboard level
And many other future support Change-Id: Icce822dec98c73b301f77a6bee01790811a720a6
1 parent 850e046 commit 913a77e

5 files changed

Lines changed: 27 additions & 94 deletions

File tree

api/src/main/res/values/attrs.xml

Lines changed: 0 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -32,97 +32,4 @@
3232
<attr name="action_next" format="boolean"/>
3333
</declare-styleable>
3434

35-
<!-- additional key types that can be used to make themes interesting -->
36-
<!-- can auto-detect these, but allow keyboard layout to set some, such as -->
37-
<!-- punctuation, navigation, numeric, symbol, alpha -->
38-
<!-- for auto-detecting, difference between "punctuation" and "symbol" could just -->
39-
<!-- be if the unicode value is above 0x0100, since that's probably close enough -->
40-
<!-- intent is that "functional" type is unchanged, so a shift key is still functional -->
41-
<!-- to ensure backwards compatibility -->
42-
<declare-styleable name="keyType_NOT_SUPPORTED">
43-
<!-- FOR FUTURE EXPANSION - NOT YET SUPPORTED -->
44-
<attr name="key_type_punctuation" format="boolean"/>
45-
<attr name="key_type_navigation" format="boolean"/>
46-
<attr name="key_type_numeric" format="boolean"/>
47-
<attr name="key_type_symbol" format="boolean"/>
48-
<attr name="key_type_alpha" format="boolean"/>
49-
<attr name="key_type_space" format="boolean"/>
50-
<attr name="key_type_shift" format="boolean"/>
51-
<attr name="key_type_delete" format="boolean"/>
52-
</declare-styleable>
53-
54-
<declare-styleable name="Keyboard_Key_NOT_SUPPORTED">
55-
56-
<!-- FOR FUTURE EXPANSION - NOT YET SUPPORTED -->
57-
58-
<!-- lets us have lower-case letters as popupCharacters that -->
59-
<!-- aren't affected by state of SHIFT key (e.g., pi) -->
60-
<attr name="shiftedPopupCharacters" format="string"/>
61-
<attr name="shiftedHintLabel" format="string"/>
62-
63-
<!-- flags the keyboard designer can set to help theme correctly style keys -->
64-
<!-- (though, for the most part, these should be autodetected) -->
65-
<attr name="isPunctuation" format="boolean"/>
66-
<attr name="isNavigation" format="boolean"/>
67-
<!-- should automatically also be "functional" -->
68-
<attr name="isNumeric" format="boolean"/>
69-
<attr name="isSymbol" format="boolean"/>
70-
<attr name="isAlpha" format="boolean"/>
71-
<attr name="isSpace" format="boolean"/>
72-
<attr name="isShift" format="boolean"/>
73-
<!-- should automatically also be "functional" -->
74-
<attr name="isDelete" format="boolean"/>
75-
<!-- should automatically also be "functional" -->
76-
77-
78-
<!-- if false, determine position of main key label/icon without accounting for -->
79-
<!-- hint label. this may override the theme (e.g., if auto positioning is used), -->
80-
<!-- but may be needed to make special keys look right -->
81-
<!-- also useful for a short numeric row with highly-related popupCharacters where don't -->
82-
<!-- want to clutter with hints but want main label/icon still centered -->
83-
<!-- e.g., a "1" key that has popupCharacters="¹₁①" -->
84-
<attr name="adjustPosition" format="boolean"/>
85-
86-
<!-- icon for the hint instead of a label -->
87-
<!-- if icon and label specified, icon wins -->
88-
<attr name="hintIcon" format="reference"/>
89-
90-
<!-- swipe in different directions on a key to get different codes -->
91-
<!-- suggested to have noHint="true" if using swipe and long-press for keys -->
92-
<attr name="swipeLeftCode" format="string"/>
93-
<attr name="swipeRightCode" format="string"/>
94-
<attr name="swipeUpCode" format="string"/>
95-
<attr name="swipeDownCode" format="string"/>
96-
<!-- labels and icons for the different swipe directions -->
97-
<!-- default to using label or icon based on code -->
98-
<!-- if both icon and label specified, icon wins -->
99-
<attr name="swipeLeftLabel" format="string"/>
100-
<attr name="swipeLeftIcon" format="reference"/>
101-
<attr name="swipeLeftColor" format="color"/>
102-
<attr name="swipeRightLabel" format="string"/>
103-
<attr name="swipeRightIcon" format="reference"/>
104-
<attr name="swipeRightColor" format="color"/>
105-
<attr name="swipeUpLabel" format="string"/>
106-
<attr name="swipeUpIcon" format="reference"/>
107-
<attr name="swipeUpColor" format="color"/>
108-
<attr name="swipeDownLabel" format="string"/>
109-
<attr name="swipeDownIcon" format="reference"/>
110-
<attr name="swipeDownColor" format="color"/>
111-
<!-- size of the swipe labels -->
112-
<attr name="swipeLabelSize" format="dimension"/>
113-
114-
</declare-styleable>
115-
116-
<declare-styleable name="AnySoftKeyboardKeyIcons_NOT_SUPPORTED">
117-
<!-- should support normal, key_type_feedback -->
118-
<attr name="iconKeyNextKeyboard" format="reference"/>
119-
<!-- should support normal, key_type_feedback -->
120-
<attr name="iconKeySymbols" format="reference"/>
121-
<!-- should support normal, key_type_feedback -->
122-
<attr name="iconKeyAlpha" format="reference"/>
123-
<!-- should support normal, android:state_pressed, key_type_feedback, android:state_pressed+key_type_feedback, android:state_checked, state_checked+key_type_feedback -->
124-
<attr name="iconKeyAlt" format="reference"/>
125-
<!-- should support normal, key_type_feedback -->
126-
<attr name="iconKeyNavigation" format="reference"/>
127-
</declare-styleable>
12835
</resources>

api/src/main/res/values/functional_key_codes.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111

1212
<integer name="key_code_quick_text">-10</integer>
1313
<integer name="key_code_quick_text_popup">-102</integer>
14+
<integer name="key_code_image_media_popup">-140</integer>
15+
<integer name="key_code_pre_prepared_abbreviations_popup">-150</integer>
16+
<integer name="key_code_pre_prepared_text_popup">-151</integer>
17+
<integer name="key_code_pre_prepared_emails_popup">-152</integer>
18+
<integer name="key_code_external_integration">-200</integer>
1419
<integer name="key_code_domain">-9</integer>
1520

1621
<integer name="key_code_shift">-1</integer>

api/src/main/res/values/keyboard_layout_api.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ Copyright (C) 2013 Menny Even-Danan
2626
<attr name="android:horizontalGap"/>
2727
<!-- Default vertical gap between rows of keys. -->
2828
<attr name="android:verticalGap"/>
29+
<!-- Whether should show preview. -->
30+
<attr name="showPreview" format="reference|boolean"/>
2931
</declare-styleable>
3032

3133
<declare-styleable name="KeyboardLayout_Row">
@@ -97,5 +99,7 @@ Copyright (C) 2013 Menny Even-Danan
9799

98100
<!-- coma separated tags for this key. Might be used for completions -->
99101
<attr name="tags" format="reference|string"/>
102+
103+
<attr name="extra_key_data" format="reference|string"/>
100104
</declare-styleable>
101105
</resources>

api/src/main/res/values/keyboard_theme_api.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@
6565
<flag name="italic" value="2"/>
6666
</attr>
6767

68+
<attr name="keyTextCaseStyle">
69+
<flag name="auto" value="0"/>
70+
<flag name="lowercase" value="1"/>
71+
<flag name="uppercase" value="2"/>
72+
</attr>
73+
6874
<attr name="symbolColorScheme">
6975
<flag name="white" value="0"/>
7076
<flag name="black" value="1"/>
@@ -176,6 +182,17 @@
176182
<flag name="extend_key" value="1"/>
177183
<flag name="appear" value="2"/>
178184
</attr>
185+
186+
<attr name="swipeTypingColor" format="reference|color"/>
187+
<attr name="swipeTypingStrokeWidth" format="reference|dimension"/>
188+
<attr name="swipeTypingStrokeMinWidth" format="reference|dimension"/>
189+
<attr name="swipeTypingStrokeWidthStep" format="reference|dimension"/>
190+
<attr name="swipeTypingStrokeMinAlpha" format="reference|float"/>
191+
<attr name="swipeTypingStrokeAlphaStep" format="reference|integer"/>
192+
<attr name="swipeTypingShadowColor" format="reference|color"/>
193+
<attr name="swipeTypingShadowRadius" format="reference|dimension"/>
194+
<attr name="swipeTypingShadowOffsetX" format="reference|dimension"/>
195+
<attr name="swipeTypingShadowOffsetY" format="reference|dimension"/>
179196
</declare-styleable>
180197

181198
<declare-styleable name="AnyKeyboardViewIconsTheme">
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
<integer name="anysoftkeyboard_api_version_code">7</integer>
3+
<integer name="anysoftkeyboard_api_version_code">8</integer>
44
</resources>

0 commit comments

Comments
 (0)