本文共 453 字,大约阅读时间需要 1 分钟。
AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.content);// 加载布局 MainActivity.content 对应 MainActivity.thistime_view = View.inflate(MainActivity.content, R.layout.time_long, null);count_tiime = (TextView) time_view.findViewById(R.id.count_tiime);count_tiime.setText(hms);builder.setView(time_view);// 点击遮罩层不关闭 即弹窗的外部 builder.setCancelable(true); 对应点击外部可关闭builder.setCancelable(false);builder.create().show();
可自定义 time_long.xml 布局
转载地址:http://nyqrf.baihongyu.com/