Move keyboard related internal class to separate package

Change-Id: Ic1459066b865cde5104b3734193f76c997959c68
main
Tadashi G. Takaoka 2011-06-22 11:53:02 +09:00
parent 0150be2a9b
commit 72934bd596
31 changed files with 74 additions and 27 deletions

View File

@ -16,7 +16,7 @@
package com.android.inputmethod.deprecated.languageswitcher;
import com.android.inputmethod.keyboard.KeyboardParser;
import com.android.inputmethod.keyboard.internal.KeyboardParser;
import com.android.inputmethod.latin.DictionaryFactory;
import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.Settings;

View File

@ -18,6 +18,8 @@ package com.android.inputmethod.keyboard;
import android.util.Log;
import com.android.inputmethod.keyboard.internal.Key;
import java.util.Arrays;
import java.util.List;

View File

@ -21,6 +21,9 @@ import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.util.Log;
import com.android.inputmethod.keyboard.internal.Key;
import com.android.inputmethod.keyboard.internal.KeyboardParser;
import com.android.inputmethod.keyboard.internal.KeyboardShiftState;
import com.android.inputmethod.latin.R;
import org.xmlpull.v1.XmlPullParserException;
@ -448,7 +451,7 @@ public class Keyboard {
}
}
protected static void setDefaultBounds(Drawable drawable) {
public static void setDefaultBounds(Drawable drawable) {
if (drawable != null)
drawable.setBounds(0, 0, drawable.getIntrinsicWidth(),
drawable.getIntrinsicHeight());

View File

@ -27,6 +27,9 @@ import android.view.View;
import android.view.inputmethod.EditorInfo;
import com.android.inputmethod.compat.InputMethodManagerCompatWrapper;
import com.android.inputmethod.keyboard.internal.Key;
import com.android.inputmethod.keyboard.internal.ModifierKeyState;
import com.android.inputmethod.keyboard.internal.ShiftKeyState;
import com.android.inputmethod.latin.LatinIME;
import com.android.inputmethod.latin.LatinImeLogger;
import com.android.inputmethod.latin.R;

View File

@ -47,6 +47,10 @@ import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.TextView;
import com.android.inputmethod.keyboard.internal.Key;
import com.android.inputmethod.keyboard.internal.MiniKeyboardBuilder;
import com.android.inputmethod.keyboard.internal.PointerTrackerQueue;
import com.android.inputmethod.keyboard.internal.SwipeTracker;
import com.android.inputmethod.latin.LatinImeLogger;
import com.android.inputmethod.latin.R;

View File

@ -33,6 +33,8 @@ import android.graphics.Rect;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import com.android.inputmethod.keyboard.internal.Key;
import com.android.inputmethod.keyboard.internal.SlidingLocaleDrawable;
import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.SubtypeSwitcher;

View File

@ -24,6 +24,7 @@ import android.util.Log;
import android.view.MotionEvent;
import com.android.inputmethod.deprecated.VoiceProxy;
import com.android.inputmethod.keyboard.internal.Key;
import com.android.inputmethod.latin.LatinImeLogger;
import com.android.inputmethod.latin.Utils;

View File

@ -18,6 +18,8 @@ package com.android.inputmethod.keyboard;
import android.content.Context;
import com.android.inputmethod.keyboard.internal.Key;
import java.util.List;
public class MiniKeyboard extends Keyboard {

View File

@ -16,6 +16,8 @@
package com.android.inputmethod.keyboard;
import com.android.inputmethod.keyboard.internal.Key;
import java.util.List;
public class MiniKeyboardKeyDetector extends KeyDetector {

View File

@ -17,6 +17,9 @@
package com.android.inputmethod.keyboard;
import com.android.inputmethod.keyboard.KeyboardView.UIHandler;
import com.android.inputmethod.keyboard.internal.Key;
import com.android.inputmethod.keyboard.internal.PointerTrackerKeyState;
import com.android.inputmethod.keyboard.internal.PointerTrackerQueue;
import com.android.inputmethod.latin.LatinImeLogger;
import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.SubtypeSwitcher;

View File

@ -25,6 +25,7 @@ import android.view.MotionEvent;
import android.view.View;
import android.widget.PopupWindow;
import com.android.inputmethod.keyboard.internal.Key;
import com.android.inputmethod.latin.R;
/**

View File

@ -19,6 +19,8 @@ package com.android.inputmethod.keyboard;
import android.view.MotionEvent;
import android.widget.PopupWindow;
import com.android.inputmethod.keyboard.internal.Key;
public interface PopupPanel {
/**
* Show popup panel.

View File

@ -16,6 +16,7 @@
package com.android.inputmethod.keyboard;
import com.android.inputmethod.keyboard.internal.Key;
import com.android.inputmethod.latin.Utils;
import java.util.Arrays;

View File

@ -14,10 +14,11 @@
* the License.
*/
package com.android.inputmethod.keyboard;
package com.android.inputmethod.keyboard.internal;
import com.android.inputmethod.keyboard.KeyStyles.KeyStyle;
import com.android.inputmethod.keyboard.KeyboardParser.ParseException;
import com.android.inputmethod.keyboard.Keyboard;
import com.android.inputmethod.keyboard.internal.KeyStyles.KeyStyle;
import com.android.inputmethod.keyboard.internal.KeyboardParser.ParseException;
import com.android.inputmethod.latin.R;
import android.content.res.Resources;

View File

@ -14,9 +14,9 @@
* the License.
*/
package com.android.inputmethod.keyboard;
package com.android.inputmethod.keyboard.internal;
import com.android.inputmethod.keyboard.KeyboardParser.ParseException;
import com.android.inputmethod.keyboard.internal.KeyboardParser.ParseException;
import com.android.inputmethod.latin.R;
import android.content.res.TypedArray;

View File

@ -14,7 +14,7 @@
* the License.
*/
package com.android.inputmethod.keyboard;
package com.android.inputmethod.keyboard.internal;
import android.content.Context;
import android.content.res.Resources;
@ -26,6 +26,8 @@ import android.util.Xml;
import android.view.InflateException;
import com.android.inputmethod.compat.EditorInfoCompatUtils;
import com.android.inputmethod.keyboard.Keyboard;
import com.android.inputmethod.keyboard.KeyboardId;
import com.android.inputmethod.latin.R;
import org.xmlpull.v1.XmlPullParser;

View File

@ -14,10 +14,12 @@
* the License.
*/
package com.android.inputmethod.keyboard;
package com.android.inputmethod.keyboard.internal;
import android.util.Log;
import com.android.inputmethod.keyboard.KeyboardSwitcher;
public class KeyboardShiftState {
private static final String TAG = "KeyboardShiftState";
private static final boolean DEBUG = KeyboardSwitcher.DEBUG_STATE;

View File

@ -14,8 +14,11 @@
* the License.
*/
package com.android.inputmethod.keyboard;
package com.android.inputmethod.keyboard.internal;
import com.android.inputmethod.keyboard.Keyboard;
import com.android.inputmethod.keyboard.KeyboardView;
import com.android.inputmethod.keyboard.MiniKeyboard;
import com.android.inputmethod.latin.R;
import android.content.Context;

View File

@ -14,10 +14,12 @@
* the License.
*/
package com.android.inputmethod.keyboard;
package com.android.inputmethod.keyboard.internal;
import android.util.Log;
import com.android.inputmethod.keyboard.KeyboardSwitcher;
public class ModifierKeyState {
protected static final String TAG = "ModifierKeyState";
protected static final boolean DEBUG = KeyboardSwitcher.DEBUG_STATE;

View File

@ -14,12 +14,15 @@
* the License.
*/
package com.android.inputmethod.keyboard;
package com.android.inputmethod.keyboard.internal;
import com.android.inputmethod.keyboard.KeyDetector;
import com.android.inputmethod.keyboard.PointerTracker;
/**
* This class keeps track of a key index and a position where {@link PointerTracker} is.
*/
/* package */ class PointerTrackerKeyState {
public class PointerTrackerKeyState {
private final KeyDetector mKeyDetector;
// The position and time at which first down event occurred.

View File

@ -14,7 +14,9 @@
* the License.
*/
package com.android.inputmethod.keyboard;
package com.android.inputmethod.keyboard.internal;
import com.android.inputmethod.keyboard.PointerTracker;
import java.util.LinkedList;

View File

@ -14,8 +14,9 @@
* the License.
*/
package com.android.inputmethod.keyboard;
package com.android.inputmethod.keyboard.internal;
import com.android.inputmethod.keyboard.Keyboard;
import com.android.inputmethod.latin.R;
import android.content.res.Resources;

View File

@ -14,8 +14,9 @@
* the License.
*/
package com.android.inputmethod.keyboard;
package com.android.inputmethod.keyboard.internal;
import com.android.inputmethod.keyboard.Keyboard;
import com.android.inputmethod.latin.R;
import android.content.res.Resources;

View File

@ -14,7 +14,7 @@
* the License.
*/
package com.android.inputmethod.keyboard;
package com.android.inputmethod.keyboard.internal;
import android.util.Log;

View File

@ -14,7 +14,7 @@
* the License.
*/
package com.android.inputmethod.keyboard;
package com.android.inputmethod.keyboard.internal;
import android.content.Context;
import android.content.res.TypedArray;
@ -28,6 +28,8 @@ import android.graphics.drawable.Drawable;
import android.text.TextPaint;
import android.view.ViewConfiguration;
import com.android.inputmethod.keyboard.Keyboard;
import com.android.inputmethod.keyboard.LatinKeyboard;
import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.SubtypeSwitcher;
@ -78,7 +80,7 @@ public class SlidingLocaleDrawable extends Drawable {
mThreshold = ViewConfiguration.get(context).getScaledTouchSlop();
}
void setDiff(int diff) {
public void setDiff(int diff) {
if (diff == Integer.MAX_VALUE) {
mHitThreshold = false;
mCurrentLanguage = null;

View File

@ -14,7 +14,7 @@
* the License.
*/
package com.android.inputmethod.keyboard;
package com.android.inputmethod.keyboard.internal;
import android.view.MotionEvent;

View File

@ -14,9 +14,9 @@
* the License.
*/
package com.android.inputmethod.keyboard;
package com.android.inputmethod.keyboard.internal;
import com.android.inputmethod.keyboard.KeyStyles.EmptyKeyStyle;
import com.android.inputmethod.keyboard.internal.KeyStyles.EmptyKeyStyle;
import android.test.AndroidTestCase;
import android.text.TextUtils;

View File

@ -14,9 +14,9 @@
* the License.
*/
package com.android.inputmethod.keyboard;
package com.android.inputmethod.keyboard.internal;
import com.android.inputmethod.keyboard.MiniKeyboardBuilder.MiniKeyboardLayoutParams;
import com.android.inputmethod.keyboard.internal.MiniKeyboardBuilder.MiniKeyboardLayoutParams;
import android.test.AndroidTestCase;

View File

@ -14,8 +14,10 @@
* the License.
*/
package com.android.inputmethod.keyboard;
package com.android.inputmethod.keyboard.internal;
import com.android.inputmethod.keyboard.Keyboard;
import com.android.inputmethod.keyboard.internal.PopupCharactersParser.PopupCharactersParserError;
import com.android.inputmethod.latin.R;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;

View File

@ -16,7 +16,7 @@
package com.android.inputmethod.latin;
import com.android.inputmethod.keyboard.SwipeTracker.EventRingBuffer;
import com.android.inputmethod.keyboard.internal.SwipeTracker.EventRingBuffer;
import android.test.AndroidTestCase;

View File

@ -16,10 +16,10 @@
package com.android.inputmethod.latin;
import com.android.inputmethod.keyboard.Key;
import com.android.inputmethod.keyboard.KeyDetector;
import com.android.inputmethod.keyboard.KeyboardId;
import com.android.inputmethod.keyboard.LatinKeyboard;
import com.android.inputmethod.keyboard.internal.Key;
import android.content.Context;
import android.text.TextUtils;