Merge "Remove suggestion pane controller from strip"
commit
8f79ffcff5
Binary file not shown.
After Width: | Height: | Size: 249 B |
Binary file not shown.
After Width: | Height: | Size: 226 B |
Binary file not shown.
After Width: | Height: | Size: 322 B |
|
@ -28,31 +28,6 @@
|
||||||
android:layout_weight="1.0"
|
android:layout_weight="1.0"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent" />
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/candidates_pane_control"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
>
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/expand_candidates_pane"
|
|
||||||
android:text="@string/label_expand_candidates_pane"
|
|
||||||
android:gravity="center"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:minWidth="28dp"
|
|
||||||
android:textSize="@dimen/candidate_text_size"
|
|
||||||
android:visibility="visible" />
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/close_candidates_pane"
|
|
||||||
android:text="@string/label_close_candidates_pane"
|
|
||||||
android:gravity="center"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:minWidth="28dp"
|
|
||||||
android:textSize="@dimen/candidate_text_size"
|
|
||||||
android:visibility="gone" />
|
|
||||||
</LinearLayout>
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/touch_to_save"
|
android:id="@+id/touch_to_save"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
<dimen name="candidate_padding">6dip</dimen>
|
<dimen name="candidate_padding">6dip</dimen>
|
||||||
<dimen name="candidate_text_size">18dip</dimen>
|
<dimen name="candidate_text_size">18dip</dimen>
|
||||||
<integer name="candidate_count_in_strip">3</integer>
|
<integer name="candidate_count_in_strip">3</integer>
|
||||||
<integer name="center_candidate_percentile">40</integer>
|
<integer name="center_candidate_percentile">36</integer>
|
||||||
|
|
||||||
<!-- If the screen height in landscape is larger than the below value, then the keyboard
|
<!-- If the screen height in landscape is larger than the below value, then the keyboard
|
||||||
will not go into extract (fullscreen) mode. -->
|
will not go into extract (fullscreen) mode. -->
|
||||||
|
|
|
@ -149,6 +149,7 @@
|
||||||
<item name="verticalGap">@fraction/key_bottom_gap_ics</item>
|
<item name="verticalGap">@fraction/key_bottom_gap_ics</item>
|
||||||
</style>
|
</style>
|
||||||
<style name="LatinKeyboard.IceCreamSandwich" parent="LatinKeyboard">
|
<style name="LatinKeyboard.IceCreamSandwich" parent="LatinKeyboard">
|
||||||
|
<item name="autoCorrectionSpacebarLedEnabled">false</item>
|
||||||
<item name="disabledShortcutIcon">@drawable/sym_keyboard_voice_off_holo</item>
|
<item name="disabledShortcutIcon">@drawable/sym_keyboard_voice_off_holo</item>
|
||||||
</style>
|
</style>
|
||||||
<style name="KeyboardView.IceCreamSandwich" parent="KeyboardView">
|
<style name="KeyboardView.IceCreamSandwich" parent="KeyboardView">
|
||||||
|
|
|
@ -38,6 +38,7 @@ import android.view.Gravity;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
|
import android.view.View.OnLongClickListener;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.PopupWindow;
|
import android.widget.PopupWindow;
|
||||||
|
@ -50,8 +51,7 @@ import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class CandidateView extends LinearLayout implements OnClickListener {
|
public class CandidateView extends LinearLayout implements OnClickListener, OnLongClickListener {
|
||||||
|
|
||||||
public interface Listener {
|
public interface Listener {
|
||||||
public boolean addWordToDictionary(String word);
|
public boolean addWordToDictionary(String word);
|
||||||
public void pickSuggestionManually(int index, CharSequence word);
|
public void pickSuggestionManually(int index, CharSequence word);
|
||||||
|
@ -65,9 +65,6 @@ public class CandidateView extends LinearLayout implements OnClickListener {
|
||||||
private static final boolean DBG = LatinImeLogger.sDBG;
|
private static final boolean DBG = LatinImeLogger.sDBG;
|
||||||
|
|
||||||
private final ViewGroup mCandidatesStrip;
|
private final ViewGroup mCandidatesStrip;
|
||||||
private final ViewGroup mCandidatesPaneControl;
|
|
||||||
private final TextView mExpandCandidatesPane;
|
|
||||||
private final TextView mCloseCandidatesPane;
|
|
||||||
private ViewGroup mCandidatesPane;
|
private ViewGroup mCandidatesPane;
|
||||||
private ViewGroup mCandidatesPaneContainer;
|
private ViewGroup mCandidatesPaneContainer;
|
||||||
private View mKeyboardView;
|
private View mKeyboardView;
|
||||||
|
@ -89,7 +86,7 @@ public class CandidateView extends LinearLayout implements OnClickListener {
|
||||||
|
|
||||||
private final SuggestionsStripParams mStripParams;
|
private final SuggestionsStripParams mStripParams;
|
||||||
private final SuggestionsPaneParams mPaneParams;
|
private final SuggestionsPaneParams mPaneParams;
|
||||||
private static final float MIN_TEXT_XSCALE = 0.75f;
|
private static final float MIN_TEXT_XSCALE = 0.70f;
|
||||||
|
|
||||||
private final UiHandler mHandler = new UiHandler(this);
|
private final UiHandler mHandler = new UiHandler(this);
|
||||||
|
|
||||||
|
@ -146,7 +143,6 @@ public class CandidateView extends LinearLayout implements OnClickListener {
|
||||||
public final int mPadding;
|
public final int mPadding;
|
||||||
public final int mDividerWidth;
|
public final int mDividerWidth;
|
||||||
public final int mDividerHeight;
|
public final int mDividerHeight;
|
||||||
public final int mControlWidth;
|
|
||||||
public final int mCandidateStripHeight;
|
public final int mCandidateStripHeight;
|
||||||
|
|
||||||
protected final List<TextView> mWords;
|
protected final List<TextView> mWords;
|
||||||
|
@ -154,7 +150,7 @@ public class CandidateView extends LinearLayout implements OnClickListener {
|
||||||
protected final List<TextView> mInfos;
|
protected final List<TextView> mInfos;
|
||||||
|
|
||||||
protected CandidateViewParams(List<TextView> words, List<View> dividers,
|
protected CandidateViewParams(List<TextView> words, List<View> dividers,
|
||||||
List<TextView> infos, View control) {
|
List<TextView> infos) {
|
||||||
mWords = words;
|
mWords = words;
|
||||||
mDividers = dividers;
|
mDividers = dividers;
|
||||||
mInfos = infos;
|
mInfos = infos;
|
||||||
|
@ -165,7 +161,6 @@ public class CandidateView extends LinearLayout implements OnClickListener {
|
||||||
divider.measure(WRAP_CONTENT, MATCH_PARENT);
|
divider.measure(WRAP_CONTENT, MATCH_PARENT);
|
||||||
mDividerWidth = divider.getMeasuredWidth();
|
mDividerWidth = divider.getMeasuredWidth();
|
||||||
mDividerHeight = divider.getMeasuredHeight();
|
mDividerHeight = divider.getMeasuredHeight();
|
||||||
mControlWidth = control.getMeasuredWidth();
|
|
||||||
|
|
||||||
final Resources res = word.getResources();
|
final Resources res = word.getResources();
|
||||||
mCandidateStripHeight = res.getDimensionPixelOffset(R.dimen.candidate_strip_height);
|
mCandidateStripHeight = res.getDimensionPixelOffset(R.dimen.candidate_strip_height);
|
||||||
|
@ -174,8 +169,8 @@ public class CandidateView extends LinearLayout implements OnClickListener {
|
||||||
|
|
||||||
private static class SuggestionsPaneParams extends CandidateViewParams {
|
private static class SuggestionsPaneParams extends CandidateViewParams {
|
||||||
public SuggestionsPaneParams(List<TextView> words, List<View> dividers,
|
public SuggestionsPaneParams(List<TextView> words, List<View> dividers,
|
||||||
List<TextView> infos, View control) {
|
List<TextView> infos) {
|
||||||
super(words, dividers, infos, control);
|
super(words, dividers, infos);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int layout(SuggestedWords suggestions, ViewGroup paneView, int from, int textColor,
|
public int layout(SuggestedWords suggestions, ViewGroup paneView, int from, int textColor,
|
||||||
|
@ -268,6 +263,7 @@ public class CandidateView extends LinearLayout implements OnClickListener {
|
||||||
private final int mCandidateCountInStrip;
|
private final int mCandidateCountInStrip;
|
||||||
private final float mCenterCandidateWeight;
|
private final float mCenterCandidateWeight;
|
||||||
private final int mCenterCandidateIndex;
|
private final int mCenterCandidateIndex;
|
||||||
|
private final Drawable mMoreCandidateHint;
|
||||||
|
|
||||||
private static final CharacterStyle BOLD_SPAN = new StyleSpan(Typeface.BOLD);
|
private static final CharacterStyle BOLD_SPAN = new StyleSpan(Typeface.BOLD);
|
||||||
private static final CharacterStyle UNDERLINE_SPAN = new UnderlineSpan();
|
private static final CharacterStyle UNDERLINE_SPAN = new UnderlineSpan();
|
||||||
|
@ -282,9 +278,11 @@ public class CandidateView extends LinearLayout implements OnClickListener {
|
||||||
|
|
||||||
private final ArrayList<CharSequence> mTexts = new ArrayList<CharSequence>();
|
private final ArrayList<CharSequence> mTexts = new ArrayList<CharSequence>();
|
||||||
|
|
||||||
|
public boolean mMoreSuggestionsAvailable;
|
||||||
|
|
||||||
public SuggestionsStripParams(Context context, AttributeSet attrs, int defStyle,
|
public SuggestionsStripParams(Context context, AttributeSet attrs, int defStyle,
|
||||||
List<TextView> words, List<View> dividers, List<TextView> infos, View control) {
|
List<TextView> words, List<View> dividers, List<TextView> infos) {
|
||||||
super(words, dividers, infos, control);
|
super(words, dividers, infos);
|
||||||
final TypedArray a = context.obtainStyledAttributes(
|
final TypedArray a = context.obtainStyledAttributes(
|
||||||
attrs, R.styleable.CandidateView, defStyle, R.style.CandidateViewStyle);
|
attrs, R.styleable.CandidateView, defStyle, R.style.CandidateViewStyle);
|
||||||
mAutoCorrectHighlight = a.getInt(R.styleable.CandidateView_autoCorrectHighlight, 0);
|
mAutoCorrectHighlight = a.getInt(R.styleable.CandidateView_autoCorrectHighlight, 0);
|
||||||
|
@ -300,12 +298,14 @@ public class CandidateView extends LinearLayout implements OnClickListener {
|
||||||
a.recycle();
|
a.recycle();
|
||||||
|
|
||||||
mCenterCandidateIndex = mCandidateCountInStrip / 2;
|
mCenterCandidateIndex = mCandidateCountInStrip / 2;
|
||||||
|
final Resources res = context.getResources();
|
||||||
|
mMoreCandidateHint = res.getDrawable(R.drawable.more_suggestions_hint);
|
||||||
|
|
||||||
mInvertedForegroundColorSpan = new ForegroundColorSpan(mColorTypedWord ^ 0x00ffffff);
|
mInvertedForegroundColorSpan = new ForegroundColorSpan(mColorTypedWord ^ 0x00ffffff);
|
||||||
mInvertedBackgroundColorSpan = new BackgroundColorSpan(mColorTypedWord);
|
mInvertedBackgroundColorSpan = new BackgroundColorSpan(mColorTypedWord);
|
||||||
|
|
||||||
mPaint = new TextPaint();
|
mPaint = new TextPaint();
|
||||||
final float textSize = context.getResources().getDimension(R.dimen.candidate_text_size);
|
final float textSize = res.getDimension(R.dimen.candidate_text_size);
|
||||||
mPaint.setTextSize(textSize);
|
mPaint.setTextSize(textSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -387,8 +387,6 @@ public class CandidateView extends LinearLayout implements OnClickListener {
|
||||||
|
|
||||||
final int countInStrip = mCandidateCountInStrip;
|
final int countInStrip = mCandidateCountInStrip;
|
||||||
setupTexts(suggestions, countInStrip);
|
setupTexts(suggestions, countInStrip);
|
||||||
final int maxWidth = (suggestions.size() <= countInStrip)
|
|
||||||
? stripWidth : stripWidth - mControlWidth;
|
|
||||||
|
|
||||||
int x = 0;
|
int x = 0;
|
||||||
for (int index = 0; index < countInStrip; index++) {
|
for (int index = 0; index < countInStrip; index++) {
|
||||||
|
@ -402,10 +400,20 @@ public class CandidateView extends LinearLayout implements OnClickListener {
|
||||||
|
|
||||||
final CharSequence styled = mTexts.get(pos);
|
final CharSequence styled = mTexts.get(pos);
|
||||||
final TextView word = mWords.get(pos);
|
final TextView word = mWords.get(pos);
|
||||||
|
if (index == mCenterCandidateIndex && suggestions.size() > countInStrip) {
|
||||||
|
// TODO: This "more suggestions hint" should have nicely designed icon.
|
||||||
|
word.setCompoundDrawablesWithIntrinsicBounds(
|
||||||
|
null, null, null, mMoreCandidateHint);
|
||||||
|
mMoreSuggestionsAvailable = true;
|
||||||
|
} else {
|
||||||
|
word.setCompoundDrawables(null, null, null, null);
|
||||||
|
mMoreSuggestionsAvailable = false;
|
||||||
|
}
|
||||||
|
|
||||||
// Disable this candidate if the suggestion is null or empty.
|
// Disable this candidate if the suggestion is null or empty.
|
||||||
word.setEnabled(!TextUtils.isEmpty(styled));
|
word.setEnabled(!TextUtils.isEmpty(styled));
|
||||||
word.setTextColor(getCandidateTextColor(index, suggestions, pos));
|
word.setTextColor(getCandidateTextColor(index, suggestions, pos));
|
||||||
final int width = getCandidateWidth(index, maxWidth);
|
final int width = getCandidateWidth(index, stripWidth);
|
||||||
final CharSequence text = getEllipsizedText(styled, width, word.getPaint());
|
final CharSequence text = getEllipsizedText(styled, width, word.getPaint());
|
||||||
final float scaleX = word.getTextScaleX();
|
final float scaleX = word.getTextScaleX();
|
||||||
word.setText(text); // TextView.setText() resets text scale x to 1.0.
|
word.setText(text); // TextView.setText() resets text scale x to 1.0.
|
||||||
|
@ -476,9 +484,11 @@ public class CandidateView extends LinearLayout implements OnClickListener {
|
||||||
final CharSequence text = suggestions.getWord(index);
|
final CharSequence text = suggestions.getWord(index);
|
||||||
word.setText(text);
|
word.setText(text);
|
||||||
word.setTextScaleX(1.0f);
|
word.setTextScaleX(1.0f);
|
||||||
|
word.setCompoundDrawables(null, null, null, null);
|
||||||
stripView.addView(word);
|
stripView.addView(word);
|
||||||
setLayoutWeight(word, 1.0f, mCandidateStripHeight);
|
setLayoutWeight(word, 1.0f, mCandidateStripHeight);
|
||||||
}
|
}
|
||||||
|
mMoreSuggestionsAvailable = false;
|
||||||
return countInStrip;
|
return countInStrip;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -521,6 +531,7 @@ public class CandidateView extends LinearLayout implements OnClickListener {
|
||||||
final TextView word = (TextView)inflater.inflate(R.layout.candidate_word, null);
|
final TextView word = (TextView)inflater.inflate(R.layout.candidate_word, null);
|
||||||
word.setTag(pos);
|
word.setTag(pos);
|
||||||
word.setOnClickListener(this);
|
word.setOnClickListener(this);
|
||||||
|
word.setOnLongClickListener(this);
|
||||||
mWords.add(word);
|
mWords.add(word);
|
||||||
final View divider = inflater.inflate(R.layout.candidate_divider, null);
|
final View divider = inflater.inflate(R.layout.candidate_divider, null);
|
||||||
divider.setTag(pos);
|
divider.setTag(pos);
|
||||||
|
@ -533,41 +544,9 @@ public class CandidateView extends LinearLayout implements OnClickListener {
|
||||||
mWordToSave = (TextView)findViewById(R.id.word_to_save);
|
mWordToSave = (TextView)findViewById(R.id.word_to_save);
|
||||||
mWordToSave.setOnClickListener(this);
|
mWordToSave.setOnClickListener(this);
|
||||||
|
|
||||||
final TypedArray keyboardViewAttr = context.obtainStyledAttributes(
|
mStripParams = new SuggestionsStripParams(context, attrs, defStyle, mWords, mDividers,
|
||||||
attrs, R.styleable.KeyboardView, R.attr.keyboardViewStyle, R.style.KeyboardView);
|
mInfos);
|
||||||
final Drawable expandBackground = keyboardViewAttr.getDrawable(
|
mPaneParams = new SuggestionsPaneParams(mWords, mDividers, mInfos);
|
||||||
R.styleable.KeyboardView_keyBackground);
|
|
||||||
final Drawable closeBackground = keyboardViewAttr.getDrawable(
|
|
||||||
R.styleable.KeyboardView_keyBackground);
|
|
||||||
final int keyTextColor = keyboardViewAttr.getColor(
|
|
||||||
R.styleable.KeyboardView_keyTextColor, 0xFF000000);
|
|
||||||
keyboardViewAttr.recycle();
|
|
||||||
|
|
||||||
mCandidatesPaneControl = (ViewGroup)findViewById(R.id.candidates_pane_control);
|
|
||||||
mExpandCandidatesPane = (TextView)findViewById(R.id.expand_candidates_pane);
|
|
||||||
mExpandCandidatesPane.setBackgroundDrawable(expandBackground);
|
|
||||||
mExpandCandidatesPane.setTextColor(keyTextColor);
|
|
||||||
mExpandCandidatesPane.setOnClickListener(new OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View view) {
|
|
||||||
expandCandidatesPane();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
mCloseCandidatesPane = (TextView)findViewById(R.id.close_candidates_pane);
|
|
||||||
mCloseCandidatesPane.setBackgroundDrawable(closeBackground);
|
|
||||||
mCloseCandidatesPane.setTextColor(keyTextColor);
|
|
||||||
mCloseCandidatesPane.setOnClickListener(new OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View view) {
|
|
||||||
closeCandidatesPane();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
mCandidatesPaneControl.measure(WRAP_CONTENT, WRAP_CONTENT);
|
|
||||||
|
|
||||||
mStripParams = new SuggestionsStripParams(context, attrs, defStyle,
|
|
||||||
mWords, mDividers, mInfos, mCandidatesPaneControl);
|
|
||||||
mPaneParams = new SuggestionsPaneParams(
|
|
||||||
mWords, mDividers, mInfos, mCandidatesPaneControl);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -588,7 +567,6 @@ public class CandidateView extends LinearLayout implements OnClickListener {
|
||||||
if (suggestions == null)
|
if (suggestions == null)
|
||||||
return;
|
return;
|
||||||
mSuggestions = suggestions;
|
mSuggestions = suggestions;
|
||||||
mExpandCandidatesPane.setEnabled(false);
|
|
||||||
if (mShowingAutoCorrectionInverted) {
|
if (mShowingAutoCorrectionInverted) {
|
||||||
mHandler.postUpdateSuggestions();
|
mHandler.postUpdateSuggestions();
|
||||||
} else {
|
} else {
|
||||||
|
@ -607,14 +585,6 @@ public class CandidateView extends LinearLayout implements OnClickListener {
|
||||||
mSuggestions, mCandidatesStrip, mCandidatesPane, width);
|
mSuggestions, mCandidatesStrip, mCandidatesPane, width);
|
||||||
final int countInPane = mPaneParams.layout(
|
final int countInPane = mPaneParams.layout(
|
||||||
mSuggestions, mCandidatesPane, countInStrip, mStripParams.getTextColor(), width);
|
mSuggestions, mCandidatesPane, countInStrip, mStripParams.getTextColor(), width);
|
||||||
|
|
||||||
if (countInPane <= 0 && !DBG) {
|
|
||||||
mCandidatesPaneControl.setVisibility(GONE);
|
|
||||||
} else {
|
|
||||||
mCandidatesPaneControl.setVisibility(VISIBLE);
|
|
||||||
mExpandCandidatesPane.setVisibility(VISIBLE);
|
|
||||||
mExpandCandidatesPane.setEnabled(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static CharSequence getDebugInfo(SuggestedWords suggestions, int pos) {
|
private static CharSequence getDebugInfo(SuggestedWords suggestions, int pos) {
|
||||||
|
@ -713,16 +683,12 @@ public class CandidateView extends LinearLayout implements OnClickListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void expandCandidatesPane() {
|
private void expandCandidatesPane() {
|
||||||
mExpandCandidatesPane.setVisibility(GONE);
|
|
||||||
mCloseCandidatesPane.setVisibility(VISIBLE);
|
|
||||||
mCandidatesPaneContainer.setMinimumHeight(mKeyboardView.getMeasuredHeight());
|
mCandidatesPaneContainer.setMinimumHeight(mKeyboardView.getMeasuredHeight());
|
||||||
mCandidatesPaneContainer.setVisibility(VISIBLE);
|
mCandidatesPaneContainer.setVisibility(VISIBLE);
|
||||||
mKeyboardView.setVisibility(GONE);
|
mKeyboardView.setVisibility(GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void closeCandidatesPane() {
|
private void closeCandidatesPane() {
|
||||||
mExpandCandidatesPane.setVisibility(VISIBLE);
|
|
||||||
mCloseCandidatesPane.setVisibility(GONE);
|
|
||||||
mCandidatesPaneContainer.setVisibility(GONE);
|
mCandidatesPaneContainer.setVisibility(GONE);
|
||||||
mKeyboardView.setVisibility(VISIBLE);
|
mKeyboardView.setVisibility(VISIBLE);
|
||||||
}
|
}
|
||||||
|
@ -744,7 +710,6 @@ public class CandidateView extends LinearLayout implements OnClickListener {
|
||||||
mWordToSave.setText(word);
|
mWordToSave.setText(word);
|
||||||
mShowingAddToDictionary = true;
|
mShowingAddToDictionary = true;
|
||||||
mCandidatesStrip.setVisibility(GONE);
|
mCandidatesStrip.setVisibility(GONE);
|
||||||
mCandidatesPaneControl.setVisibility(GONE);
|
|
||||||
mTouchToSave.setVisibility(VISIBLE);
|
mTouchToSave.setVisibility(VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -802,6 +767,15 @@ public class CandidateView extends LinearLayout implements OnClickListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onLongClick(View view) {
|
||||||
|
if (mStripParams.mMoreSuggestionsAvailable) {
|
||||||
|
expandCandidatesPane();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
if (view == mWordToSave) {
|
if (view == mWordToSave) {
|
||||||
|
@ -810,6 +784,11 @@ public class CandidateView extends LinearLayout implements OnClickListener {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (view == mCandidatesPane) {
|
||||||
|
closeCandidatesPane();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
final Object tag = view.getTag();
|
final Object tag = view.getTag();
|
||||||
if (!(tag instanceof Integer))
|
if (!(tag instanceof Integer))
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue