當前位置: 首頁>>代碼示例>>Java>>正文


Java EditText.postDelayed方法代碼示例

本文整理匯總了Java中android.widget.EditText.postDelayed方法的典型用法代碼示例。如果您正苦於以下問題:Java EditText.postDelayed方法的具體用法?Java EditText.postDelayed怎麽用?Java EditText.postDelayed使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.widget.EditText的用法示例。


在下文中一共展示了EditText.postDelayed方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setAutofocus

import android.widget.EditText; //導入方法依賴的package包/類
@WXComponentProp(name = Constants.Name.AUTOFOCUS)
public void setAutofocus(boolean autofocus) {
  if (getHostView() == null) {
    return;
  }
  mAutoFocus = autofocus;
  EditText inputView = getHostView();
  if (mAutoFocus) {
    inputView.setFocusable(true);
    inputView.requestFocus();
    inputView.setFocusableInTouchMode(true);
    inputView.postDelayed(new Runnable() {
      @Override
      public void run() {
        showSoftKeyboard();
      }
    }, 16);
  } else {
    inputView.postDelayed(new Runnable() {
      @Override
      public void run() {
        hideSoftKeyboard();
      }
    }, 16);
  }
}
 
開發者ID:amap-demo,項目名稱:weex-3d-map,代碼行數:27,代碼來源:AbstractEditComponent.java

示例2: showSoftKeyboardDelayed

import android.widget.EditText; //導入方法依賴的package包/類
public static void showSoftKeyboardDelayed(final EditText editText, long delay){
    editText.postDelayed(new Runnable() {
        @Override
        public void run() {
            InputMethodManager inputMethodManager = (InputMethodManager) editText.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
            inputMethodManager.showSoftInput(editText, InputMethodManager.SHOW_IMPLICIT);
        }
    }, delay);
}
 
開發者ID:zuoweitan,項目名稱:Hitalk,代碼行數:10,代碼來源:ViewUtils.java

示例3: setNumber

import android.widget.EditText; //導入方法依賴的package包/類
private void setNumber(View row, String number) {
    final EditText numberEdit = (EditText) row.findViewById(R.id.edit_number);
    numberEdit.setText(number);
    if (number == null || number.isEmpty()) {
        numberEdit.postDelayed(new Runnable() {
            @Override
            public void run() {
                numberEdit.requestFocus();
            }
        }, 100);
    }
}
 
開發者ID:kaliturin,項目名稱:BlackList,代碼行數:13,代碼來源:AddOrEditContactFragment.java

示例4: getInputViewLoacation

import android.widget.EditText; //導入方法依賴的package包/類
public static int[] getInputViewLoacation() {
    final int[] locations = new int[2];
    if (inputDialog != null || inputDialog.isShowing()) {
        final EditText inputView = (EditText) inputDialog.getInputView();
        inputView.postDelayed(new Runnable() {
            @Override
            public void run() {
                inputView.getLocationInWindow(locations);
            }
        }, 500);
    }
    return locations;
}
 
開發者ID:scanflijinhuan,項目名稱:MyFriendsComment,代碼行數:14,代碼來源:Tools.java

示例5: showKeyboard

import android.widget.EditText; //導入方法依賴的package包/類
private void showKeyboard(final EditText etSearch) {
    etSearch.postDelayed(new Runnable() {
        public void run() {
            etSearch.requestFocus();
        }
    }, 300);
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:8,代碼來源:SearcherActivity.java


注:本文中的android.widget.EditText.postDelayed方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。