aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2012-12-07 17:47:09 -0800
committerTadashi G. Takaoka <takaoka@google.com>2012-12-07 17:47:09 -0800
commit12939572f3abd7847b5e604f8c5f041d60e1c823 (patch)
treed0525c90dfeac74d68fd73c753f364c249c89688
parentb6e398a71d9c0ca61eff67c0b66803b336a453e7 (diff)
downloadlatinime-12939572f3abd7847b5e604f8c5f041d60e1c823.tar.gz
latinime-12939572f3abd7847b5e604f8c5f041d60e1c823.tar.xz
latinime-12939572f3abd7847b5e604f8c5f041d60e1c823.zip
Remove unused suggestion preview stuffs
Change-Id: Ida5668f4eba1783d96e02001a64ae713f98176b7
-rw-r--r--java/res/drawable-hdpi/suggestion_feedback_background.9.pngbin1607 -> 0 bytes
-rw-r--r--java/res/drawable-mdpi/suggestion_feedback_background.9.pngbin1182 -> 0 bytes
-rw-r--r--java/res/drawable-xhdpi/suggestion_feedback_background.9.pngbin1676 -> 0 bytes
-rw-r--r--java/res/layout/suggestion_preview.xml28
-rw-r--r--java/res/values/attrs.xml1
-rw-r--r--java/res/values/styles.xml3
-rw-r--r--java/res/values/themes-basic-highcontrast.xml1
-rw-r--r--java/res/values/themes-basic.xml1
-rw-r--r--java/res/values/themes-gingerbread.xml1
-rw-r--r--java/res/values/themes-ics.xml1
-rw-r--r--java/res/values/themes-stone-bold.xml1
-rw-r--r--java/res/values/themes-stone.xml1
-rw-r--r--java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java47
13 files changed, 0 insertions, 85 deletions
diff --git a/java/res/drawable-hdpi/suggestion_feedback_background.9.png b/java/res/drawable-hdpi/suggestion_feedback_background.9.png
deleted file mode 100644
index 16499002e..000000000
--- a/java/res/drawable-hdpi/suggestion_feedback_background.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-mdpi/suggestion_feedback_background.9.png b/java/res/drawable-mdpi/suggestion_feedback_background.9.png
deleted file mode 100644
index 2a80f096d..000000000
--- a/java/res/drawable-mdpi/suggestion_feedback_background.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-xhdpi/suggestion_feedback_background.9.png b/java/res/drawable-xhdpi/suggestion_feedback_background.9.png
deleted file mode 100644
index 0ec90e5ea..000000000
--- a/java/res/drawable-xhdpi/suggestion_feedback_background.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/layout/suggestion_preview.xml b/java/res/layout/suggestion_preview.xml
deleted file mode 100644
index 856447bba..000000000
--- a/java/res/layout/suggestion_preview.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, 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.
-*/
--->
-
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="18dp"
- android:textColor="?android:attr/textColorPrimaryInverse"
- android:minWidth="32dp"
- android:gravity="center"
- style="?attr/suggestionPreviewBackgroundStyle" />
diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index 27a5cadf2..3eb27e76b 100644
--- a/java/res/values/attrs.xml
+++ b/java/res/values/attrs.xml
@@ -32,7 +32,6 @@
<attr name="suggestionStripViewStyle" format="reference" />
<attr name="moreSuggestionsViewStyle" format="reference" />
<attr name="suggestionBackgroundStyle" format="reference" />
- <attr name="suggestionPreviewBackgroundStyle" format="reference" />
</declare-styleable>
<declare-styleable name="KeyboardView">
diff --git a/java/res/values/styles.xml b/java/res/values/styles.xml
index a60e4496b..0bcf943e4 100644
--- a/java/res/values/styles.xml
+++ b/java/res/values/styles.xml
@@ -162,9 +162,6 @@
<style name="SuggestionBackgroundStyle">
<item name="android:background">@drawable/btn_suggestion</item>
</style>
- <style name="SuggestionPreviewBackgroundStyle">
- <item name="android:background">@drawable/suggestion_feedback_background</item>
- </style>
<!-- Theme "Basic high contrast" -->
<style
name="Keyboard.HighContrast"
diff --git a/java/res/values/themes-basic-highcontrast.xml b/java/res/values/themes-basic-highcontrast.xml
index b3ea05045..48df0a1b6 100644
--- a/java/res/values/themes-basic-highcontrast.xml
+++ b/java/res/values/themes-basic-highcontrast.xml
@@ -26,6 +26,5 @@
<item name="suggestionStripViewStyle">@style/SuggestionStripViewStyle</item>
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle</item>
<item name="suggestionBackgroundStyle">@style/SuggestionBackgroundStyle</item>
- <item name="suggestionPreviewBackgroundStyle">@style/SuggestionPreviewBackgroundStyle</item>
</style>
</resources>
diff --git a/java/res/values/themes-basic.xml b/java/res/values/themes-basic.xml
index ff6a70a08..88a0c5d8d 100644
--- a/java/res/values/themes-basic.xml
+++ b/java/res/values/themes-basic.xml
@@ -26,6 +26,5 @@
<item name="suggestionStripViewStyle">@style/SuggestionStripViewStyle</item>
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle</item>
<item name="suggestionBackgroundStyle">@style/SuggestionBackgroundStyle</item>
- <item name="suggestionPreviewBackgroundStyle">@style/SuggestionPreviewBackgroundStyle</item>
</style>
</resources>
diff --git a/java/res/values/themes-gingerbread.xml b/java/res/values/themes-gingerbread.xml
index 0ce0b8a9b..51f680a7a 100644
--- a/java/res/values/themes-gingerbread.xml
+++ b/java/res/values/themes-gingerbread.xml
@@ -26,6 +26,5 @@
<item name="suggestionStripViewStyle">@style/SuggestionStripViewStyle</item>
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle</item>
<item name="suggestionBackgroundStyle">@style/SuggestionBackgroundStyle</item>
- <item name="suggestionPreviewBackgroundStyle">@style/SuggestionPreviewBackgroundStyle</item>
</style>
</resources>
diff --git a/java/res/values/themes-ics.xml b/java/res/values/themes-ics.xml
index 8df58c594..d9c59a180 100644
--- a/java/res/values/themes-ics.xml
+++ b/java/res/values/themes-ics.xml
@@ -26,6 +26,5 @@
<item name="suggestionStripViewStyle">@style/SuggestionStripViewStyle.IceCreamSandwich</item>
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle.IceCreamSandwich</item>
<item name="suggestionBackgroundStyle">@style/SuggestionBackgroundStyle.IceCreamSandwich</item>
- <item name="suggestionPreviewBackgroundStyle">@style/SuggestionPreviewBackgroundStyle.IceCreamSandwich</item>
</style>
</resources>
diff --git a/java/res/values/themes-stone-bold.xml b/java/res/values/themes-stone-bold.xml
index 355a97f7b..6ace9d673 100644
--- a/java/res/values/themes-stone-bold.xml
+++ b/java/res/values/themes-stone-bold.xml
@@ -26,6 +26,5 @@
<item name="suggestionStripViewStyle">@style/SuggestionStripViewStyle</item>
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle</item>
<item name="suggestionBackgroundStyle">@style/SuggestionBackgroundStyle</item>
- <item name="suggestionPreviewBackgroundStyle">@style/SuggestionPreviewBackgroundStyle</item>
</style>
</resources>
diff --git a/java/res/values/themes-stone.xml b/java/res/values/themes-stone.xml
index 23437f780..3c3826b1a 100644
--- a/java/res/values/themes-stone.xml
+++ b/java/res/values/themes-stone.xml
@@ -26,6 +26,5 @@
<item name="suggestionStripViewStyle">@style/SuggestionStripViewStyle</item>
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle</item>
<item name="suggestionBackgroundStyle">@style/SuggestionBackgroundStyle</item>
- <item name="suggestionPreviewBackgroundStyle">@style/SuggestionPreviewBackgroundStyle</item>
</style>
</resources>
diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
index 9fc2bf987..e27fc2a7a 100644
--- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
+++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
@@ -28,7 +28,6 @@ import android.graphics.Rect;
import android.graphics.Typeface;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
-import android.os.Message;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.Spanned;
@@ -47,7 +46,6 @@ import android.view.View.OnClickListener;
import android.view.View.OnLongClickListener;
import android.view.ViewGroup;
import android.widget.LinearLayout;
-import android.widget.PopupWindow;
import android.widget.RelativeLayout;
import android.widget.TextView;
@@ -64,7 +62,6 @@ import com.android.inputmethod.latin.Constants;
import com.android.inputmethod.latin.LatinImeLogger;
import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.ResourceUtils;
-import com.android.inputmethod.latin.StaticInnerHandlerWrapper;
import com.android.inputmethod.latin.SuggestedWords;
import com.android.inputmethod.latin.Utils;
import com.android.inputmethod.latin.define.ProductionFlag;
@@ -95,43 +92,12 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
private final ArrayList<TextView> mInfos = CollectionUtils.newArrayList();
private final ArrayList<View> mDividers = CollectionUtils.newArrayList();
- private final PopupWindow mPreviewPopup;
- private final TextView mPreviewText;
-
Listener mListener;
SuggestedWords mSuggestedWords = SuggestedWords.EMPTY;
private final SuggestionStripViewParams mParams;
private static final float MIN_TEXT_XSCALE = 0.70f;
- private final UiHandler mHandler = new UiHandler(this);
-
- private static final class UiHandler extends StaticInnerHandlerWrapper<SuggestionStripView> {
- private static final int MSG_HIDE_PREVIEW = 0;
-
- public UiHandler(final SuggestionStripView outerInstance) {
- super(outerInstance);
- }
-
- @Override
- public void dispatchMessage(final Message msg) {
- final SuggestionStripView suggestionStripView = getOuterInstance();
- switch (msg.what) {
- case MSG_HIDE_PREVIEW:
- suggestionStripView.hidePreview();
- break;
- }
- }
-
- public void cancelHidePreview() {
- removeMessages(MSG_HIDE_PREVIEW);
- }
-
- public void cancelAllMessages() {
- cancelHidePreview();
- }
- }
-
private static final class SuggestionStripViewParams {
private static final int DEFAULT_SUGGESTIONS_COUNT_IN_STRIP = 3;
private static final float DEFAULT_CENTER_SUGGESTION_PERCENTILE = 0.40f;
@@ -610,13 +576,6 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
final LayoutInflater inflater = LayoutInflater.from(context);
inflater.inflate(R.layout.suggestions_strip, this);
- mPreviewPopup = new PopupWindow(context);
- mPreviewText = (TextView) inflater.inflate(R.layout.suggestion_preview, null);
- mPreviewPopup.setWindowLayoutMode(
- ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
- mPreviewPopup.setContentView(mPreviewText);
- mPreviewPopup.setBackgroundDrawable(null);
-
mSuggestionsStrip = (ViewGroup)findViewById(R.id.suggestions_strip);
for (int pos = 0; pos < MAX_SUGGESTIONS; pos++) {
final TextView word = (TextView)inflater.inflate(R.layout.suggestion_word, null);
@@ -697,10 +656,6 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
dismissMoreSuggestions();
}
- void hidePreview() {
- mPreviewPopup.dismiss();
- }
-
private final KeyboardActionListener mMoreSuggestionsListener =
new KeyboardActionListener.Adapter() {
@Override
@@ -863,8 +818,6 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
- mHandler.cancelAllMessages();
- hidePreview();
dismissMoreSuggestions();
}
}