Android Open Source - Stroke5Keyboard-android I M E Keyboard View






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.//from   w  w  w . ja  v a2s .co  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;
import android.inputmethodservice.KeyboardView;
import android.inputmethodservice.Keyboard.Key;
import android.util.AttributeSet;
import android.util.Log;

public class IMEKeyboardView extends KeyboardView {

    public IMEKeyboardView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public IMEKeyboardView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    @Override
    protected boolean onLongPress(Key key) {
        if (key.codes[0] == IMEKeyboard.KEYCODE_SHIFT) {
            getOnKeyboardActionListener().onKey(IMEKeyboard.KEYCODE_CAPLOCK, null);
            return true;
        } else {
            return super.onLongPress(key);
        }
    }
    
}




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