Code example for Editable

Methods: removeSpan

0
    public void clearMetaKeyState(View view, Editable content, int states) {
        clearMetaKeyState(content, states);
    } 
 
    public static void clearMetaKeyState(Editable content, int states) {
        if ((states & META_SHIFT_ON) != 0) content.removeSpan(CAP);
        if ((states & META_ALT_ON) != 0) content.removeSpan(ALT);
        if ((states & META_SYM_ON) != 0) content.removeSpan(SYM);
        if ((states & META_SELECTING) != 0) content.removeSpan(SELECTING);
    } 
 
    /** 
     * Call this if you are a method that ignores the locked meta state 
     * (arrow keys, for example) and you handle a key. 
     */ 
    public static long resetLockedMeta(long state) {
        state = resetLock(state, META_SHIFT_ON, META_SHIFT_MASK);
        state = resetLock(state, META_ALT_ON, META_ALT_MASK);
        state = resetLock(state, META_SYM_ON, META_SYM_MASK);
        return state;
Experience pair programming with AI  Get Codota for Java