Change symbol to use black icons

Change-Id: I834efd322b4ef6e99707028d38223d837a3d4e36
main
satok 2010-05-27 21:26:23 +09:00
parent f22d479e48
commit bf336cb4a2
53 changed files with 38 additions and 11 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 792 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1008 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 859 B

After

Width:  |  Height:  |  Size: 859 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 800 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 775 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 838 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 910 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 943 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 834 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 998 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 605 B

View File

@ -227,6 +227,7 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
LatinKeyboard keyboard = new LatinKeyboard(
mContext, id.mXml, id.mKeyboardMode);
keyboard.setVoiceMode(hasVoiceButton(id.mXml == R.xml.kbd_symbols), mHasVoice);
keyboard.setBlackFlag(isBlackSym());
keyboard.setLanguageSwitcher(mLanguageSwitcher);
if (id.mKeyboardMode == KEYBOARDMODE_NORMAL
|| id.mKeyboardMode == KEYBOARDMODE_URL
@ -250,6 +251,8 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
private KeyboardId getKeyboardId(int mode, int imeOptions, boolean isSymbols) {
boolean hasVoice = hasVoiceButton(isSymbols);
// TODO: generalize for any KeyboardId
int keyboardRowsResId = isBlackSym() ? R.xml.kbd_qwerty_black : R.xml.kbd_qwerty;
if (isSymbols) {
return (mode == MODE_PHONE)
? new KeyboardId(R.xml.kbd_phone_symbols, hasVoice)
@ -258,7 +261,7 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
switch (mode) {
case MODE_TEXT:
if (mTextMode == MODE_TEXT_QWERTY) {
return new KeyboardId(R.xml.kbd_qwerty, KEYBOARDMODE_NORMAL, true, hasVoice);
return new KeyboardId(keyboardRowsResId, KEYBOARDMODE_NORMAL, true, hasVoice);
} else if (mTextMode == MODE_TEXT_ALPHA) {
return new KeyboardId(R.xml.kbd_alpha, KEYBOARDMODE_NORMAL, true, hasVoice);
}
@ -268,13 +271,13 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
case MODE_PHONE:
return new KeyboardId(R.xml.kbd_phone, hasVoice);
case MODE_URL:
return new KeyboardId(R.xml.kbd_qwerty, KEYBOARDMODE_URL, true, hasVoice);
return new KeyboardId(keyboardRowsResId, KEYBOARDMODE_URL, true, hasVoice);
case MODE_EMAIL:
return new KeyboardId(R.xml.kbd_qwerty, KEYBOARDMODE_EMAIL, true, hasVoice);
return new KeyboardId(keyboardRowsResId, KEYBOARDMODE_EMAIL, true, hasVoice);
case MODE_IM:
return new KeyboardId(R.xml.kbd_qwerty, KEYBOARDMODE_IM, true, hasVoice);
return new KeyboardId(keyboardRowsResId, KEYBOARDMODE_IM, true, hasVoice);
case MODE_WEB:
return new KeyboardId(R.xml.kbd_qwerty, KEYBOARDMODE_WEB, true, hasVoice);
return new KeyboardId(keyboardRowsResId, KEYBOARDMODE_WEB, true, hasVoice);
}
return null;
}
@ -397,4 +400,9 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
Integer.valueOf(sharedPreferences.getString(key, DEFAULT_LAYOUT_ID)), false);
}
}
// TODO: Generalize for any theme
public boolean isBlackSym () {
return (mLayoutId == 6 && mLanguageSwitcher.getInputLanguage().indexOf("en_") >= 0);
}
}

View File

@ -81,8 +81,10 @@ public class LatinKeyboard extends Keyboard {
private int mPrefLetterY;
private int mPrefDistance;
private int mExtensionResId;
private int mExtensionResId;
// TODO: generalize for any keyboardId
private boolean mIsBlackSym;
private static final int SHIFT_OFF = 0;
private static final int SHIFT_ON = 1;
private static final int SHIFT_LOCKED = 2;
@ -177,8 +179,8 @@ public class LatinKeyboard extends Keyboard {
case EditorInfo.IME_ACTION_SEARCH:
mEnterKey.iconPreview = res.getDrawable(
R.drawable.sym_keyboard_feedback_search);
mEnterKey.icon = res.getDrawable(
R.drawable.sym_keyboard_search);
mEnterKey.icon = res.getDrawable(mIsBlackSym ?
R.drawable.sym_bkeyboard_search : R.drawable.sym_keyboard_search);
mEnterKey.label = null;
break;
case EditorInfo.IME_ACTION_SEND:
@ -196,8 +198,8 @@ public class LatinKeyboard extends Keyboard {
} else {
mEnterKey.iconPreview = res.getDrawable(
R.drawable.sym_keyboard_feedback_return);
mEnterKey.icon = res.getDrawable(
R.drawable.sym_keyboard_return);
mEnterKey.icon = res.getDrawable(mIsBlackSym ?
R.drawable.sym_bkeyboard_return : R.drawable.sym_keyboard_return);
mEnterKey.label = null;
}
break;
@ -279,6 +281,23 @@ public class LatinKeyboard extends Keyboard {
return mExtensionResId;
}
public void setBlackFlag(boolean f) {
mIsBlackSym = f;
if (f) {
mShiftLockIcon = mRes.getDrawable(R.drawable.sym_bkeyboard_shift_locked);
mSpaceIcon = mRes.getDrawable(R.drawable.sym_bkeyboard_space);
mMicIcon = mRes.getDrawable(R.drawable.sym_bkeyboard_mic);
m123MicIcon = mRes.getDrawable(R.drawable.sym_bkeyboard_123_mic);
mF1Key.icon = mRes.getDrawable(R.drawable.sym_bkeyboard_mic);
} else {
mShiftLockIcon = mRes.getDrawable(R.drawable.sym_keyboard_shift_locked);
mSpaceIcon = mRes.getDrawable(R.drawable.sym_keyboard_space);
mMicIcon = mRes.getDrawable(R.drawable.sym_keyboard_mic);
m123MicIcon = mRes.getDrawable(R.drawable.sym_keyboard_123_mic);
mF1Key.icon = mRes.getDrawable(R.drawable.sym_keyboard_mic);
}
}
private void setDefaultBounds(Drawable drawable) {
drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
}