Android Open Source - Stroke5Keyboard-android I M E Keyboard






From Project

Back to project page Stroke5Keyboard-android.

License

The source code is released under:

GNU General Public License

If you think the Android project Stroke5Keyboard-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*
    Stroke5 Chinese Input Method for Android
    Copyright (C) 2012 LinkOmnia Ltd.//  w ww .  j  ava2s .  c  o m

    Author: Wan Leung Wong (wanleung@linkomnia.com)

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

package com.linkomnia.android.Stroke5;

import android.content.Context;
import android.inputmethodservice.Keyboard;

public class IMEKeyboard extends Keyboard {
    
    static final int KEYCODE_ENTER = 10;
    static final int KEYCODE_CAPLOCK = -200;
    static final int KEYCODE_MODE_CHANGE_CHAR = -300;
    static final int KEYCODE_MODE_CHANGE_SIMLEY = -400;
    static final int KEYCODE_MODE_CHANGE_CHSYMBOL = -500;
    static final int KEYCODE_MODE_CHANGE_LANG = -600;
    
    private boolean isCapLock;
    
    public IMEKeyboard(Context context, int xmlLayoutResId) {
        super(context, xmlLayoutResId);
        this.isCapLock = false;
        this.setShifted(false);
    }

    public IMEKeyboard(Context context, int layoutTemplateResId,
            CharSequence characters, int columns, int horizontalPadding) {
        super(context, layoutTemplateResId, characters, columns,
                horizontalPadding);
        this.isCapLock = false;
        this.setShifted(false);
    }
    
    public boolean isCapLock() {
        return this.isCapLock;
    }
    
    public void setCapLock(boolean b) {
        this.isCapLock = b;
        this.setShifted(b);
    }
}




Java Source Code List

.BuildDictionary.java
.BuildTable.java
com.linkomnia.android.Stroke5.CandidateView.java
com.linkomnia.android.Stroke5.IMEKeyboardView.java
com.linkomnia.android.Stroke5.IMEKeyboard.java
com.linkomnia.android.Stroke5.IMESwitch.java
com.linkomnia.android.Stroke5.LatinKeyboard.java
com.linkomnia.android.Stroke5.Setting.java
com.linkomnia.android.Stroke5.Stroke5KeyBoard.java
com.linkomnia.android.Stroke5.StrokeFiveKeyboard.java
com.linkomnia.android.Stroke5.WordProcessor.java