点击按钮时候,弹出dialog,但是dialog中的textview的内容却没有显示出来。这内容我不是写在xml布局里面的,而是在构造方法中传入值的。代码如下
View mView = LayoutInflater.from(context).inflate(
R.layout.dialog_delete_layout, null);
dialog_delete_layout_textview_name = (TextView) mView
.findViewById(R.id.dialog_delete_layout_textview_name);
dialog_delete_layout_textview_account = (TextView) mView
.findViewById(R.id.dialog_delete_layout_textview_accunt);
dialog_delete_layout_textview_name.setText("sdasdasdadsa");
dialog_delete_layout_textview_name.setText("应用为:" + app.getAppName());
dialog_delete_layout_textview_account.setText("账号为:" + app.getAccount());
positiveButton = (Button) mView
.findViewById(R.id.dialog_delete_positiveButton);
negativeButton = (Button) mView
.findViewById(R.id.dialog_delete_negativeButton);
super.setContentView(mView);
dialog_delete_layout_textview_name.setText("应用为:" + app.getAppName());
dialog_delete_layout_textview_account.setText("账号为:" + app.getAccount());
这两行的内容没有显示。求教
------解决思路----------------------
你真逗逼
------解决思路----------------------
也是醉了,还有这变量命名也太长了