AlertDialog中EditText无弹出键盘解决办法

2016-08-17  本文已影响0人  梦沉薇露

private void showMyDialog(int layoutId){
LayoutInflater inflater = LayoutInflater.from(mContext);
View fourView = inflater.inflate(layoutId, null);
AlertDialog myDialog = new AlertDialog.Builder(context).create(); //加上以下这句代码
myDialog .setView(((Activity) mContext).getLayoutInflater().inflate(layoutId, null))
myDialog .show();
myDialog .getWindow().setContentView(fourView);
}

上一篇 下一篇

猜你喜欢

热点阅读