Code example for CompletionInfo

Methods: getPositiongetText

0
 
    @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);
    } 
 
}