eclair snapshot
|
@ -4,9 +4,11 @@
|
||||||
<uses-permission android:name="android.permission.VIBRATE"/>
|
<uses-permission android:name="android.permission.VIBRATE"/>
|
||||||
<uses-permission android:name="android.permission.READ_USER_DICTIONARY" />
|
<uses-permission android:name="android.permission.READ_USER_DICTIONARY" />
|
||||||
<uses-permission android:name="android.permission.WRITE_USER_DICTIONARY" />
|
<uses-permission android:name="android.permission.WRITE_USER_DICTIONARY" />
|
||||||
|
<uses-permission android:name="android.permission.BACKUP_DATA" />
|
||||||
|
|
||||||
<application android:label="@string/english_ime_name"
|
<application android:label="@string/english_ime_name"
|
||||||
android:backupAgent="LatinIMEBackupAgent">
|
android:backupAgent="LatinIMEBackupAgent"
|
||||||
|
android:killAfterRestore="false">
|
||||||
|
|
||||||
<service android:name="LatinIME"
|
<service android:name="LatinIME"
|
||||||
android:label="@string/english_ime_name"
|
android:label="@string/english_ime_name"
|
||||||
|
|
|
@ -42,7 +42,7 @@ static jmethodID sAddWordMethod;
|
||||||
//
|
//
|
||||||
// helper function to throw an exception
|
// helper function to throw an exception
|
||||||
//
|
//
|
||||||
static void throwException(JNIEnv *env, const char* ex, const char* fmt, int data)
|
static void throwException(JNIEnv *env, const char* ex, const char* fmt, int data)
|
||||||
{
|
{
|
||||||
if (jclass cls = env->FindClass(ex)) {
|
if (jclass cls = env->FindClass(ex)) {
|
||||||
char msg[1000];
|
char msg[1000];
|
||||||
|
@ -66,7 +66,7 @@ static jint latinime_BinaryDictionary_open
|
||||||
|
|
||||||
Asset *dictAsset = am->openNonAsset(resourcePath, Asset::ACCESS_BUFFER);
|
Asset *dictAsset = am->openNonAsset(resourcePath, Asset::ACCESS_BUFFER);
|
||||||
if (dictAsset == NULL) {
|
if (dictAsset == NULL) {
|
||||||
LOGE("DICT: Couldn't get asset %s\n", resourcePath);
|
LOGE("DICT: Couldn't get asset %s\n", resourcePath);
|
||||||
env->ReleaseStringUTFChars(resourceString, resourcePath);
|
env->ReleaseStringUTFChars(resourceString, resourcePath);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -79,15 +79,15 @@ static jint latinime_BinaryDictionary_open
|
||||||
}
|
}
|
||||||
Dictionary *dictionary = new Dictionary(dict, typedLetterMultiplier, fullWordMultiplier);
|
Dictionary *dictionary = new Dictionary(dict, typedLetterMultiplier, fullWordMultiplier);
|
||||||
dictionary->setAsset(dictAsset);
|
dictionary->setAsset(dictAsset);
|
||||||
|
|
||||||
env->ReleaseStringUTFChars(resourceString, resourcePath);
|
env->ReleaseStringUTFChars(resourceString, resourcePath);
|
||||||
return (jint) dictionary;
|
return (jint) dictionary;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int latinime_BinaryDictionary_getSuggestions(
|
static int latinime_BinaryDictionary_getSuggestions(
|
||||||
JNIEnv *env, jobject object, jint dict, jintArray inputArray, jint arraySize,
|
JNIEnv *env, jobject object, jint dict, jintArray inputArray, jint arraySize,
|
||||||
jcharArray outputArray, jintArray frequencyArray, jint maxWordLength, jint maxWords,
|
jcharArray outputArray, jintArray frequencyArray, jint maxWordLength, jint maxWords,
|
||||||
jint maxAlternatives)
|
jint maxAlternatives, jint skipPos)
|
||||||
{
|
{
|
||||||
Dictionary *dictionary = (Dictionary*) dict;
|
Dictionary *dictionary = (Dictionary*) dict;
|
||||||
if (dictionary == NULL)
|
if (dictionary == NULL)
|
||||||
|
@ -96,9 +96,9 @@ static int latinime_BinaryDictionary_getSuggestions(
|
||||||
int *frequencies = env->GetIntArrayElements(frequencyArray, NULL);
|
int *frequencies = env->GetIntArrayElements(frequencyArray, NULL);
|
||||||
int *inputCodes = env->GetIntArrayElements(inputArray, NULL);
|
int *inputCodes = env->GetIntArrayElements(inputArray, NULL);
|
||||||
jchar *outputChars = env->GetCharArrayElements(outputArray, NULL);
|
jchar *outputChars = env->GetCharArrayElements(outputArray, NULL);
|
||||||
|
|
||||||
int count = dictionary->getSuggestions(inputCodes, arraySize, (unsigned short*) outputChars, frequencies,
|
int count = dictionary->getSuggestions(inputCodes, arraySize, (unsigned short*) outputChars, frequencies,
|
||||||
maxWordLength, maxWords, maxAlternatives);
|
maxWordLength, maxWords, maxAlternatives, skipPos);
|
||||||
|
|
||||||
env->ReleaseIntArrayElements(frequencyArray, frequencies, 0);
|
env->ReleaseIntArrayElements(frequencyArray, frequencies, 0);
|
||||||
env->ReleaseIntArrayElements(inputArray, inputCodes, JNI_ABORT);
|
env->ReleaseIntArrayElements(inputArray, inputCodes, JNI_ABORT);
|
||||||
|
@ -112,16 +112,16 @@ static jboolean latinime_BinaryDictionary_isValidWord
|
||||||
{
|
{
|
||||||
Dictionary *dictionary = (Dictionary*) dict;
|
Dictionary *dictionary = (Dictionary*) dict;
|
||||||
if (dictionary == NULL) return (jboolean) false;
|
if (dictionary == NULL) return (jboolean) false;
|
||||||
|
|
||||||
jchar *word = env->GetCharArrayElements(wordArray, NULL);
|
jchar *word = env->GetCharArrayElements(wordArray, NULL);
|
||||||
jboolean result = dictionary->isValidWord((unsigned short*) word, wordLength);
|
jboolean result = dictionary->isValidWord((unsigned short*) word, wordLength);
|
||||||
env->ReleaseCharArrayElements(wordArray, word, JNI_ABORT);
|
env->ReleaseCharArrayElements(wordArray, word, JNI_ABORT);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void latinime_BinaryDictionary_close
|
static void latinime_BinaryDictionary_close
|
||||||
(JNIEnv *env, jobject object, jint dict)
|
(JNIEnv *env, jobject object, jint dict)
|
||||||
{
|
{
|
||||||
Dictionary *dictionary = (Dictionary*) dict;
|
Dictionary *dictionary = (Dictionary*) dict;
|
||||||
((Asset*) dictionary->getAsset())->close();
|
((Asset*) dictionary->getAsset())->close();
|
||||||
|
@ -131,10 +131,10 @@ static void latinime_BinaryDictionary_close
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
static JNINativeMethod gMethods[] = {
|
static JNINativeMethod gMethods[] = {
|
||||||
{"openNative", "(Landroid/content/res/AssetManager;Ljava/lang/String;II)I",
|
{"openNative", "(Landroid/content/res/AssetManager;Ljava/lang/String;II)I",
|
||||||
(void*)latinime_BinaryDictionary_open},
|
(void*)latinime_BinaryDictionary_open},
|
||||||
{"closeNative", "(I)V", (void*)latinime_BinaryDictionary_close},
|
{"closeNative", "(I)V", (void*)latinime_BinaryDictionary_close},
|
||||||
{"getSuggestionsNative", "(I[II[C[IIII)I", (void*)latinime_BinaryDictionary_getSuggestions},
|
{"getSuggestionsNative", "(I[II[C[IIIII)I", (void*)latinime_BinaryDictionary_getSuggestions},
|
||||||
{"isValidWordNative", "(I[CI)Z", (void*)latinime_BinaryDictionary_isValidWord}
|
{"isValidWordNative", "(I[CI)Z", (void*)latinime_BinaryDictionary_isValidWord}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ static int registerNativeMethods(JNIEnv* env, const char* className,
|
||||||
fprintf(stderr, "RegisterNatives failed for '%s'\n", className);
|
fprintf(stderr, "RegisterNatives failed for '%s'\n", className);
|
||||||
return JNI_FALSE;
|
return JNI_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return JNI_TRUE;
|
return JNI_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,21 +161,21 @@ static int registerNatives(JNIEnv *env)
|
||||||
{
|
{
|
||||||
const char* const kClassPathName = "com/android/inputmethod/latin/BinaryDictionary";
|
const char* const kClassPathName = "com/android/inputmethod/latin/BinaryDictionary";
|
||||||
jclass clazz;
|
jclass clazz;
|
||||||
|
|
||||||
clazz = env->FindClass("java/io/FileDescriptor");
|
clazz = env->FindClass("java/io/FileDescriptor");
|
||||||
if (clazz == NULL) {
|
if (clazz == NULL) {
|
||||||
LOGE("Can't find %s", "java/io/FileDescriptor");
|
LOGE("Can't find %s", "java/io/FileDescriptor");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
sDescriptorField = env->GetFieldID(clazz, "descriptor", "I");
|
sDescriptorField = env->GetFieldID(clazz, "descriptor", "I");
|
||||||
|
|
||||||
clazz = env->FindClass("android/content/res/AssetManager");
|
clazz = env->FindClass("android/content/res/AssetManager");
|
||||||
if (clazz == NULL) {
|
if (clazz == NULL) {
|
||||||
LOGE("Can't find %s", "java/io/FileDescriptor");
|
LOGE("Can't find %s", "java/io/FileDescriptor");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
sAssetManagerNativeField = env->GetFieldID(clazz, "mObject", "I");
|
sAssetManagerNativeField = env->GetFieldID(clazz, "mObject", "I");
|
||||||
|
|
||||||
return registerNativeMethods(env,
|
return registerNativeMethods(env,
|
||||||
kClassPathName, gMethods, sizeof(gMethods) / sizeof(gMethods[0]));
|
kClassPathName, gMethods, sizeof(gMethods) / sizeof(gMethods[0]));
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,11 +49,8 @@ Dictionary::~Dictionary()
|
||||||
}
|
}
|
||||||
|
|
||||||
int Dictionary::getSuggestions(int *codes, int codesSize, unsigned short *outWords, int *frequencies,
|
int Dictionary::getSuggestions(int *codes, int codesSize, unsigned short *outWords, int *frequencies,
|
||||||
int maxWordLength, int maxWords, int maxAlternatives)
|
int maxWordLength, int maxWords, int maxAlternatives, int skipPos)
|
||||||
{
|
{
|
||||||
memset(frequencies, 0, maxWords * sizeof(*frequencies));
|
|
||||||
memset(outWords, 0, maxWords * maxWordLength * sizeof(*outWords));
|
|
||||||
|
|
||||||
mFrequencies = frequencies;
|
mFrequencies = frequencies;
|
||||||
mOutputChars = outWords;
|
mOutputChars = outWords;
|
||||||
mInputCodes = codes;
|
mInputCodes = codes;
|
||||||
|
@ -62,8 +59,10 @@ int Dictionary::getSuggestions(int *codes, int codesSize, unsigned short *outWor
|
||||||
mMaxWordLength = maxWordLength;
|
mMaxWordLength = maxWordLength;
|
||||||
mMaxWords = maxWords;
|
mMaxWords = maxWords;
|
||||||
mWords = 0;
|
mWords = 0;
|
||||||
|
mSkipPos = skipPos;
|
||||||
|
mMaxEditDistance = mInputLength < 5 ? 2 : mInputLength / 2;
|
||||||
|
|
||||||
getWordsRec(0, 0, mInputLength * 3, false, 1, 0);
|
getWordsRec(0, 0, mInputLength * 3, false, 1, 0, 0);
|
||||||
|
|
||||||
if (DEBUG_DICT) LOGI("Returning %d words", mWords);
|
if (DEBUG_DICT) LOGI("Returning %d words", mWords);
|
||||||
return mWords;
|
return mWords;
|
||||||
|
@ -110,7 +109,11 @@ bool
|
||||||
Dictionary::addWord(unsigned short *word, int length, int frequency)
|
Dictionary::addWord(unsigned short *word, int length, int frequency)
|
||||||
{
|
{
|
||||||
word[length] = 0;
|
word[length] = 0;
|
||||||
if (DEBUG_DICT) LOGI("Found word = %s, freq = %d : \n", word, frequency);
|
if (DEBUG_DICT) {
|
||||||
|
char s[length + 1];
|
||||||
|
for (int i = 0; i <= length; i++) s[i] = word[i];
|
||||||
|
LOGI("Found word = %s, freq = %d : \n", s, frequency);
|
||||||
|
}
|
||||||
|
|
||||||
// Find the right insertion point
|
// Find the right insertion point
|
||||||
int insertAt = 0;
|
int insertAt = 0;
|
||||||
|
@ -144,16 +147,14 @@ Dictionary::addWord(unsigned short *word, int length, int frequency)
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned short
|
unsigned short
|
||||||
Dictionary::toLowerCase(unsigned short c, const int depth) {
|
Dictionary::toLowerCase(unsigned short c) {
|
||||||
if (c < sizeof(BASE_CHARS) / sizeof(BASE_CHARS[0])) {
|
if (c < sizeof(BASE_CHARS) / sizeof(BASE_CHARS[0])) {
|
||||||
c = BASE_CHARS[c];
|
c = BASE_CHARS[c];
|
||||||
}
|
}
|
||||||
if (depth == 0) {
|
if (c >='A' && c <= 'Z') {
|
||||||
if (c >='A' && c <= 'Z') {
|
c |= 32;
|
||||||
c |= 32;
|
} else if (c > 127) {
|
||||||
} else if (c > 127) {
|
c = u_tolower(c);
|
||||||
c = u_tolower(c);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
@ -178,12 +179,16 @@ Dictionary::sameAsTyped(unsigned short *word, int length)
|
||||||
static char QUOTE = '\'';
|
static char QUOTE = '\'';
|
||||||
|
|
||||||
void
|
void
|
||||||
Dictionary::getWordsRec(int pos, int depth, int maxDepth, bool completion, int snr, int inputIndex)
|
Dictionary::getWordsRec(int pos, int depth, int maxDepth, bool completion, int snr, int inputIndex,
|
||||||
|
int diffs)
|
||||||
{
|
{
|
||||||
// Optimization: Prune out words that are too long compared to how much was typed.
|
// Optimization: Prune out words that are too long compared to how much was typed.
|
||||||
if (depth > maxDepth) {
|
if (depth > maxDepth) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (diffs > mMaxEditDistance) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
int count = getCount(&pos);
|
int count = getCount(&pos);
|
||||||
int *currentChars = NULL;
|
int *currentChars = NULL;
|
||||||
if (mInputLength <= inputIndex) {
|
if (mInputLength <= inputIndex) {
|
||||||
|
@ -194,7 +199,7 @@ Dictionary::getWordsRec(int pos, int depth, int maxDepth, bool completion, int s
|
||||||
|
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
unsigned short c = getChar(&pos);
|
unsigned short c = getChar(&pos);
|
||||||
unsigned short lowerC = toLowerCase(c, depth);
|
unsigned short lowerC = toLowerCase(c);
|
||||||
bool terminal = getTerminal(&pos);
|
bool terminal = getTerminal(&pos);
|
||||||
int childrenAddress = getAddress(&pos);
|
int childrenAddress = getAddress(&pos);
|
||||||
int freq = 1;
|
int freq = 1;
|
||||||
|
@ -207,38 +212,41 @@ Dictionary::getWordsRec(int pos, int depth, int maxDepth, bool completion, int s
|
||||||
}
|
}
|
||||||
if (childrenAddress != 0) {
|
if (childrenAddress != 0) {
|
||||||
getWordsRec(childrenAddress, depth + 1, maxDepth,
|
getWordsRec(childrenAddress, depth + 1, maxDepth,
|
||||||
completion, snr, inputIndex);
|
completion, snr, inputIndex, diffs);
|
||||||
}
|
}
|
||||||
} else if (c == QUOTE && currentChars[0] != QUOTE) {
|
} else if (c == QUOTE && currentChars[0] != QUOTE || mSkipPos == depth) {
|
||||||
// Skip the ' and continue deeper
|
// Skip the ' or other letter and continue deeper
|
||||||
mWord[depth] = QUOTE;
|
mWord[depth] = c;
|
||||||
if (childrenAddress != 0) {
|
if (childrenAddress != 0) {
|
||||||
getWordsRec(childrenAddress, depth + 1, maxDepth, false, snr, inputIndex);
|
getWordsRec(childrenAddress, depth + 1, maxDepth, false, snr, inputIndex, diffs);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
int j = 0;
|
int j = 0;
|
||||||
while (currentChars[j] > 0) {
|
while (currentChars[j] > 0) {
|
||||||
int addedWeight = j == 0 ? mTypedLetterMultiplier : 1;
|
|
||||||
if (currentChars[j] == lowerC || currentChars[j] == c) {
|
if (currentChars[j] == lowerC || currentChars[j] == c) {
|
||||||
|
int addedWeight = j == 0 ? mTypedLetterMultiplier : 1;
|
||||||
mWord[depth] = c;
|
mWord[depth] = c;
|
||||||
if (mInputLength == inputIndex + 1) {
|
if (mInputLength == inputIndex + 1) {
|
||||||
if (terminal) {
|
if (terminal) {
|
||||||
if (//INCLUDE_TYPED_WORD_IF_VALID ||
|
if (//INCLUDE_TYPED_WORD_IF_VALID ||
|
||||||
!sameAsTyped(mWord, depth + 1)) {
|
!sameAsTyped(mWord, depth + 1)) {
|
||||||
addWord(mWord, depth + 1,
|
int finalFreq = freq * snr * addedWeight;
|
||||||
(freq * snr * addedWeight * mFullWordMultiplier));
|
if (mSkipPos < 0) finalFreq *= mFullWordMultiplier;
|
||||||
|
addWord(mWord, depth + 1, finalFreq);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (childrenAddress != 0) {
|
if (childrenAddress != 0) {
|
||||||
getWordsRec(childrenAddress, depth + 1,
|
getWordsRec(childrenAddress, depth + 1,
|
||||||
maxDepth, true, snr * addedWeight, inputIndex + 1);
|
maxDepth, true, snr * addedWeight, inputIndex + 1,
|
||||||
|
diffs + (j > 0));
|
||||||
}
|
}
|
||||||
} else if (childrenAddress != 0) {
|
} else if (childrenAddress != 0) {
|
||||||
getWordsRec(childrenAddress, depth + 1, maxDepth,
|
getWordsRec(childrenAddress, depth + 1, maxDepth,
|
||||||
false, snr * addedWeight, inputIndex + 1);
|
false, snr * addedWeight, inputIndex + 1, diffs + (j > 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
j++;
|
j++;
|
||||||
|
if (mSkipPos >= 0) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ class Dictionary {
|
||||||
public:
|
public:
|
||||||
Dictionary(void *dict, int typedLetterMultipler, int fullWordMultiplier);
|
Dictionary(void *dict, int typedLetterMultipler, int fullWordMultiplier);
|
||||||
int getSuggestions(int *codes, int codesSize, unsigned short *outWords, int *frequencies,
|
int getSuggestions(int *codes, int codesSize, unsigned short *outWords, int *frequencies,
|
||||||
int maxWordLength, int maxWords, int maxAlternatives);
|
int maxWordLength, int maxWords, int maxAlternatives, int skipPos);
|
||||||
bool isValidWord(unsigned short *word, int length);
|
bool isValidWord(unsigned short *word, int length);
|
||||||
void setAsset(void *asset) { mAsset = asset; }
|
void setAsset(void *asset) { mAsset = asset; }
|
||||||
void *getAsset() { return mAsset; }
|
void *getAsset() { return mAsset; }
|
||||||
|
@ -49,9 +49,9 @@ private:
|
||||||
|
|
||||||
bool sameAsTyped(unsigned short *word, int length);
|
bool sameAsTyped(unsigned short *word, int length);
|
||||||
bool addWord(unsigned short *word, int length, int frequency);
|
bool addWord(unsigned short *word, int length, int frequency);
|
||||||
unsigned short toLowerCase(unsigned short c, int depth);
|
unsigned short toLowerCase(unsigned short c);
|
||||||
void getWordsRec(int pos, int depth, int maxDepth, bool completion, int frequency,
|
void getWordsRec(int pos, int depth, int maxDepth, bool completion, int frequency,
|
||||||
int inputIndex);
|
int inputIndex, int diffs);
|
||||||
bool isValidWordRec(int pos, unsigned short *word, int offset, int length);
|
bool isValidWordRec(int pos, unsigned short *word, int offset, int length);
|
||||||
|
|
||||||
unsigned char *mDict;
|
unsigned char *mDict;
|
||||||
|
@ -66,6 +66,8 @@ private:
|
||||||
int mInputLength;
|
int mInputLength;
|
||||||
int mMaxAlternatives;
|
int mMaxAlternatives;
|
||||||
unsigned short mWord[128];
|
unsigned short mWord[128];
|
||||||
|
int mSkipPos;
|
||||||
|
int mMaxEditDistance;
|
||||||
|
|
||||||
int mFullWordMultiplier;
|
int mFullWordMultiplier;
|
||||||
int mTypedLetterMultiplier;
|
int mTypedLetterMultiplier;
|
||||||
|
|
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 524 B After Width: | Height: | Size: 524 B |
After Width: | Height: | Size: 696 B |
After Width: | Height: | Size: 941 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 696 B |
After Width: | Height: | Size: 964 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 833 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 807 B |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 619 B |
After Width: | Height: | Size: 619 B |
After Width: | Height: | Size: 200 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 172 B |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 442 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 838 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 885 B |
After Width: | Height: | Size: 700 B |
After Width: | Height: | Size: 287 B |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 809 B |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 371 B |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 8.4 KiB |
After Width: | Height: | Size: 737 B |
After Width: | Height: | Size: 941 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 964 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 172 B |
After Width: | Height: | Size: 818 B |
After Width: | Height: | Size: 860 B |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 740 B |
After Width: | Height: | Size: 836 B |
After Width: | Height: | Size: 886 B |
Before Width: | Height: | Size: 166 B After Width: | Height: | Size: 166 B |
|
@ -0,0 +1,38 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright (C) 2008 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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<!-- Toggle keys. Use checkable/checked state. -->
|
||||||
|
|
||||||
|
<item android:state_checkable="true" android:state_checked="true"
|
||||||
|
android:state_pressed="true"
|
||||||
|
android:drawable="@drawable/btn_keyboard_key_pressed_on" />
|
||||||
|
<item android:state_checkable="true" android:state_pressed="true"
|
||||||
|
android:drawable="@drawable/btn_keyboard_key_pressed_off" />
|
||||||
|
<item android:state_checkable="true" android:state_checked="true"
|
||||||
|
android:drawable="@drawable/btn_keyboard_key_normal_on" />
|
||||||
|
<item android:state_checkable="true"
|
||||||
|
android:drawable="@drawable/btn_keyboard_key_normal_off" />
|
||||||
|
|
||||||
|
<!-- Normal keys -->
|
||||||
|
|
||||||
|
<item android:state_pressed="true"
|
||||||
|
android:drawable="@drawable/btn_keyboard_key_pressed" />
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/btn_keyboard_key_normal" />
|
||||||
|
|
||||||
|
</selector>
|
After Width: | Height: | Size: 809 B |
After Width: | Height: | Size: 860 B |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 736 B |
After Width: | Height: | Size: 836 B |
After Width: | Height: | Size: 886 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 593 B After Width: | Height: | Size: 593 B |
Before Width: | Height: | Size: 528 B After Width: | Height: | Size: 528 B |
Before Width: | Height: | Size: 445 B After Width: | Height: | Size: 445 B |
Before Width: | Height: | Size: 440 B After Width: | Height: | Size: 440 B |