最新回答 / 慕容6015769
public class DialogActivity extends Activity implements View.OnClickListener{ ... public void showCustomDialog(){ LayoutInflater inflater = LayoutInflater.from(this); View view = inflater.inflate(R.layout.layout_dialog,null); Button btn...
2018-11-14
已采纳回答 / 有梦想的人不睡觉11
/加载布局管理器LayoutInflater inflater = LayoutInflater.from(context);//将xml布局转换为view对象View view= inflater.inflate(R.layout.item_myseallist,parent, false);
2018-08-28
最新回答 / 菩提树1986
Toast.makeText(MainActivity.this, str,Toast.LENGTH_SHORT ).show();或者Toast toast=Toast.makeText(this, "" ,Toast.LENGTH_LONG);toast.show();你是先声明toast,申明后就不能再申明的后面调用show方法,而是通过变量toast.show()调用
2018-03-17