您的位置:首页 > 理论基础 > 计算机网络

当没有网络时候设置一个窗体

2016-06-10 10:17 267 查看
if (!isNetworker) {
ImageView imageView =new ImageView(mContext);
Bitmap bitmap =android.graphics.BitmapFactory.decodeResource(getResources(),R.drawable.blue)
imageView.setImageBitmap(bitmap);
WindowManager.LayoutParams ll = new WindowManager.LayoutParams();
ll.width = WindowManager.LayoutParams.MATCH_PARENT;
ll.height = WindowManager.LayoutParams.MATCH_PARENT;
setContentView(imageView,ll);
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: