给editText设置获取焦点
editText.requestFocus();
给dialog设置style
AlertDialog.Builder builder = new AlertDialog.Builder(activity, R.style.DialogTheme);
<style name="DialogTheme" parent="Base.Theme.AppCompat.Light.Dialog">
<!--弹出软键盘-->
<item name="android:windowSoftInputMode">stateVisible</item>
</style>
网友评论