LayoutInflater layoutInflater = getLayoutInflater();final View dialogView = layoutInflater.inflate(R.id.dialog);

然后在Dialog的设置按钮的onClick()方法中写入:

TextView text = (EditText)dialogView.findViewById(R.id.username_edit);    //注意findViewById前面有特定的ViewString textContent = text.getText().toString();outView.setText(textContent);//outView就是需要写入数值的控件


更多相关文章

  1. Android简易计算器
  2. Android(安卓)APP--编写简单的答题器
  3. Android中FloatingActionButton实现悬浮按钮实例
  4. Android(安卓)ConstraintLayout 降低布局层次,布局优化首选
  5. Android学习笔记(6)——Android——LoginDemo
  6. Android中浮动按钮
  7. Android按钮实现点击事件的四种方式
  8. android TextView控件文字下划线
  9. Android中解决EditText与NestedScrollView垂直滑动冲突

随机推荐

  1. 判断应用是安装还是卸载了
  2. android 3.0以上对usb设备的访问USB
  3. 导入android-support-v7-appcompat出现问
  4. Android error:Lint found fatal errors
  5. 去除android锁屏
  6. 手机壁纸设置相关
  7. android中属性动画
  8. android 得到唯一码和电话号码
  9. 问题:plugin with id 'android' not foun
  10. Android Spinner(级联 天气预报)