diff options
author | 2010-05-08 02:03:29 +0900 | |
---|---|---|
committer | 2010-05-10 15:11:26 +0900 | |
commit | 1263d234666ae8fa19ab053b929c35236929d229 (patch) | |
tree | 823b999da5f6253d3aeed051725d64af1f114aa0 /java/src/com/android/inputmethod/latin/CandidateView.java | |
parent | 53393240e8621aadcfd55bdbafd96c620efda479 (diff) | |
download | latinime-1263d234666ae8fa19ab053b929c35236929d229.tar.gz latinime-1263d234666ae8fa19ab053b929c35236929d229.tar.xz latinime-1263d234666ae8fa19ab053b929c35236929d229.zip |
Insert logging code
- Add log of auto suggestion
- Add log of cancelling auto suggestion
- Add log of actual number of charactors
- Add log of manually clicking suggestion
Change-Id: I8fc1cef356bf1a98b0676ed171bfb17825e18425
Diffstat (limited to 'java/src/com/android/inputmethod/latin/CandidateView.java')
-rwxr-xr-x | java/src/com/android/inputmethod/latin/CandidateView.java | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/java/src/com/android/inputmethod/latin/CandidateView.java b/java/src/com/android/inputmethod/latin/CandidateView.java index 3a199bbaf..8355d6738 100755 --- a/java/src/com/android/inputmethod/latin/CandidateView.java +++ b/java/src/com/android/inputmethod/latin/CandidateView.java @@ -167,7 +167,7 @@ public class CandidateView extends View { if (scrollX < 0) { scrollX = 0; } - if (distanceX > 0 && scrollX + width > mTotalWidth) { + if (distanceX > 0 && scrollX + width > mTotalWidth) { scrollX -= (int) distanceX; } mTargetScrollX = scrollX; @@ -412,7 +412,11 @@ public class CandidateView extends View { if (y <= 0) { // Fling up!? if (mSelectedString != null) { + // If there are completions from the application, we don't change the state to + // STATE_PICKED_SUGGESTION if (!mShowingCompletions) { + // This "acceptedSuggestion" will not be counted as a word because + // it will be counted in pickSuggestion instead. TextEntryState.acceptedSuggestion(mSuggestions.get(0), mSelectedString); } @@ -447,25 +451,6 @@ public class CandidateView extends View { } return true; } - - /** - * For flick through from keyboard, call this method with the x coordinate of the flick - * gesture. - * @param x - */ - public void takeSuggestionAt(float x) { - mTouchX = (int) x; - // To detect candidate - onDraw(null); - if (mSelectedString != null) { - if (!mShowingCompletions) { - TextEntryState.acceptedSuggestion(mSuggestions.get(0), mSelectedString); - } - mService.pickSuggestionManually(mSelectedIndex, mSelectedString); - } - invalidate(); - mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_REMOVE_THROUGH_PREVIEW), 200); - } private void hidePreview() { mCurrentWordIndex = OUT_OF_BOUNDS; |