Create com.android.inputmethod.keyboard.emoji package
Change-Id: Idd12c2fa4f5add7bb50bd7349ff9a74fffe82cfd
This commit is contained in:
parent
71f4c6b8ea
commit
9f4d62cc42
10 changed files with 24 additions and 31 deletions
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
-->
|
||||
|
||||
<com.android.inputmethod.keyboard.internal.EmojiPageKeyboardView
|
||||
<com.android.inputmethod.keyboard.emoji.EmojiPageKeyboardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/emoji_keyboard_page"
|
||||
android:layoutDirection="ltr"
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
-->
|
||||
|
||||
<com.android.inputmethod.keyboard.EmojiPalettesView
|
||||
<com.android.inputmethod.keyboard.emoji.EmojiPalettesView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/emoji_keyboard_view"
|
||||
android:orientation="vertical"
|
||||
|
@ -78,7 +78,7 @@
|
|||
android:id="@+id/emoji_keyboard_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
<com.android.inputmethod.keyboard.EmojiCategoryPageIndicatorView
|
||||
<com.android.inputmethod.keyboard.emoji.EmojiCategoryPageIndicatorView
|
||||
android:id="@+id/emoji_category_page_id_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -109,4 +109,4 @@
|
|||
android:gravity="center"
|
||||
android:layout_height="match_parent" />
|
||||
</LinearLayout>
|
||||
</com.android.inputmethod.keyboard.EmojiPalettesView>
|
||||
</com.android.inputmethod.keyboard.emoji.EmojiPalettesView>
|
||||
|
|
|
@ -28,6 +28,7 @@ import android.view.inputmethod.EditorInfo;
|
|||
|
||||
import com.android.inputmethod.compat.InputMethodServiceCompatUtils;
|
||||
import com.android.inputmethod.keyboard.KeyboardLayoutSet.KeyboardLayoutSetException;
|
||||
import com.android.inputmethod.keyboard.emoji.EmojiPalettesView;
|
||||
import com.android.inputmethod.keyboard.internal.KeyboardState;
|
||||
import com.android.inputmethod.keyboard.internal.KeyboardTextsSet;
|
||||
import com.android.inputmethod.latin.InputView;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.inputmethod.keyboard.internal;
|
||||
package com.android.inputmethod.keyboard.emoji;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import android.text.TextUtils;
|
||||
|
@ -35,8 +35,7 @@ import java.util.List;
|
|||
/**
|
||||
* This is a Keyboard class where you can add keys dynamically shown in a grid layout
|
||||
*/
|
||||
// TODO: Move this class to com.android.inputmethod.emoji package.
|
||||
public class DynamicGridKeyboard extends Keyboard {
|
||||
final class DynamicGridKeyboard extends Keyboard {
|
||||
private static final String TAG = DynamicGridKeyboard.class.getSimpleName();
|
||||
private static final int TEMPLATE_KEY_CODE_0 = 0x30;
|
||||
private static final int TEMPLATE_KEY_CODE_1 = 0x31;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.inputmethod.keyboard.internal;
|
||||
package com.android.inputmethod.keyboard.emoji;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Resources;
|
||||
|
@ -39,8 +39,7 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
// TODO: Move this class to com.android.inputmethod.emoji package.
|
||||
public final class EmojiCategory {
|
||||
final class EmojiCategory {
|
||||
private final String TAG = EmojiCategory.class.getSimpleName();
|
||||
|
||||
private static final int ID_UNSPECIFIED = -1;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.inputmethod.keyboard;
|
||||
package com.android.inputmethod.keyboard.emoji;
|
||||
|
||||
import com.android.inputmethod.latin.R;
|
||||
|
||||
|
@ -24,7 +24,6 @@ import android.graphics.Paint;
|
|||
import android.util.AttributeSet;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
//TODO: Move this class to com.android.inputmethod.emoji package.
|
||||
public final class EmojiCategoryPageIndicatorView extends LinearLayout {
|
||||
private static final float BOTTOM_MARGIN_RATIO = 1.0f;
|
||||
private final Paint mPaint = new Paint();
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.inputmethod.keyboard.internal;
|
||||
package com.android.inputmethod.keyboard.emoji;
|
||||
|
||||
import com.android.inputmethod.latin.R;
|
||||
import com.android.inputmethod.latin.utils.ResourceUtils;
|
||||
|
@ -24,8 +24,7 @@ import android.support.v4.view.ViewPager;
|
|||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
//TODO: Move this class to com.android.inputmethod.emoji package.
|
||||
public final class EmojiLayoutParams {
|
||||
final class EmojiLayoutParams {
|
||||
private static final int DEFAULT_KEYBOARD_ROWS = 4;
|
||||
|
||||
public final int mEmojiPagerHeight;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.inputmethod.keyboard.internal;
|
||||
package com.android.inputmethod.keyboard.emoji;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
|
@ -26,16 +26,14 @@ import com.android.inputmethod.keyboard.Key;
|
|||
import com.android.inputmethod.keyboard.KeyDetector;
|
||||
import com.android.inputmethod.keyboard.Keyboard;
|
||||
import com.android.inputmethod.keyboard.KeyboardView;
|
||||
import com.android.inputmethod.keyboard.PointerTracker;
|
||||
import com.android.inputmethod.latin.R;
|
||||
|
||||
/**
|
||||
* This is an extended {@link KeyboardView} class that hosts an emoji page keyboard.
|
||||
* Multi-touch unsupported. No {@link PointerTracker}s. No gesture support.
|
||||
* Multi-touch unsupported. No gesture support.
|
||||
*/
|
||||
// TODO: Move this class to com.android.inputmethod.emoji package.
|
||||
// TODO: Implement key popup preview.
|
||||
public final class EmojiPageKeyboardView extends KeyboardView implements
|
||||
final class EmojiPageKeyboardView extends KeyboardView implements
|
||||
GestureDetector.OnGestureListener {
|
||||
private static final long KEY_PRESS_DELAY_TIME = 250; // msec
|
||||
private static final long KEY_RELEASE_DELAY_TIME = 30; // msec
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.inputmethod.keyboard.internal;
|
||||
package com.android.inputmethod.keyboard.emoji;
|
||||
|
||||
import android.support.v4.view.PagerAdapter;
|
||||
import android.util.Log;
|
||||
|
@ -29,8 +29,7 @@ import com.android.inputmethod.keyboard.KeyboardView;
|
|||
import com.android.inputmethod.latin.R;
|
||||
import com.android.inputmethod.latin.utils.CollectionUtils;
|
||||
|
||||
// TODO: Move this class to com.android.inputmethod.emoji package.
|
||||
public final class EmojiPalettesAdapter extends PagerAdapter {
|
||||
final class EmojiPalettesAdapter extends PagerAdapter {
|
||||
private static final String TAG = EmojiPalettesAdapter.class.getSimpleName();
|
||||
private static final boolean DEBUG_PAGER = false;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.inputmethod.keyboard;
|
||||
package com.android.inputmethod.keyboard.emoji;
|
||||
|
||||
import static com.android.inputmethod.latin.Constants.NOT_A_COORDINATE;
|
||||
|
||||
|
@ -40,10 +40,10 @@ import android.widget.TabHost;
|
|||
import android.widget.TabHost.OnTabChangeListener;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.android.inputmethod.keyboard.internal.EmojiCategory;
|
||||
import com.android.inputmethod.keyboard.internal.EmojiLayoutParams;
|
||||
import com.android.inputmethod.keyboard.internal.EmojiPageKeyboardView;
|
||||
import com.android.inputmethod.keyboard.internal.EmojiPalettesAdapter;
|
||||
import com.android.inputmethod.keyboard.Key;
|
||||
import com.android.inputmethod.keyboard.KeyboardActionListener;
|
||||
import com.android.inputmethod.keyboard.KeyboardLayoutSet;
|
||||
import com.android.inputmethod.keyboard.KeyboardView;
|
||||
import com.android.inputmethod.keyboard.internal.KeyDrawParams;
|
||||
import com.android.inputmethod.keyboard.internal.KeyVisualAttributes;
|
||||
import com.android.inputmethod.keyboard.internal.KeyboardIconsSet;
|
||||
|
@ -65,7 +65,6 @@ import java.util.concurrent.TimeUnit;
|
|||
* </ol>
|
||||
* Because of the above reasons, this class doesn't extend {@link KeyboardView}.
|
||||
*/
|
||||
// TODO: Move this class to com.android.inputmethod.emoji package.
|
||||
public final class EmojiPalettesView extends LinearLayout implements OnTabChangeListener,
|
||||
ViewPager.OnPageChangeListener, View.OnClickListener, View.OnTouchListener,
|
||||
EmojiPageKeyboardView.OnKeyEventListener {
|
||||
|
@ -317,7 +316,7 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
|
|||
|
||||
/**
|
||||
* Called from {@link EmojiPageKeyboardView} through
|
||||
* {@link com.android.inputmethod.keyboard.internal.EmojiPageKeyboardView.OnKeyEventListener}
|
||||
* {@link com.android.inputmethod.keyboard.emoji.EmojiPageKeyboardView.OnKeyEventListener}
|
||||
* interface to handle touch events from non-View-based elements such as Emoji buttons.
|
||||
*/
|
||||
@Override
|
||||
|
@ -328,7 +327,7 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
|
|||
|
||||
/**
|
||||
* Called from {@link EmojiPageKeyboardView} through
|
||||
* {@link com.android.inputmethod.keyboard.internal.EmojiPageKeyboardView.OnKeyEventListener}
|
||||
* {@link com.android.inputmethod.keyboard.emoji.EmojiPageKeyboardView.OnKeyEventListener}
|
||||
* interface to handle touch events from non-View-based elements such as Emoji buttons.
|
||||
*/
|
||||
@Override
|
Loading…
Reference in a new issue