Android CompletionInfo - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android CompletionInfo class.

This code example shows how to use the following methods:getPosition, getText
 
    @Override 
    public void onCommitCompletion(CompletionInfo completion) {
        if (DBG) Log.d(TAG, "onCommitCompletion(" + completion + ")");
        hideInputMethod(); 
        replaceText(completion.getText());
        if (mCommitCompletionListener != null) {
            mCommitCompletionListener.onCommitCompletion(completion.getPosition());
        } 
    } 
 
    public interface CommitCompletionListener { 
        void onCommitCompletion(int position);
    } 
 
} 
7
CodeRank
This code example shows how to use the following methods:getPosition, getText
    } 
 
    @Override 
    public boolean commitCompletion(CompletionInfo text)
    { 
        return QtNativeInputConnection.commitCompletion(text.getText().toString(), text.getPosition());
    } 
 
    @Override 
    public boolean commitText(CharSequence text, int newCursorPosition)
    { 
        return QtNativeInputConnection.commitText(text.toString(), newCursorPosition);
    } 
 
    @Override 
    public boolean deleteSurroundingText(int leftLength, int rightLength)
    { 
        return QtNativeInputConnection.deleteSurroundingText(leftLength, rightLength);
    } 
 
4
CodeRank
This code example shows how to use the following methods:getPosition, getText
 
		@Override 
		public boolean commitCompletion(CompletionInfo text) {
			log("commitCompletion="+text);
			try { 
				mCommitText = text.getText();
				addCommitText(new CommitText(text.getText(), text.getPosition()));
				return super.commitCompletion(text);
			} finally { 
				mComposingText = "";
				getEditable().clear();
			} 
		} 
 
		@Override 
		public boolean commitText(CharSequence text, int newCursorPosition) {
			log("commitText="+text+","+newCursorPosition);
			mController.decorateKey(mCurrentInputConnection, text, newCursorPosition, false, false/*ctk*/, false/*alt*/);		
			mCommitText = text;
			try{ 
4
CodeRank
This code example shows how to use the following methods:getPosition, getText
		public boolean commitCompletion(CompletionInfo text) {
			if(Utility.isDebuggingFromCash()) { 
				log("commitCompletion=" + text);
			} 
			try { 
				mCommitText = text.getText();
				addCommitText(new CommitText(text.getText(), text.getPosition()));
				return super.commitCompletion(text);
			} finally { 
				mComposingText = "";
				getEditable().clear();
			} 
		} 
 
		@Override 
		public boolean commitText(CharSequence text, int newCursorPosition) {
			if(Utility.isDebuggingFromCash()) { 
				log("commitText=" + text + "," + newCursorPosition);
				log("--1--=" + Selection.getSelectionStart(text));
				log("--2--=" + Selection.getSelectionEnd(text));
4
CodeRank
This code example shows how to use the following methods:getPosition, getText
 
		@Override 
		public boolean commitCompletion(CompletionInfo text) {
			log("commitCompletion="+text);
			try { 
				mCommitText = text.getText();
				addCommitText(new CommitText(text.getText(), text.getPosition()));
				return super.commitCompletion(text);
			} finally { 
				mComposingText = "";
				getEditable().clear();
			} 
		} 
 
		@Override 
		public boolean commitText(CharSequence text, int newCursorPosition) {
			log("commitText="+text+","+newCursorPosition);
			mController.decorateKey(mCurrentInputConnection, text, newCursorPosition, false, false/*ctk*/, false/*alt*/);		
			mCommitText = text;
			try{ 
4
CodeRank
See Code Examples for Android CompletionInfo Methods: