am b690c039: Merge "Optimize layout"

* commit 'b690c039271ad5ec5551cec4b73e796e9522ee45':
  Optimize layout
main
Satoshi Kataoka 2013-09-05 06:33:47 -07:00 committed by Android Git Automerger
commit b7a8c1c33d
16 changed files with 129 additions and 76 deletions

View File

@ -21,20 +21,6 @@
<merge <merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
> >
<switch>
<case
latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLockShifted"
>
<key-style
latin:styleName="hasShiftedLetterHintStyle"
latin:keyLabelFlags="hasShiftedLetterHint|shiftedLetterActivated" />
</case>
<default>
<key-style
latin:styleName="hasShiftedLetterHintStyle"
latin:keyLabelFlags="hasShiftedLetterHint" />
</default>
</switch>
<!-- Functional key styles --> <!-- Functional key styles -->
<!-- Base style for shift key. A single space is used for dummy label in moreKeys. --> <!-- Base style for shift key. A single space is used for dummy label in moreKeys. -->
<key-style <key-style

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2013, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<switch>
<case
latin:languageSwitchKeyEnabled="true"
>
<Key
latin:keyStyle="languageSwitchKeyStyle" />
<Key
latin:keyStyle="spaceKeyStyle"
latin:keyWidth="20%p" />
</case>
<!-- languageSwitchKeyEnabled="false" -->
<default>
<Key
latin:keyStyle="spaceKeyStyle"
latin:keyWidth="30%p" />
</default>
</switch>
</merge>

View File

@ -21,6 +21,20 @@
<merge <merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
> >
<switch>
<case
latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLockShifted"
>
<key-style
latin:styleName="hasShiftedLetterHintStyle"
latin:keyLabelFlags="hasShiftedLetterHint|shiftedLetterActivated" />
</case>
<default>
<key-style
latin:styleName="hasShiftedLetterHintStyle"
latin:keyLabelFlags="hasShiftedLetterHint" />
</default>
</switch>
<!-- Base key style for the key which may have settings or tab key as popup key. --> <!-- Base key style for the key which may have settings or tab key as popup key. -->
<include <include
latin:keyboardLayout="@xml/key_styles_f1" /> latin:keyboardLayout="@xml/key_styles_f1" />

View File

@ -29,11 +29,13 @@
latin:keyLabel="." latin:keyLabel="."
latin:keyHintLabel="_" latin:keyHintLabel="_"
latin:moreKeys="_" latin:moreKeys="_"
latin:backgroundType="functional"
latin:keyStyle="hasShiftedLetterHintStyle" /> latin:keyStyle="hasShiftedLetterHintStyle" />
<Key <Key
latin:keyLabel="," latin:keyLabel=","
latin:keyHintLabel="-" latin:keyHintLabel="-"
latin:moreKeys="-" latin:moreKeys="-"
latin:backgroundType="functional"
latin:keyStyle="hasShiftedLetterHintStyle" /> latin:keyStyle="hasShiftedLetterHintStyle" />
</case> </case>
<case <case
@ -43,12 +45,14 @@
latin:keyLabel="!text/keylabel_for_apostrophe" latin:keyLabel="!text/keylabel_for_apostrophe"
latin:keyHintLabel="!text/keyhintlabel_for_apostrophe" latin:keyHintLabel="!text/keyhintlabel_for_apostrophe"
latin:moreKeys="!text/more_keys_for_apostrophe" latin:moreKeys="!text/more_keys_for_apostrophe"
latin:backgroundType="functional"
latin:keyStyle="hasShiftedLetterHintStyle" /> latin:keyStyle="hasShiftedLetterHintStyle" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintLabel="!text/keyhintlabel_for_arabic_diacritics" latin:keyHintLabel="!text/keyhintlabel_for_arabic_diacritics"
latin:keyLabelFlags="hasPopupHint" latin:keyLabelFlags="hasPopupHint"
latin:moreKeys="!text/more_keys_for_arabic_diacritics" latin:moreKeys="!text/more_keys_for_arabic_diacritics"
latin:backgroundType="functional"
latin:keyStyle="hasShiftedLetterHintStyle" /> latin:keyStyle="hasShiftedLetterHintStyle" />
</case> </case>
<case <case
@ -59,22 +63,26 @@
latin:keyHintLabel="!text/keyhintlabel_for_apostrophe" latin:keyHintLabel="!text/keyhintlabel_for_apostrophe"
latin:keyLabelFlags="hasPopupHint" latin:keyLabelFlags="hasPopupHint"
latin:moreKeys="!text/more_keys_for_apostrophe" latin:moreKeys="!text/more_keys_for_apostrophe"
latin:backgroundType="functional"
latin:keyStyle="hasShiftedLetterHintStyle" /> latin:keyStyle="hasShiftedLetterHintStyle" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintLabel="!text/keyhintlabel_for_arabic_diacritics" latin:keyHintLabel="!text/keyhintlabel_for_arabic_diacritics"
latin:keyLabelFlags="hasPopupHint" latin:keyLabelFlags="hasPopupHint"
latin:moreKeys="!text/more_keys_for_arabic_diacritics" latin:moreKeys="!text/more_keys_for_arabic_diacritics"
latin:backgroundType="functional"
latin:keyStyle="hasShiftedLetterHintStyle" /> latin:keyStyle="hasShiftedLetterHintStyle" />
</case> </case>
<default> <default>
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintLabel="!text/keyhintlabel_for_tablet_period" latin:keyHintLabel="!text/keyhintlabel_for_tablet_period"
latin:backgroundType="functional"
latin:moreKeys="!text/more_keys_for_tablet_period" /> latin:moreKeys="!text/more_keys_for_tablet_period" />
<Key <Key
latin:keyLabel="!text/keylabel_for_tablet_comma" latin:keyLabel="!text/keylabel_for_tablet_comma"
latin:keyHintLabel="!text/keyhintlabel_for_tablet_comma" latin:keyHintLabel="!text/keyhintlabel_for_tablet_comma"
latin:backgroundType="functional"
latin:moreKeys="!text/more_keys_for_tablet_comma" /> latin:moreKeys="!text/more_keys_for_tablet_comma" />
</default> </default>
</switch> </switch>

View File

@ -30,20 +30,24 @@
<Key <Key
latin:keyLabel="&#x00AB;" latin:keyLabel="&#x00AB;"
latin:code="0x00BB" latin:code="0x00BB"
latin:backgroundType="functional"
latin:moreKeys="!text/more_keys_for_less_than" /> latin:moreKeys="!text/more_keys_for_less_than" />
<Key <Key
latin:keyLabel="&#x00BB;" latin:keyLabel="&#x00BB;"
latin:code="0x00AB" latin:code="0x00AB"
latin:backgroundType="functional"
latin:moreKeys="!text/more_keys_for_greater_than" /> latin:moreKeys="!text/more_keys_for_greater_than" />
</case> </case>
<default> <default>
<Key <Key
latin:keyLabel="&lt;" latin:keyLabel="&lt;"
latin:code="!code/key_less_than" latin:code="!code/key_less_than"
latin:backgroundType="functional"
latin:moreKeys="!text/more_keys_for_less_than" /> latin:moreKeys="!text/more_keys_for_less_than" />
<Key <Key
latin:keyLabel="&gt;" latin:keyLabel="&gt;"
latin:code="!code/key_greater_than" latin:code="!code/key_greater_than"
latin:backgroundType="functional"
latin:moreKeys="!text/more_keys_for_greater_than" /> latin:moreKeys="!text/more_keys_for_greater_than" />
</default> </default>
</switch> </switch>

View File

@ -27,6 +27,12 @@
<Key <Key
latin:keyStyle="toAlphaKeyStyle" latin:keyStyle="toAlphaKeyStyle"
latin:keyWidth="15%p" /> latin:keyWidth="15%p" />
<Key
latin:keyLabel="_"
latin:backgroundType="functional" />
<Key
latin:keyLabel="/"
latin:backgroundType="functional" />
<switch> <switch>
<case <case
latin:hasShortcutKey="true" latin:hasShortcutKey="true"
@ -36,18 +42,13 @@
</case> </case>
<!-- latin:hasShortcutKey="false" --> <!-- latin:hasShortcutKey="false" -->
<default> <default>
<Key
latin:keyLabel="!text/keylabel_for_comma"
latin:keyLabelFlags="hasPopupHint"
latin:additionalMoreKeys="!text/more_keys_for_comma"
latin:keyStyle="f1MoreKeysStyle" />
</default> </default>
</switch> </switch>
<include <include
latin:keyXPos="25%p" latin:keyXPos="35%p"
latin:keyboardLayout="@xml/key_space" /> latin:keyboardLayout="@xml/key_space_30" />
<Key <include
latin:keyStyle="punctuationKeyStyle" /> latin:keyboardLayout="@xml/keys_comma_period" />
<Key <Key
latin:keyStyle="emojiKeyStyle" latin:keyStyle="emojiKeyStyle"
latin:keyWidth="fillRight" /> latin:keyWidth="fillRight" />

View File

@ -27,19 +27,13 @@
<Key <Key
latin:keyStyle="toAlphaKeyStyle" latin:keyStyle="toAlphaKeyStyle"
latin:keyWidth="15%p" /> latin:keyWidth="15%p" />
<!-- U+201A: "" SINGLE LOW-9 QUOTATION MARK
U+201E: "„" DOUBLE LOW-9 QUOTATION MARK -->
<Key
latin:keyLabel="&#x201E;"
latin:moreKeys="&#x201A;"
latin:backgroundType="functional" />
<include <include
latin:keyXPos="25%p" latin:keyboardLayout="@xml/keys_less_greater" />
latin:keyboardLayout="@xml/key_space" /> <include
<!-- U+2026: "…" HORIZONTAL ELLIPSIS --> latin:keyXPos="35%p"
<Key latin:keyboardLayout="@xml/key_space_30" />
latin:keyLabel="&#x2026;" <include
latin:backgroundType="functional" /> latin:keyboardLayout="@xml/keys_comma_period" />
<Key <Key
latin:keyStyle="enterKeyStyle" latin:keyStyle="enterKeyStyle"
latin:keyWidth="fillRight" /> latin:keyWidth="fillRight" />

View File

@ -50,9 +50,6 @@
latin:moreKeys="!text/more_keys_for_symbols_percent" /> latin:moreKeys="!text/more_keys_for_symbols_percent" />
<Key <Key
latin:keyLabel="&amp;" /> latin:keyLabel="&amp;" />
<Key
latin:keyLabel="*"
latin:moreKeys="!text/more_keys_for_star" />
<!-- U+2013: "" EN DASH <!-- U+2013: "" EN DASH
U+2014: "—" EM DASH U+2014: "—" EM DASH
U+00B7: "·" MIDDLE DOT --> U+00B7: "·" MIDDLE DOT -->

View File

@ -22,8 +22,8 @@
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
> >
<Key <Key
latin:keyLabel="!" latin:keyLabel="*"
latin:moreKeys="!text/more_keys_for_symbols_exclamation" /> latin:moreKeys="!text/more_keys_for_star" />
<switch> <switch>
<case <case
latin:languageCode="fa" latin:languageCode="fa"
@ -53,9 +53,10 @@
<Key <Key
latin:keyLabel="!text/keylabel_for_symbols_semicolon" latin:keyLabel="!text/keylabel_for_symbols_semicolon"
latin:moreKeys="!text/more_keys_for_symbols_semicolon" /> latin:moreKeys="!text/more_keys_for_symbols_semicolon" />
<Key
latin:keyLabel="/" />
<Key <Key
latin:keyLabel="!text/keylabel_for_symbols_question" latin:keyLabel="!text/keylabel_for_symbols_question"
latin:moreKeys="!text/more_keys_for_symbols_question" /> latin:moreKeys="!text/more_keys_for_symbols_question" />
<Key
latin:keyLabel="!"
latin:moreKeys="!text/more_keys_for_symbols_exclamation" />
</merge> </merge>

View File

@ -34,17 +34,23 @@
<!-- U+221A: "√" SQUARE ROOT --> <!-- U+221A: "√" SQUARE ROOT -->
<Key <Key
latin:keyLabel="&#x221A;" /> latin:keyLabel="&#x221A;" />
<!-- U+03C0: "π" GREEK SMALL LETTER PI <!-- U+03A0: "Π" GREEK CAPITAL LETTER PI
U+03A0: "Π" GREEK CAPITAL LETTER PI --> U+03C0: "π" GREEK SMALL LETTER PI -->
<Key <Key
latin:keyLabel="&#x03C0;" latin:keyLabel="&#x03A0;"
latin:moreKeys="&#x03A0;" /> latin:moreKeys="&#x03C0;" />
<!-- U+00F7: "÷" DIVISION SIGN --> <!-- U+00F7: "÷" DIVISION SIGN -->
<Key <Key
latin:keyLabel="&#x00F7;" /> latin:keyLabel="&#x00F7;" />
<!-- U+00D7: "×" MULTIPLICATION SIGN --> <!-- U+00D7: "×" MULTIPLICATION SIGN -->
<Key <Key
latin:keyLabel="&#x00D7;" /> latin:keyLabel="&#x00D7;" />
<include <!-- U+00B6: "¶" PILCROW SIGN
latin:keyboardLayout="@xml/keys_curly_brackets" /> U+00A7: "§" SECTION SIGN -->
<Key
latin:keyLabel="&#x00B6;"
latin:moreKeys="&#x00A7;" />
<!-- U+2206: "∆" INCREMENT -->
<Key
latin:keyLabel="&#x2206;" />
</merge> </merge>

View File

@ -22,19 +22,14 @@
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
> >
<Key <Key
latin:keyStyle="nonSpecialBackgroundTabKeyStyle" /> latin:keyStyle="moreCurrency1KeyStyle"
<Key latin:keyXPos="5%p" />
latin:keyStyle="moreCurrency1KeyStyle" />
<Key <Key
latin:keyStyle="moreCurrency2KeyStyle" /> latin:keyStyle="moreCurrency2KeyStyle" />
<Key <Key
latin:keyStyle="moreCurrency3KeyStyle" /> latin:keyStyle="moreCurrency3KeyStyle" />
<!-- U+00B0: "°" DEGREE SIGN
U+2032: "" PRIME
U+2033: "″" DOUBLE PRIME -->
<Key <Key
latin:keyLabel="&#x00B0;" latin:keyStyle="moreCurrency4KeyStyle" />
latin:moreKeys="&#x2032;,&#x2033;" />
<!-- U+2191: "↑" UPWARDS ARROW <!-- U+2191: "↑" UPWARDS ARROW
U+2193: "↓" DOWNWARDS ARROW U+2193: "↓" DOWNWARDS ARROW
U+2190: "←" LEFTWARDS ARROW U+2190: "←" LEFTWARDS ARROW
@ -42,8 +37,12 @@
<Key <Key
latin:keyLabel="^" latin:keyLabel="^"
latin:moreKeys="&#x2191;,&#x2193;,&#x2190;,&#x2192;" /> latin:moreKeys="&#x2191;,&#x2193;,&#x2190;,&#x2192;" />
<!-- U+00B0: "°" DEGREE SIGN
U+2032: "" PRIME
U+2033: "″" DOUBLE PRIME -->
<Key <Key
latin:keyLabel="_" /> latin:keyLabel="&#x00B0;"
latin:moreKeys="&#x2032;,&#x2033;" />
<!-- U+2260: "≠" NOT EQUAL TO <!-- U+2260: "≠" NOT EQUAL TO
U+2248: "≈" ALMOST EQUAL TO U+2248: "≈" ALMOST EQUAL TO
U+221E: "∞" INFINITY --> U+221E: "∞" INFINITY -->
@ -51,5 +50,5 @@
latin:keyLabel="=" latin:keyLabel="="
latin:moreKeys="&#x2260;,&#x2248;,&#x221E;" /> latin:moreKeys="&#x2260;,&#x2248;,&#x221E;" />
<include <include
latin:keyboardLayout="@xml/keys_square_brackets" /> latin:keyboardLayout="@xml/keys_curly_brackets" />
</merge> </merge>

View File

@ -21,22 +21,20 @@
<merge <merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
> >
<!-- U+2122: "™" TRADE MARK SIGN -->
<Key <Key
latin:keyLabel="&#x2122;" /> latin:keyLabel="\\" />
<!-- U+00AE: "®" REGISTERED SIGN -->
<Key
latin:keyLabel="&#x00AE;" />
<!-- U+00A9: "©" COPYRIGHT SIGN --> <!-- U+00A9: "©" COPYRIGHT SIGN -->
<Key <Key
latin:keyLabel="&#x00A9;" /> latin:keyLabel="&#x00A9;" />
<!-- U+00B6: "¶" PILCROW SIGN <!-- U+00AE: "®" REGISTERED SIGN -->
U+00A7: "§" SECTION SIGN -->
<Key <Key
latin:keyLabel="&#x00B6;" latin:keyLabel="&#x00AE;" />
latin:moreKeys="&#x00A7;" /> <!-- U+2122: "™" TRADE MARK SIGN -->
<Key <Key
latin:keyLabel="\\" /> latin:keyLabel="&#x2122;" />
<!-- U+2105: "℅" CARE OF -->
<Key
latin:keyLabel="&#x2105;" />
<include <include
latin:keyboardLayout="@xml/keys_less_greater" /> latin:keyboardLayout="@xml/keys_square_brackets" />
</merge> </merge>

View File

@ -35,7 +35,8 @@
latin:keyWidth="10%p" latin:keyWidth="10%p"
> >
<include <include
latin:keyboardLayout="@xml/rowkeys_symbols2" /> latin:keyboardLayout="@xml/rowkeys_symbols2"
latin:keyXPos="5%p" />
</Row> </Row>
<Row <Row
latin:keyWidth="10%p" latin:keyWidth="10%p"

View File

@ -361,8 +361,10 @@ public final class KeyboardTextsSet {
/* 103 */ "\u2030", /* 103 */ "\u2030",
/* 104 */ ",", /* 104 */ ",",
/* 105~ */ /* 105~ */
EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
/* ~108 */ /* ~107 */
// U+2026: "…" HORIZONTAL ELLIPSIS
/* 108 */ "\u2026",
/* 109 */ "\'", /* 109 */ "\'",
/* 110 */ "\"", /* 110 */ "\"",
/* 111 */ "\"", /* 111 */ "\"",

View File

@ -65,12 +65,12 @@ public final class DebugLogUtils {
/** /**
* Get the stack trace contained in an exception as a human-readable string. * Get the stack trace contained in an exception as a human-readable string.
* @param e the exception * @param t the throwable
* @return the human-readable stack trace * @return the human-readable stack trace
*/ */
public static String getStackTrace(final Exception e) { public static String getStackTrace(final Throwable t) {
final StringBuilder sb = new StringBuilder(); final StringBuilder sb = new StringBuilder();
final StackTraceElement[] frames = e.getStackTrace(); final StackTraceElement[] frames = t.getStackTrace();
for (int j = 0; j < frames.length; ++j) { for (int j = 0; j < frames.length; ++j) {
sb.append(frames[j].toString() + "\n"); sb.append(frames[j].toString() + "\n");
} }

View File

@ -170,7 +170,8 @@
<string name="keyhintlabel_for_tablet_comma"></string> <string name="keyhintlabel_for_tablet_comma"></string>
<string name="more_keys_for_tablet_comma"></string> <string name="more_keys_for_tablet_comma"></string>
<string name="keyhintlabel_for_tablet_period"></string> <string name="keyhintlabel_for_tablet_period"></string>
<string name="more_keys_for_tablet_period"></string> <!-- U+2026: "…" HORIZONTAL ELLIPSIS -->
<string name="more_keys_for_tablet_period">&#x2026;</string>
<string name="keylabel_for_apostrophe">\'</string> <string name="keylabel_for_apostrophe">\'</string>
<string name="keyhintlabel_for_apostrophe">\"</string> <string name="keyhintlabel_for_apostrophe">\"</string>
<string name="more_keys_for_apostrophe">\"</string> <string name="more_keys_for_apostrophe">\"</string>