android.inputmethodservice.Keyboard.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(132)

本文整理了Java中android.inputmethodservice.Keyboard.<init>()方法的一些代码示例,展示了Keyboard.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Keyboard.<init>()方法的具体详情如下:
包路径:android.inputmethodservice.Keyboard
类名称:Keyboard
方法名:<init>

Keyboard.<init>介绍

暂无

代码示例

代码示例来源:origin: GitPhoenix/KeyboardView

  1. /**
  2. * 初始化自定义键盘
  3. */
  4. private void initEditView() {
  5. keyboardNumber = new Keyboard(context, R.xml.keyboard_number);
  6. keyboardEnglish = new Keyboard(context, R.xml.keyboard_english);
  7. }

代码示例来源:origin: stackoverflow.com

  1. var gameplayEvents = ["keyup", "keydown"];
  2. var keyboard = new Keyboard();
  3. keyboard.listen(canvas, gameplayEvents);
  4. // ongameover
  5. keyboard.ignore(canvas, gameplayEvents);

代码示例来源:origin: stackoverflow.com

  1. var kb = new Keyboard({
  2. defaultEventType: 'keypress'
  3. });
  4. kb.addEvents({
  5. 'end': fnEnd,
  6. });

代码示例来源:origin: stackoverflow.com

  1. var k = new Keyboard();
  2. document.body.appendChild(k.plus);
  3. document.body.appendChild(k.minus);
  4. document.body.appendChild(k.multi);
  5. document.body.appendChild(k.divide);

代码示例来源:origin: vir56k/demo

  1. public PopupKeyboardUtil(Activity mActivity) {
  2. this.mActivity = mActivity;
  3. this.keyboard = new Keyboard(mActivity, R.xml.small_keyboard);
  4. }

代码示例来源:origin: stackoverflow.com

  1. public class FillInForm {
  2. Keyboard j = new Keyboard();
  3. public void myMethod() {
  4. System.out.println("text");
  5. }
  6. }

代码示例来源:origin: kuangch/custom-keyboard

  1. public void init(Activity activity, int layoutResId,boolean mIfRandom) {
  2. this.mActivity = activity;
  3. this.layoutResId = layoutResId;
  4. this.mIfRandom = mIfRandom;
  5. Keyboard = new Keyboard(mActivity, layoutResId);
  6. mKeyboardView = (MyKeyBoardView) mActivity.findViewById(R.id.keyboard_view);
  7. }

代码示例来源:origin: kuangch/custom-keyboard

  1. public void init(Activity activity, int layoutResId) {
  2. this.mActivity = activity;
  3. this.layoutResId = layoutResId;
  4. this.isAttached = false;
  5. Keyboard = new Keyboard(mActivity, layoutResId);
  6. mKeyboardView = (MyKeyBoardView) mActivity.findViewById(R.id.keyboard_view);
  7. }

代码示例来源:origin: stackoverflow.com

  1. public class FillInForm {
  2. ... other methods ...
  3. 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
  4. Keyboard j = new Keyboard();
  5. System.out.println("text");
  6. };
  7. }

代码示例来源:origin: zhuanghongji/custom-android-keyboard

  1. public KeyboardUtil(Context context, Activity activity, EditText editText) {
  2. mContext = context;
  3. mActivity = activity;
  4. mEditText = editText;
  5. mNumberKeyboard = new Keyboard(mContext, R.xml.keyboard_numbers);
  6. mLetterKeyboard = new Keyboard(mContext, R.xml.keyboard_qwerty);
  7. mKeyboardView = (KeyboardView) mActivity.findViewById(R.id.keyboard_view);
  8. mKeyboardView.setKeyboard(mNumberKeyboard);
  9. mKeyboardView.setEnabled(true);
  10. mKeyboardView.setPreviewEnabled(true);
  11. mKeyboardView.setOnKeyboardActionListener(listener);
  12. }

代码示例来源:origin: conghuahuadan/CustomKeyboard

  1. @Override
  2. public void run() {
  3. setKeyboard(new Keyboard(getContext(), R.xml.keyboard_number_abc));
  4. }
  5. });

代码示例来源:origin: conghuahuadan/CustomKeyboard

  1. @Override
  2. public void run() {
  3. setKeyboard(new Keyboard(getContext(), R.xml.keyboard_abc));
  4. }
  5. });

代码示例来源:origin: adafruit/Bluefruit_LE_Connect_Android

  1. public void showCustomKeyboard(View view) {
  2. EditText editText = (EditText) view;
  3. final int keyboardId = (Integer) editText.getTag();
  4. if (mCurrentKeyboardId != keyboardId) {
  5. Keyboard keyboard = new Keyboard(mActivity, keyboardId);
  6. mKeyboardView.setKeyboard(keyboard);
  7. mCurrentKeyboardId = keyboardId;
  8. }
  9. mKeyboardView.setVisibility(View.VISIBLE);
  10. mKeyboardView.setEnabled(true);
  11. ((InputMethodManager) mActivity.getSystemService(Activity.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(view.getWindowToken(), 0);
  12. }

代码示例来源:origin: zhangxuyang321/KeyBoardDemo

  1. public KeyboardUtil(Activity act, Context ctx, EditText edit) {
  2. this.ed = edit;
  3. k1 = new Keyboard(ctx, R.xml.number);
  4. keyboardView = (KeyboardView) act.findViewById(R.id.keyboard_view);
  5. keyboardView.setKeyboard(k1);
  6. keyboardView.setEnabled(true);
  7. keyboardView.setPreviewEnabled(false);
  8. keyboardView.setOnKeyboardActionListener(listener);
  9. }

代码示例来源:origin: conghuahuadan/CustomKeyboard

  1. private void init() {
  2. setKeyboard(new Keyboard(getContext(), R.xml.keyboard_number));
  3. setOnKeyboardActionListener(this);
  4. }

代码示例来源:origin: conghuahuadan/CustomKeyboard

  1. private void init() {
  2. setKeyboard(new Keyboard(getContext(), R.xml.keyboard_abc));
  3. setOnKeyboardActionListener(this);
  4. }

代码示例来源:origin: GeorgeArgyrakis/FloatingKeyboard

  1. @Override
  2. protected void onCreate(Bundle savedInstanceState) {
  3. super.onCreate(savedInstanceState);
  4. setContentView(R.layout.activity_main);
  5. FloatingKeyboardView mCustomKeyboard = (FloatingKeyboardView) findViewById(R.id.keyboardview);
  6. mCustomKeyboard.setKeyboard(new Keyboard(this, R.xml.numkbd));
  7. mCustomKeyboard.setPreviewEnabled(false); // NOTE Do not show the preview balloons
  8. mCustomKeyboard.registerEditText(R.id.edittext1);
  9. mCustomKeyboard.setAllignBottomCenter(true);
  10. }
  11. }

代码示例来源:origin: adamantoise/robocrosswords

  1. private void updateKeyboardFromPrefs() {
  2. int keyboardType = getKeyboardTypePreference();
  3. useNativeKeyboard = (keyboardType == -1);
  4. keyboardView = (KeyboardView)findViewById(R.id.playKeyboard);
  5. if (!useNativeKeyboard) {
  6. Keyboard keyboard = new Keyboard(this, keyboardType);
  7. keyboardView.setKeyboard(keyboard);
  8. } else {
  9. keyboardView.setVisibility(View.GONE);
  10. }
  11. boardView.setUseNativeKeyboard(useNativeKeyboard);
  12. }

代码示例来源:origin: KDE/kdeconnect-android

  1. @Override
  2. public View onCreateInputView() {
  3. // Log.d("RemoteKeyboardService", "onCreateInputView connected=" + RemoteKeyboardPlugin.isConnected());
  4. inputView = new KeyboardView(this, null);
  5. inputView.setKeyboard(new Keyboard(this, R.xml.remotekeyboardplugin_keyboard));
  6. inputView.setPreviewEnabled(false);
  7. inputView.setOnKeyboardActionListener(this);
  8. updateInputView();
  9. return inputView;
  10. }

代码示例来源:origin: wuzhendev/android-xnumberkeyboard

  1. private void initKeyboard() {
  2. // 设置软键盘按键的布局
  3. Keyboard keyboard = new Keyboard(getContext(), R.xml.keyboard_number);
  4. settingSpecialKey();
  5. setKeyboard(keyboard);
  6. // 设置按键没有点击放大镜显示的效果
  7. setPreviewEnabled(false);
  8. setEnabled(true);
  9. super.setOnKeyboardActionListener(this);
  10. }

相关文章