Merge "Optimize layout"

main
Satoshi Kataoka 2013-09-05 13:31:52 +00:00 committed by Android (Google) Code Review
commit b690c03927
16 changed files with 129 additions and 76 deletions

View File

@ -21,20 +21,6 @@
<merge
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 -->
<!-- Base style for shift key. A single space is used for dummy label in moreKeys. -->
<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
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. -->
<include
latin:keyboardLayout="@xml/key_styles_f1" />

View File

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

View File

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

View File

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

View File

@ -27,19 +27,13 @@
<Key
latin:keyStyle="toAlphaKeyStyle"
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
latin:keyXPos="25%p"
latin:keyboardLayout="@xml/key_space" />
<!-- U+2026: "…" HORIZONTAL ELLIPSIS -->
<Key
latin:keyLabel="&#x2026;"
latin:backgroundType="functional" />
latin:keyboardLayout="@xml/keys_less_greater" />
<include
latin:keyXPos="35%p"
latin:keyboardLayout="@xml/key_space_30" />
<include
latin:keyboardLayout="@xml/keys_comma_period" />
<Key
latin:keyStyle="enterKeyStyle"
latin:keyWidth="fillRight" />

View File

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

View File

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

View File

@ -34,17 +34,23 @@
<!-- U+221A: "√" SQUARE ROOT -->
<Key
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
latin:keyLabel="&#x03C0;"
latin:moreKeys="&#x03A0;" />
latin:keyLabel="&#x03A0;"
latin:moreKeys="&#x03C0;" />
<!-- U+00F7: "÷" DIVISION SIGN -->
<Key
latin:keyLabel="&#x00F7;" />
<!-- U+00D7: "×" MULTIPLICATION SIGN -->
<Key
latin:keyLabel="&#x00D7;" />
<include
latin:keyboardLayout="@xml/keys_curly_brackets" />
<!-- U+00B6: "¶" PILCROW SIGN
U+00A7: "§" SECTION SIGN -->
<Key
latin:keyLabel="&#x00B6;"
latin:moreKeys="&#x00A7;" />
<!-- U+2206: "∆" INCREMENT -->
<Key
latin:keyLabel="&#x2206;" />
</merge>

View File

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

View File

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

View File

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

View File

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

View File

@ -65,12 +65,12 @@ public final class DebugLogUtils {
/**
* 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
*/
public static String getStackTrace(final Exception e) {
public static String getStackTrace(final Throwable t) {
final StringBuilder sb = new StringBuilder();
final StackTraceElement[] frames = e.getStackTrace();
final StackTraceElement[] frames = t.getStackTrace();
for (int j = 0; j < frames.length; ++j) {
sb.append(frames[j].toString() + "\n");
}

View File

@ -170,7 +170,8 @@
<string name="keyhintlabel_for_tablet_comma"></string>
<string name="more_keys_for_tablet_comma"></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="keyhintlabel_for_apostrophe">\"</string>
<string name="more_keys_for_apostrophe">\"</string>