am 48ea5280: Merge "Consolidate keyOutputText with keyLabel attribute"
* commit '48ea52800ac490b0c32c91b9982c7e01a455ffe5': Consolidate keyOutputText with keyLabel attributemain
commit
32ca47a547
|
@ -276,9 +276,6 @@
|
|||
<flag name="altCodeWhileTyping" value="0x04" />
|
||||
<flag name="enableLongPress" value="0x08" />
|
||||
</attr>
|
||||
<!-- TODO: Remove keyOutputText attribute and consolidate with keySpec. -->
|
||||
<!-- The string of characters to output when this key is pressed. -->
|
||||
<attr name="keyOutputText" format="string" />
|
||||
<!-- TODO: Rename keyLabel to keySpec. -->
|
||||
<!-- The label to display on the key. -->
|
||||
<attr name="keyLabel" format="string" />
|
||||
|
|
|
@ -184,8 +184,7 @@
|
|||
latin:parentStyle="baseForLayoutSwitchKeyStyle" />
|
||||
<key-style
|
||||
latin:styleName="comKeyStyle"
|
||||
latin:keyLabel="!text/keylabel_for_popular_domain"
|
||||
latin:keyLabel="!text/keylabel_for_popular_domain|!text/keylabel_for_popular_domain"
|
||||
latin:keyLabelFlags="autoXScale|fontNormal|hasPopupHint|preserveCase"
|
||||
latin:keyOutputText="!text/keylabel_for_popular_domain"
|
||||
latin:moreKeys="!text/more_keys_for_popular_domain" />
|
||||
</merge>
|
||||
|
|
|
@ -184,9 +184,8 @@
|
|||
latin:parentStyle="baseForToSymbolKeyStyle" />
|
||||
<key-style
|
||||
latin:styleName="comKeyStyle"
|
||||
latin:keyLabel="!text/keylabel_for_popular_domain"
|
||||
latin:keyLabel="!text/keylabel_for_popular_domain|!text/keylabel_for_popular_domain"
|
||||
latin:keyLabelFlags="autoXScale|fontNormal|hasPopupHint|preserveCase"
|
||||
latin:keyOutputText="!text/keylabel_for_popular_domain"
|
||||
latin:moreKeys="!text/more_keys_for_popular_domain"
|
||||
latin:backgroundType="functional" />
|
||||
</merge>
|
||||
|
|
|
@ -347,12 +347,8 @@ public class Key implements Comparable<Key> {
|
|||
mHintLabel = StringUtils.toUpperCaseOfStringForLocale(style.getString(keyAttr,
|
||||
R.styleable.Keyboard_Key_keyHintLabel), needsToUpperCase, locale);
|
||||
}
|
||||
final String outputTextInAttr = style.getString(
|
||||
keyAttr, R.styleable.Keyboard_Key_keyOutputText);
|
||||
final String rawOutputText = (outputTextInAttr != null) ? outputTextInAttr
|
||||
: KeySpecParser.getOutputText(keySpec);
|
||||
String outputText = StringUtils.toUpperCaseOfStringForLocale(
|
||||
rawOutputText, needsToUpperCase, locale);
|
||||
KeySpecParser.getOutputText(keySpec), needsToUpperCase, locale);
|
||||
// Choose the first letter of the label as primary code if not specified.
|
||||
if (code == CODE_UNSPECIFIED && TextUtils.isEmpty(outputText)
|
||||
&& !TextUtils.isEmpty(mLabel)) {
|
||||
|
|
|
@ -138,7 +138,6 @@ public final class KeyStylesSet {
|
|||
readString(keyAttr, R.styleable.Keyboard_Key_code);
|
||||
readString(keyAttr, R.styleable.Keyboard_Key_altCode);
|
||||
readString(keyAttr, R.styleable.Keyboard_Key_keyLabel);
|
||||
readString(keyAttr, R.styleable.Keyboard_Key_keyOutputText);
|
||||
readString(keyAttr, R.styleable.Keyboard_Key_keyHintLabel);
|
||||
readStringArray(keyAttr, R.styleable.Keyboard_Key_moreKeys);
|
||||
readStringArray(keyAttr, R.styleable.Keyboard_Key_additionalMoreKeys);
|
||||
|
|
Loading…
Reference in New Issue