Java Code Examples for com.qmuiteam.qmui.util.QMUIKeyboardHelper#showKeyboard()
The following examples show how to use
com.qmuiteam.qmui.util.QMUIKeyboardHelper#showKeyboard() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PersonActivity.java From PoetryWeather with Apache License 2.0 | 6 votes |
/** * 长文本输入对话框 */ private void showLongEditDialog() { QMAutoTestDialogBuilder autoTestDialogBuilder = new QMAutoTestDialogBuilder(PersonActivity.this); autoTestDialogBuilder .addAction("取消", (dialog, index) -> dialog.dismiss()) .addAction("确定", (dialog, index) -> { signature = autoTestDialogBuilder.getEditText().getText().toString(); if (signature.length() < 50) { Toast.makeText(PersonActivity.this, "您的个性签名已修改", Toast.LENGTH_SHORT).show(); Log.d(TAG, "showLongEditDialog: signature" + signature); sharedPreferencesEdit("signature", signature); signatureListView.setDetailText(signature); dialog.dismiss(); } else { Toast.makeText(PersonActivity.this,"您输入的字数超出限制,请重新输入",Toast.LENGTH_SHORT).show(); } }); autoTestDialogBuilder.create(mCurrentDialogStyle).show(); QMUIKeyboardHelper.showKeyboard(autoTestDialogBuilder.getEditText(),true); }
Example 2
Source File: ProxySettingActivity.java From v9porn with MIT License | 5 votes |
@Override public void onClick(View v) { switch (v.getId()) { case R.id.bt_proxy_setting_test: if (presenter.isSetPorn91VideoAddress()) { Logger.t(TAG).d("木有设置地址呀"); showNeedSetAddressFirstDialog(); return; } isTestSuccess = false; String proxyIpAddress = etDialogProxySettingIpAddress.getIpAddressStr(); String portStr = etDialogProxySettingPort.getText().toString().trim(); if (TextUtils.isEmpty(portStr) || TextUtils.isEmpty(proxyIpAddress) || !TextUtils.isDigitsOnly(portStr)) { showMessage("端口号或IP地址不正确", TastyToast.WARNING); return; } int proxyPort = Integer.parseInt(portStr); presenter.testProxy(proxyIpAddress, proxyPort); QMUIKeyboardHelper.hideKeyboard(v); break; case R.id.bt_proxy_setting_reset: etDialogProxySettingIpAddress.setIpAddressStr(""); etDialogProxySettingPort.setText(""); View view = getCurrentFocus(); if (view instanceof AppCompatEditText || view instanceof EditText) { QMUIKeyboardHelper.showKeyboard((EditText) view, QMUIKeyboardHelper.SHOW_KEYBOARD_DELAY_TIME); } break; default: } }
Example 3
Source File: ProxySettingActivity.java From v9porn with MIT License | 5 votes |
@Override public void onClick(View v) { switch (v.getId()) { case R.id.bt_proxy_setting_test: if (presenter.isSetPorn91VideoAddress()) { Logger.t(TAG).d("木有设置地址呀"); showNeedSetAddressFirstDialog(); return; } isTestSuccess = false; String proxyIpAddress = etDialogProxySettingIpAddress.getIpAddressStr(); String portStr = etDialogProxySettingPort.getText().toString().trim(); if (TextUtils.isEmpty(portStr) || TextUtils.isEmpty(proxyIpAddress) || !TextUtils.isDigitsOnly(portStr)) { showMessage("端口号或IP地址不正确", TastyToast.WARNING); return; } int proxyPort = Integer.parseInt(portStr); presenter.testProxy(proxyIpAddress, proxyPort); QMUIKeyboardHelper.hideKeyboard(v); break; case R.id.bt_proxy_setting_reset: etDialogProxySettingIpAddress.setIpAddressStr(""); etDialogProxySettingPort.setText(""); View view = getCurrentFocus(); if (view instanceof AppCompatEditText || view instanceof EditText) { QMUIKeyboardHelper.showKeyboard((EditText) view, QMUIKeyboardHelper.SHOW_KEYBOARD_DELAY_TIME); } break; default: } }