当没有网络时候设置一个窗体
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);
}
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);
}
相关文章推荐
- 【linux】常见的网络管理命令
- java基础之网络编程
- http://zinoui.com/license
- http://www.layoutit.com/
- http://runjs.cn/
- http://qunee.com/#try
- HttpClient4.5.2 基本概念
- Android官方开发文档Training系列课程中文版:网络操作之网络连接
- TCP/IP编程入门-案例学习
- java实现http的get和post请求
- httpd cgi程序配制+.py .cgi执行
- 多线程与网络(八) - AFN - HTTPS - UIWebView简单使用
- 联通手机网络
- apache httpd 2.4编译安装
- HttpURLConnection、Handler、新闻客户端案例、get和post提交数据
- Orcale 建立 自增 id 主键的方法--艾克峰网络科技
- TCP/IP四层模型和OSI七层模型的概念
- retrofit 2.0 简单使用
- 【bzoj1146】【CTSC2008】【网络管理】【树链剖分+线段树套平衡树】
- 灵活而智能的HTTP框架 LiteHttp