List of usage examples for android.view.inputmethod InputConnection getCursorCapsMode
int getCursorCapsMode(int reqModes);
From source file:com.anysoftkeyboard.AnySoftKeyboard.java
private void updateShiftStateNow() { final InputConnection ic = getCurrentInputConnection(); EditorInfo ei = getCurrentInputEditorInfo(); final int caps; if (mAutoCap && ic != null && ei != null && ei.inputType != EditorInfo.TYPE_NULL) { caps = ic.getCursorCapsMode(ei.inputType); } else {//from w ww . j av a2s.co m caps = 0; } final boolean inputSaysCaps = caps != 0; Logger.d(TAG, "shift updateShiftStateNow inputSaysCaps=%s", inputSaysCaps); mShiftKeyState.setActiveState(inputSaysCaps); handleShift(); }
From source file:org.distantshoresmedia.keyboard.LatinIME.java
private int getCursorCapsMode(InputConnection ic, EditorInfo attr) { int caps = 0; EditorInfo ei = getCurrentInputEditorInfo(); if (mAutoCapActive && ei != null && ei.inputType != EditorInfo.TYPE_NULL) { caps = ic.getCursorCapsMode(attr.inputType); }// www . jav a2 s. c om return caps; }