本文整理了Java中android.inputmethodservice.Keyboard.<init>()
方法的一些代码示例,展示了Keyboard.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Keyboard.<init>()
方法的具体详情如下:
包路径:android.inputmethodservice.Keyboard
类名称:Keyboard
方法名:<init>
暂无
代码示例来源:origin: GitPhoenix/KeyboardView
/**
* 初始化自定义键盘
*/
private void initEditView() {
keyboardNumber = new Keyboard(context, R.xml.keyboard_number);
keyboardEnglish = new Keyboard(context, R.xml.keyboard_english);
}
代码示例来源:origin: stackoverflow.com
var gameplayEvents = ["keyup", "keydown"];
var keyboard = new Keyboard();
keyboard.listen(canvas, gameplayEvents);
// ongameover
keyboard.ignore(canvas, gameplayEvents);
代码示例来源:origin: stackoverflow.com
var kb = new Keyboard({
defaultEventType: 'keypress'
});
kb.addEvents({
'end': fnEnd,
});
代码示例来源:origin: stackoverflow.com
var k = new Keyboard();
document.body.appendChild(k.plus);
document.body.appendChild(k.minus);
document.body.appendChild(k.multi);
document.body.appendChild(k.divide);
代码示例来源:origin: vir56k/demo
public PopupKeyboardUtil(Activity mActivity) {
this.mActivity = mActivity;
this.keyboard = new Keyboard(mActivity, R.xml.small_keyboard);
}
代码示例来源:origin: stackoverflow.com
public class FillInForm {
Keyboard j = new Keyboard();
public void myMethod() {
System.out.println("text");
}
}
代码示例来源:origin: kuangch/custom-keyboard
public void init(Activity activity, int layoutResId,boolean mIfRandom) {
this.mActivity = activity;
this.layoutResId = layoutResId;
this.mIfRandom = mIfRandom;
Keyboard = new Keyboard(mActivity, layoutResId);
mKeyboardView = (MyKeyBoardView) mActivity.findViewById(R.id.keyboard_view);
}
代码示例来源:origin: kuangch/custom-keyboard
public void init(Activity activity, int layoutResId) {
this.mActivity = activity;
this.layoutResId = layoutResId;
this.isAttached = false;
Keyboard = new Keyboard(mActivity, layoutResId);
mKeyboardView = (MyKeyBoardView) mActivity.findViewById(R.id.keyboard_view);
}
代码示例来源:origin: stackoverflow.com
public class FillInForm {
... other methods ...
public static void main(String[] args) { // static means, this method does not belong to an instance of the class, it belongs to the class itself
Keyboard j = new Keyboard();
System.out.println("text");
};
}
代码示例来源:origin: zhuanghongji/custom-android-keyboard
public KeyboardUtil(Context context, Activity activity, EditText editText) {
mContext = context;
mActivity = activity;
mEditText = editText;
mNumberKeyboard = new Keyboard(mContext, R.xml.keyboard_numbers);
mLetterKeyboard = new Keyboard(mContext, R.xml.keyboard_qwerty);
mKeyboardView = (KeyboardView) mActivity.findViewById(R.id.keyboard_view);
mKeyboardView.setKeyboard(mNumberKeyboard);
mKeyboardView.setEnabled(true);
mKeyboardView.setPreviewEnabled(true);
mKeyboardView.setOnKeyboardActionListener(listener);
}
代码示例来源:origin: conghuahuadan/CustomKeyboard
@Override
public void run() {
setKeyboard(new Keyboard(getContext(), R.xml.keyboard_number_abc));
}
});
代码示例来源:origin: conghuahuadan/CustomKeyboard
@Override
public void run() {
setKeyboard(new Keyboard(getContext(), R.xml.keyboard_abc));
}
});
代码示例来源:origin: adafruit/Bluefruit_LE_Connect_Android
public void showCustomKeyboard(View view) {
EditText editText = (EditText) view;
final int keyboardId = (Integer) editText.getTag();
if (mCurrentKeyboardId != keyboardId) {
Keyboard keyboard = new Keyboard(mActivity, keyboardId);
mKeyboardView.setKeyboard(keyboard);
mCurrentKeyboardId = keyboardId;
}
mKeyboardView.setVisibility(View.VISIBLE);
mKeyboardView.setEnabled(true);
((InputMethodManager) mActivity.getSystemService(Activity.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(view.getWindowToken(), 0);
}
代码示例来源:origin: zhangxuyang321/KeyBoardDemo
public KeyboardUtil(Activity act, Context ctx, EditText edit) {
this.ed = edit;
k1 = new Keyboard(ctx, R.xml.number);
keyboardView = (KeyboardView) act.findViewById(R.id.keyboard_view);
keyboardView.setKeyboard(k1);
keyboardView.setEnabled(true);
keyboardView.setPreviewEnabled(false);
keyboardView.setOnKeyboardActionListener(listener);
}
代码示例来源:origin: conghuahuadan/CustomKeyboard
private void init() {
setKeyboard(new Keyboard(getContext(), R.xml.keyboard_number));
setOnKeyboardActionListener(this);
}
代码示例来源:origin: conghuahuadan/CustomKeyboard
private void init() {
setKeyboard(new Keyboard(getContext(), R.xml.keyboard_abc));
setOnKeyboardActionListener(this);
}
代码示例来源:origin: GeorgeArgyrakis/FloatingKeyboard
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
FloatingKeyboardView mCustomKeyboard = (FloatingKeyboardView) findViewById(R.id.keyboardview);
mCustomKeyboard.setKeyboard(new Keyboard(this, R.xml.numkbd));
mCustomKeyboard.setPreviewEnabled(false); // NOTE Do not show the preview balloons
mCustomKeyboard.registerEditText(R.id.edittext1);
mCustomKeyboard.setAllignBottomCenter(true);
}
}
代码示例来源:origin: adamantoise/robocrosswords
private void updateKeyboardFromPrefs() {
int keyboardType = getKeyboardTypePreference();
useNativeKeyboard = (keyboardType == -1);
keyboardView = (KeyboardView)findViewById(R.id.playKeyboard);
if (!useNativeKeyboard) {
Keyboard keyboard = new Keyboard(this, keyboardType);
keyboardView.setKeyboard(keyboard);
} else {
keyboardView.setVisibility(View.GONE);
}
boardView.setUseNativeKeyboard(useNativeKeyboard);
}
代码示例来源:origin: KDE/kdeconnect-android
@Override
public View onCreateInputView() {
// Log.d("RemoteKeyboardService", "onCreateInputView connected=" + RemoteKeyboardPlugin.isConnected());
inputView = new KeyboardView(this, null);
inputView.setKeyboard(new Keyboard(this, R.xml.remotekeyboardplugin_keyboard));
inputView.setPreviewEnabled(false);
inputView.setOnKeyboardActionListener(this);
updateInputView();
return inputView;
}
代码示例来源:origin: wuzhendev/android-xnumberkeyboard
private void initKeyboard() {
// 设置软键盘按键的布局
Keyboard keyboard = new Keyboard(getContext(), R.xml.keyboard_number);
settingSpecialKey();
setKeyboard(keyboard);
// 设置按键没有点击放大镜显示的效果
setPreviewEnabled(false);
setEnabled(true);
super.setOnKeyboardActionListener(this);
}
内容来源于网络,如有侵权,请联系作者删除!