Пример #1
0
 /**
  * Attaches the imeAdapter to its native counterpart. This is needed to start forwarding keyboard
  * events to WebKit.
  *
  * @param nativeImeAdapter The pointer to the native ImeAdapter object.
  */
 public void attach(long nativeImeAdapter) {
   if (mNativeImeAdapterAndroid != 0) {
     nativeResetImeAdapter(mNativeImeAdapterAndroid);
   }
   mNativeImeAdapterAndroid = nativeImeAdapter;
   if (nativeImeAdapter != 0) {
     nativeAttachImeAdapter(mNativeImeAdapterAndroid);
   }
 }
Пример #2
0
 public void attach(
     long nativeImeAdapter, int textInputType, int selectionStart, int selectionEnd) {
   if (mNativeImeAdapterAndroid != 0) {
     nativeResetImeAdapter(mNativeImeAdapterAndroid);
   }
   mNativeImeAdapterAndroid = nativeImeAdapter;
   mTextInputType = textInputType;
   mInitialSelectionStart = selectionStart;
   mInitialSelectionEnd = selectionEnd;
   if (nativeImeAdapter != 0) {
     nativeAttachImeAdapter(mNativeImeAdapterAndroid);
   }
 }