sendDialog = new Dialog(context,R.style.dialog_send_ir_tip);
View view = ViewUtil.inflateView(R.layout.tvwall_toast_send_ir_view, context);
sendDialog.setContentView(view);
sendDialog.show(); //show之后才把那个decor添加到了windowmanager中
sendDialog.getWindow().setLayout(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT); //需要在show之后调用
本文介绍了如何使用Android自定义Toast的显示流程,包括创建对话框、设置内容视图及调整布局参数等步骤。
692

被折叠的 条评论
为什么被折叠?



