aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi Takaoka <takaoka@aluminum.tok.corp.google.com>2010-11-05 18:30:22 +0900
committerTadashi G. Takaoka <takaoka@google.com>2010-11-05 18:36:19 +0900
commit68864723cf8d8e48385bfcaf30237fba25a8895a (patch)
tree5643555ece547c78c06ce83e6efd57a537d53321 /java/src
parent38976d5b968e8c9fe57f95b732d1906b7a6f09fa (diff)
downloadlatinime-68864723cf8d8e48385bfcaf30237fba25a8895a.tar.gz
latinime-68864723cf8d8e48385bfcaf30237fba25a8895a.tar.xz
latinime-68864723cf8d8e48385bfcaf30237fba25a8895a.zip
Rename LatinKeyboardBaseView class to KeyboardBaseView
Change-Id: I496ecbfa7d398583d01f821398f49f75d17311d8
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/BaseKeyboardView.java (renamed from java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java)64
-rw-r--r--java/src/com/android/inputmethod/latin/KeyDetector.java2
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java8
-rw-r--r--java/src/com/android/inputmethod/latin/LatinKeyboardView.java6
-rw-r--r--java/src/com/android/inputmethod/latin/MiniKeyboardKeyDetector.java4
-rw-r--r--java/src/com/android/inputmethod/latin/PointerTracker.java6
-rw-r--r--java/src/com/android/inputmethod/latin/ProximityKeyDetector.java6
7 files changed, 48 insertions, 48 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java b/java/src/com/android/inputmethod/latin/BaseKeyboardView.java
index b2635ad9c..4ba6fbddc 100644
--- a/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java
+++ b/java/src/com/android/inputmethod/latin/BaseKeyboardView.java
@@ -59,17 +59,17 @@ import java.util.WeakHashMap;
*
* TODO: References to LatinKeyboard in this class should be replaced with ones to its base class.
*
- * @attr ref R.styleable#LatinKeyboardBaseView_keyBackground
- * @attr ref R.styleable#LatinKeyboardBaseView_keyPreviewLayout
- * @attr ref R.styleable#LatinKeyboardBaseView_keyPreviewOffset
- * @attr ref R.styleable#LatinKeyboardBaseView_labelTextSize
- * @attr ref R.styleable#LatinKeyboardBaseView_keyTextSize
- * @attr ref R.styleable#LatinKeyboardBaseView_keyTextColor
- * @attr ref R.styleable#LatinKeyboardBaseView_verticalCorrection
- * @attr ref R.styleable#LatinKeyboardBaseView_popupLayout
+ * @attr ref R.styleable#BaseKeyboardView_keyBackground
+ * @attr ref R.styleable#BaseKeyboardView_keyPreviewLayout
+ * @attr ref R.styleable#BaseKeyboardView_keyPreviewOffset
+ * @attr ref R.styleable#BaseKeyboardView_labelTextSize
+ * @attr ref R.styleable#BaseKeyboardView_keyTextSize
+ * @attr ref R.styleable#BaseKeyboardView_keyTextColor
+ * @attr ref R.styleable#BaseKeyboardView_verticalCorrection
+ * @attr ref R.styleable#BaseKeyboardView_popupLayout
*/
-public class LatinKeyboardBaseView extends View implements PointerTracker.UIProxy {
- private static final String TAG = "LatinKeyboardBaseView";
+public class BaseKeyboardView extends View implements PointerTracker.UIProxy {
+ private static final String TAG = "BaseKeyboardView";
private static final boolean DEBUG = false;
public static final int NOT_A_TOUCH_COORDINATE = -1;
@@ -204,7 +204,7 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx
// Popup mini keyboard
private PopupWindow mMiniKeyboardPopup;
- private LatinKeyboardBaseView mMiniKeyboard;
+ private BaseKeyboardView mMiniKeyboard;
private View mMiniKeyboardParent;
private final WeakHashMap<Key, View> mMiniKeyboardCache = new WeakHashMap<Key, View>();
private int mMiniKeyboardOriginX;
@@ -412,15 +412,15 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx
}
}
- public LatinKeyboardBaseView(Context context, AttributeSet attrs) {
+ public BaseKeyboardView(Context context, AttributeSet attrs) {
this(context, attrs, R.attr.keyboardViewStyle);
}
- public LatinKeyboardBaseView(Context context, AttributeSet attrs, int defStyle) {
+ public BaseKeyboardView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
TypedArray a = context.obtainStyledAttributes(
- attrs, R.styleable.LatinKeyboardBaseView, defStyle, R.style.LatinKeyboardBaseView);
+ attrs, R.styleable.BaseKeyboardView, defStyle, R.style.BaseKeyboardView);
LayoutInflater inflate =
(LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
int previewLayout = 0;
@@ -432,48 +432,48 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx
int attr = a.getIndex(i);
switch (attr) {
- case R.styleable.LatinKeyboardBaseView_keyBackground:
+ case R.styleable.BaseKeyboardView_keyBackground:
mKeyBackground = a.getDrawable(attr);
break;
- case R.styleable.LatinKeyboardBaseView_keyHysteresisDistance:
+ case R.styleable.BaseKeyboardView_keyHysteresisDistance:
mKeyHysteresisDistance = a.getDimensionPixelOffset(attr, 0);
break;
- case R.styleable.LatinKeyboardBaseView_verticalCorrection:
+ case R.styleable.BaseKeyboardView_verticalCorrection:
mVerticalCorrection = a.getDimensionPixelOffset(attr, 0);
break;
- case R.styleable.LatinKeyboardBaseView_keyPreviewLayout:
+ case R.styleable.BaseKeyboardView_keyPreviewLayout:
previewLayout = a.getResourceId(attr, 0);
break;
- case R.styleable.LatinKeyboardBaseView_keyPreviewOffset:
+ case R.styleable.BaseKeyboardView_keyPreviewOffset:
mPreviewOffset = a.getDimensionPixelOffset(attr, 0);
break;
- case R.styleable.LatinKeyboardBaseView_keyPreviewHeight:
+ case R.styleable.BaseKeyboardView_keyPreviewHeight:
mPreviewHeight = a.getDimensionPixelSize(attr, 80);
break;
- case R.styleable.LatinKeyboardBaseView_keyTextSize:
+ case R.styleable.BaseKeyboardView_keyTextSize:
mKeyTextSize = a.getDimensionPixelSize(attr, 18);
break;
- case R.styleable.LatinKeyboardBaseView_keyTextColor:
+ case R.styleable.BaseKeyboardView_keyTextColor:
mKeyTextColor = a.getColor(attr, 0xFF000000);
break;
- case R.styleable.LatinKeyboardBaseView_labelTextSize:
+ case R.styleable.BaseKeyboardView_labelTextSize:
mLabelTextSize = a.getDimensionPixelSize(attr, 14);
break;
- case R.styleable.LatinKeyboardBaseView_popupLayout:
+ case R.styleable.BaseKeyboardView_popupLayout:
mPopupLayout = a.getResourceId(attr, 0);
break;
- case R.styleable.LatinKeyboardBaseView_shadowColor:
+ case R.styleable.BaseKeyboardView_shadowColor:
mShadowColor = a.getColor(attr, 0);
break;
- case R.styleable.LatinKeyboardBaseView_shadowRadius:
+ case R.styleable.BaseKeyboardView_shadowRadius:
mShadowRadius = a.getFloat(attr, 0f);
break;
// TODO: Use Theme (android.R.styleable.Theme_backgroundDimAmount)
- case R.styleable.LatinKeyboardBaseView_backgroundDimAmount:
+ case R.styleable.BaseKeyboardView_backgroundDimAmount:
mBackgroundDimAmount = a.getFloat(attr, 0.5f);
break;
//case android.R.styleable.
- case R.styleable.LatinKeyboardBaseView_keyTextStyle:
+ case R.styleable.BaseKeyboardView_keyTextStyle:
int textStyle = a.getInt(attr, 0);
switch (textStyle) {
case 0:
@@ -487,7 +487,7 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx
break;
}
break;
- case R.styleable.LatinKeyboardBaseView_symbolColorScheme:
+ case R.styleable.BaseKeyboardView_symbolColorScheme:
mSymbolColorScheme = a.getInt(attr, 0);
break;
}
@@ -1089,8 +1089,8 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx
if (container == null)
throw new NullPointerException();
- LatinKeyboardBaseView miniKeyboard =
- (LatinKeyboardBaseView)container.findViewById(R.id.LatinKeyboardBaseView);
+ BaseKeyboardView miniKeyboard =
+ (BaseKeyboardView)container.findViewById(R.id.BaseKeyboardView);
miniKeyboard.setOnKeyboardActionListener(new OnKeyboardActionListener() {
public void onKey(int primaryCode, int[] keyCodes, int x, int y) {
mKeyboardActionListener.onKey(primaryCode, keyCodes, x, y);
@@ -1174,7 +1174,7 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx
container = inflateMiniKeyboardContainer(popupKey);
mMiniKeyboardCache.put(popupKey, container);
}
- mMiniKeyboard = (LatinKeyboardBaseView)container.findViewById(R.id.LatinKeyboardBaseView);
+ mMiniKeyboard = (BaseKeyboardView)container.findViewById(R.id.BaseKeyboardView);
if (mWindowOffset == null) {
mWindowOffset = new int[2];
getLocationInWindow(mWindowOffset);
diff --git a/java/src/com/android/inputmethod/latin/KeyDetector.java b/java/src/com/android/inputmethod/latin/KeyDetector.java
index 3902b60a3..600a12fe5 100644
--- a/java/src/com/android/inputmethod/latin/KeyDetector.java
+++ b/java/src/com/android/inputmethod/latin/KeyDetector.java
@@ -84,7 +84,7 @@ abstract class KeyDetector {
*/
public int[] newCodeArray() {
int[] codes = new int[getMaxNearbyKeys()];
- Arrays.fill(codes, LatinKeyboardBaseView.NOT_A_KEY);
+ Arrays.fill(codes, BaseKeyboardView.NOT_A_KEY);
return codes;
}
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 5edbc2861..c255237e7 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -79,7 +79,7 @@ import java.util.Map;
* Input method implementation for Qwerty'ish keyboard.
*/
public class LatinIME extends InputMethodService
- implements LatinKeyboardBaseView.OnKeyboardActionListener,
+ implements BaseKeyboardView.OnKeyboardActionListener,
VoiceInput.UiListener,
SharedPreferences.OnSharedPreferenceChangeListener {
private static final String TAG = "LatinIME";
@@ -741,7 +741,7 @@ public class LatinIME extends InputMethodService
@Override
public void onFinishInputView(boolean finishingInput) {
super.onFinishInputView(finishingInput);
- LatinKeyboardBaseView inputView = mKeyboardSwitcher.getInputView();
+ BaseKeyboardView inputView = mKeyboardSwitcher.getInputView();
if (inputView != null)
inputView.setForeground(false);
// Remove penging messages related to update suggestions
@@ -1954,8 +1954,8 @@ public class LatinIME extends InputMethodService
LatinImeLogger.logOnManualSuggestion(
"", suggestion.toString(), index, suggestions);
final char primaryCode = suggestion.charAt(0);
- onKey(primaryCode, new int[]{primaryCode}, LatinKeyboardBaseView.NOT_A_TOUCH_COORDINATE,
- LatinKeyboardBaseView.NOT_A_TOUCH_COORDINATE);
+ onKey(primaryCode, new int[]{primaryCode}, BaseKeyboardView.NOT_A_TOUCH_COORDINATE,
+ BaseKeyboardView.NOT_A_TOUCH_COORDINATE);
if (ic != null) {
ic.endBatchEdit();
}
diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboardView.java b/java/src/com/android/inputmethod/latin/LatinKeyboardView.java
index 6672dd22d..9c90853f6 100644
--- a/java/src/com/android/inputmethod/latin/LatinKeyboardView.java
+++ b/java/src/com/android/inputmethod/latin/LatinKeyboardView.java
@@ -30,7 +30,7 @@ import android.view.MotionEvent;
import java.util.List;
-public class LatinKeyboardView extends LatinKeyboardBaseView {
+public class LatinKeyboardView extends BaseKeyboardView {
public static final int KEYCODE_OPTIONS = -100;
public static final int KEYCODE_OPTIONS_LONGPRESS = -101;
@@ -110,8 +110,8 @@ public class LatinKeyboardView extends LatinKeyboardBaseView {
private boolean invokeOnKey(int primaryCode) {
getOnKeyboardActionListener().onKey(primaryCode, null,
- LatinKeyboardBaseView.NOT_A_TOUCH_COORDINATE,
- LatinKeyboardBaseView.NOT_A_TOUCH_COORDINATE);
+ BaseKeyboardView.NOT_A_TOUCH_COORDINATE,
+ BaseKeyboardView.NOT_A_TOUCH_COORDINATE);
return true;
}
diff --git a/java/src/com/android/inputmethod/latin/MiniKeyboardKeyDetector.java b/java/src/com/android/inputmethod/latin/MiniKeyboardKeyDetector.java
index 5f4c93734..0e0c2e7fc 100644
--- a/java/src/com/android/inputmethod/latin/MiniKeyboardKeyDetector.java
+++ b/java/src/com/android/inputmethod/latin/MiniKeyboardKeyDetector.java
@@ -41,7 +41,7 @@ class MiniKeyboardKeyDetector extends KeyDetector {
final Key[] keys = getKeys();
final int touchX = getTouchX(x);
final int touchY = getTouchY(y);
- int closestKeyIndex = LatinKeyboardBaseView.NOT_A_KEY;
+ int closestKeyIndex = BaseKeyboardView.NOT_A_KEY;
int closestKeyDist = (y < 0) ? mSlideAllowanceSquareTop : mSlideAllowanceSquare;
final int keyCount = keys.length;
for (int i = 0; i < keyCount; i++) {
@@ -52,7 +52,7 @@ class MiniKeyboardKeyDetector extends KeyDetector {
closestKeyDist = dist;
}
}
- if (allKeys != null && closestKeyIndex != LatinKeyboardBaseView.NOT_A_KEY)
+ if (allKeys != null && closestKeyIndex != BaseKeyboardView.NOT_A_KEY)
allKeys[0] = keys[closestKeyIndex].codes[0];
return closestKeyIndex;
}
diff --git a/java/src/com/android/inputmethod/latin/PointerTracker.java b/java/src/com/android/inputmethod/latin/PointerTracker.java
index 558ca604d..78e00720a 100644
--- a/java/src/com/android/inputmethod/latin/PointerTracker.java
+++ b/java/src/com/android/inputmethod/latin/PointerTracker.java
@@ -17,8 +17,8 @@
package com.android.inputmethod.latin;
import com.android.inputmethod.latin.BaseKeyboard.Key;
-import com.android.inputmethod.latin.LatinKeyboardBaseView.OnKeyboardActionListener;
-import com.android.inputmethod.latin.LatinKeyboardBaseView.UIHandler;
+import com.android.inputmethod.latin.BaseKeyboardView.OnKeyboardActionListener;
+import com.android.inputmethod.latin.BaseKeyboardView.UIHandler;
import android.content.res.Resources;
import android.util.Log;
@@ -44,7 +44,7 @@ public class PointerTracker {
private final int mMultiTapKeyTimeout;
// Miscellaneous constants
- private static final int NOT_A_KEY = LatinKeyboardBaseView.NOT_A_KEY;
+ private static final int NOT_A_KEY = BaseKeyboardView.NOT_A_KEY;
private static final int[] KEY_DELETE = { BaseKeyboard.KEYCODE_DELETE };
private final UIProxy mProxy;
diff --git a/java/src/com/android/inputmethod/latin/ProximityKeyDetector.java b/java/src/com/android/inputmethod/latin/ProximityKeyDetector.java
index 383bd7fbc..01122ebb7 100644
--- a/java/src/com/android/inputmethod/latin/ProximityKeyDetector.java
+++ b/java/src/com/android/inputmethod/latin/ProximityKeyDetector.java
@@ -36,8 +36,8 @@ class ProximityKeyDetector extends KeyDetector {
final Key[] keys = getKeys();
final int touchX = getTouchX(x);
final int touchY = getTouchY(y);
- int primaryIndex = LatinKeyboardBaseView.NOT_A_KEY;
- int closestKey = LatinKeyboardBaseView.NOT_A_KEY;
+ int primaryIndex = BaseKeyboardView.NOT_A_KEY;
+ int closestKey = BaseKeyboardView.NOT_A_KEY;
int closestKeyDist = mProximityThresholdSquare + 1;
int[] distances = mDistances;
Arrays.fill(distances, Integer.MAX_VALUE);
@@ -78,7 +78,7 @@ class ProximityKeyDetector extends KeyDetector {
}
}
}
- if (primaryIndex == LatinKeyboardBaseView.NOT_A_KEY) {
+ if (primaryIndex == BaseKeyboardView.NOT_A_KEY) {
primaryIndex = closestKey;
}
return primaryIndex;