自定义Dialog
来源:互联网 发布:ping ip地址的一个端口 编辑:程序博客网 时间:2024/06/08 09:39
相信大家会用到各种各样的弹出框适应现代发展潮流,今天我再写一个,共同学习一下
在点击事件里面加上
final AlertDialog alertDialog = new AlertDialog.Builder(HealthCenter.this).create();//实例化 alertDialog.show();//开始 Window window = alertDialog.getWindow(); window.setContentView(R.layout.activity_activity_alert_dialog_hc); TextView tv_title = (TextView) window.findViewById(R.id.result_tj); tv_title.setText("详细信息");//标题 TextView tv_message = (TextView) window.findViewById(R.id.zt); tv_message.setText("整体健康评估报告");//副标题 TextView tv_nr = (TextView) window.findViewById(R.id.pgnr);
//内容主题 tv_nr.setText("您的身体状况非常稳定哦,多喝水多吃水果、蔬菜,保持维生素的摄入,有助于降压哦,平时多注意锻炼"); TextView btn = (TextView) window.findViewById(R.id.ok_btn); btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { alertDialog.dismiss();//点击确定关闭 }});
1 0
- 自定义Dialog---继承Dialog
- 自定义Dialog android Dialog
- 自定义Dialog
- 自定义Dialog
- 自定义dialog
- 自定义 Dialog
- 自定义dialog
- 自定义 dialog
- 自定义Dialog
- 自定义 Dialog
- 自定义Dialog
- 自定义dialog
- 自定义Dialog
- 自定义 Dialog
- 自定义Dialog
- 自定义Dialog
- 自定义Dialog
- 自定义Dialog
- 165.LeetCode Compare Version Numbers(easy)[字符串处理 分割与int转换]
- 机器学习中的距离计算
- [BZOJ2937][POI2000]建造酿酒厂(线性维护队列思想)
- ES6 symbol
- 线性代数常用基本知识 (含向量和矩阵范数<Matrix or vector norm>)
- 自定义Dialog
- mpandroidchat实例 仿360你财富
- 前后端数据对接防止接口被恶意调用
- LeetCode 299. Bulls and Cows
- startActivityForResult。。。。注意点
- Matlab显示图像时去除灰色边框
- 物联网 WIFI 一键配置原理(smartconfig) ESP8266/QCA4004
- 蘑菇街笔试--剪桌腿的最小代价
- Quick-cocos2d-x ModelBase的作用