aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-07-19 17:22:02 -0700
committerTadashi G. Takaoka <takaoka@google.com>2011-07-19 17:22:02 -0700
commit5ab5807d9163380b56350d5043883c1ea944128c (patch)
tree9ba867865400f7e8d15c612138b8f7b1f494f308 /java/src/com/android/inputmethod
parent40f7efc172928bdd6048e91421a766abe5b22996 (diff)
downloadlatinime-5ab5807d9163380b56350d5043883c1ea944128c.tar.gz
latinime-5ab5807d9163380b56350d5043883c1ea944128c.tar.xz
latinime-5ab5807d9163380b56350d5043883c1ea944128c.zip
Remove long-press-to-save feature from CandidateView
Bug: 5027059 Change-Id: I884a84e50e810c0c4a8255217b39ea24937c756b
Diffstat (limited to 'java/src/com/android/inputmethod')
-rw-r--r--java/src/com/android/inputmethod/latin/CandidateView.java21
1 files changed, 1 insertions, 20 deletions
diff --git a/java/src/com/android/inputmethod/latin/CandidateView.java b/java/src/com/android/inputmethod/latin/CandidateView.java
index 96225f2e9..4baf52e52 100644
--- a/java/src/com/android/inputmethod/latin/CandidateView.java
+++ b/java/src/com/android/inputmethod/latin/CandidateView.java
@@ -38,7 +38,6 @@ import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
-import android.view.View.OnLongClickListener;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.PopupWindow;
@@ -51,7 +50,7 @@ import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
import java.util.ArrayList;
import java.util.List;
-public class CandidateView extends LinearLayout implements OnClickListener, OnLongClickListener {
+public class CandidateView extends LinearLayout implements OnClickListener {
public interface Listener {
public boolean addWordToDictionary(String word);
@@ -323,8 +322,6 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo
final TextView word = (TextView)inflater.inflate(R.layout.candidate_word, null);
word.setTag(i);
word.setOnClickListener(this);
- if (i == 0)
- word.setOnLongClickListener(this);
mWords.add(word);
mInfos.add((TextView)inflater.inflate(R.layout.candidate_info, null));
mDividers.add(inflater.inflate(R.layout.candidate_divider, null));
@@ -750,22 +747,6 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo
}
@Override
- public boolean onLongClick(View view) {
- final Object tag = view.getTag();
- if (!(tag instanceof Integer))
- return true;
- final int index = (Integer) tag;
- if (index >= mSuggestions.size())
- return true;
-
- final CharSequence word = mSuggestions.getWord(index);
- if (word.length() < 2)
- return false;
- addToDictionary(word);
- return true;
- }
-
- @Override
public void onClick(View view) {
if (view == mWordToSave) {
addToDictionary(((TextView)view).getText());