/**添加事项对话框*/
LayoutInflater inflater = LayoutInflater.from(PropertySetActivity.this);
final View textEntryView = inflater.inflate(R.layout.alert_dialog_text_entry, null);
final EditText eventNameET = (EditText)textEntryView.findViewById(R.id.eventNameET);
new AlertDialog.Builder(PropertySetActivity.this)
.setIcon(R.drawable.alert_dialog_icon)
.setTitle("亲,请添加代办事项名称")
.setView(textEntryView)
.setPositiveButton("确定", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
eventName = eventNameET.getText().toString();
}
})
.setNegativeButton("取消", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
Toast.makeText(PropertySetActivity.this, "亲,您没有对代办事项命名!", Toast.LENGTH_SHORT).show();
}
})
.show();
/**添加事项对话框*/

更多相关文章

  1. Android菜单实例
  2. Android(安卓)中的 requestWindowFeature
  3. 在/external/tinyalsa/pcm.c 添加android log
  4. android 按钮按下时改变字体颜色
  5. Android(安卓)获取设备序列号(SN号)含源码Demo
  6. android在eclipse上搭建环境---android launcher移植之(一)
  7. android tab的使用
  8. 禁止横竖屏自动切换
  9. Android(安卓)Sdk Manager更新

随机推荐

  1. Android---2---TextView、Button、EditTe
  2. Android(安卓)上Camera分析
  3. Android(安卓)支持多屏幕机制
  4. Android(安卓)Web development Note
  5. 为Android加入busybox工具
  6. Android(安卓)RelativeLayout 相对布局解
  7. Android的多媒体框架Opencore代码阅读
  8. android实现卸载提示
  9. Android沉浸式状态栏(二)
  10. Android(安卓)锁屏问题