添加权限
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
// 显示系统级提示框(自定义布局)
private void showNoticeDialog(String titil, final String text) {
LayoutInflater inflaterDl = LayoutInflater.from(MyApplication.getContext());
RelativeLayout layout = (RelativeLayout) inflaterDl.inflate(R.layout.layout_dialog_red_pack, null);
final Dialog builder = new AlertDialog.Builder(this).create();
builder.setCanceledOnTouchOutside(false);
builder.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);//关键句
builder.show();
builder.getWindow().setContentView(layout);
final TextView textView = (TextView) layout.findViewById(R.id.red_tv_text);
textView.setText(titil);
final ImageView img = (ImageView) layout.findViewById(R.id.red_iv_img);
img.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
}
});
}

最新文章

  1. Ural-1146Maximum Sum-最大子矩阵
  2. jvm中的动态分派
  3. 自定义cell
  4. 【POJ】1062 昂贵的聘礼(spfa)
  5. javascript 深拷贝
  6. telnet登录路由器启动服务的shell脚本
  7. Junit单元测试学习笔记三
  8. jquery滚动条
  9. HDU2520 我是菜鸟,我怕谁
  10. 【HDOJ】3496 Watch The Movie
  11. boost::function实践——来自《Beyond the C++ Standard Library ( An Introduction to Boost )》
  12. 动态代理写connection连接池Demo
  13. 使用BurpSuite进行双文件上传拿Webshell
  14. Let&#39;sEncrypt 免费通配符/泛域名SSL证书添加使用教程
  15. .net 多线程之线程取消
  16. Solr DocValues详解
  17. 四则运算安卓版ver.mk2
  18. 解决Jquery向页面append新元素之后事件的绑定问题
  19. solrconfig.xml配置详解
  20. CSS Div固定在网页顶部、底部、左侧、右侧

热门文章

  1. WPF依赖属性DependencyProperty
  2. Unity3D 中的协程
  3. 前端常用的几个js判断(二)
  4. sass1:
  5. .net中excel遇到的一些问题
  6. pandas筛选0,3,6开头的行
  7. WPF附加属性
  8. C#微信公众号接口开发,灵活利用网页授权、带参数二维码、模板消息,提升用户体验之完成用户绑定个人微信及验证码获取
  9. 批量生成clr脚本
  10. 请定义一个宏,比较两个数a、b的大小,不能使用大于、小于、if语句