(4.3.1.7)【项目一】子Fragment之对话框
来源:互联网 发布:centos 6.5搭建lnmp 编辑:程序博客网 时间:2024/05/18 21:06
public static void ShowCodingDialog(Context context) { // TODO Auto-generated method stub ImageView imageView = new ImageView(context); imageView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT)); imageView.setImageResource(R.drawable.yunshi_fail_nolgin_img); final Dialog dialog = new Dialog(context); dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.setContentView(R.layout.yunshi_dialog); dialog.setCanceledOnTouchOutside(false); TextView title=(TextView) dialog.findViewById(R.id.yunshi_dialog_title); LinearLayout content=(LinearLayout) dialog.findViewById(R.id.yunshi_dialog_content_ll_out); Button ok=(Button) dialog.findViewById(R.id.yunshi_dialog_id_ok); Button cancel=(Button) dialog.findViewById(R.id.yunshi_dialog_id_cancel); title.setText(context.getResources().getString(R.string.codeing)); content.removeAllViews(); content.addView(imageView); ok.setVisibility(View.GONE); cancel.setVisibility(View.GONE); dialog.show(); final Timer t = new Timer(); t.schedule(new TimerTask() { public void run() { dialog.dismiss(); // when the task active then close the dialog t.cancel(); // also just top the timer thread, otherwise, you may receive a crash report } }, 3000); // after 2 second (or 2000 miliseconds), the task will be active. }
0 0
- (4.3.1.7)【项目一】子Fragment之对话框
- (4.3.1.4)【项目一】子Fragment之空FragmentPage1
- (4.3.1.8)【项目一】子fragment之imageloader
- (4.3.1.5)【项目一】子Fragment之NineGong和自定义的异步任务
- (4.3.1.6)【项目一】子Fragment之ViewPager和FragmentPagerAdapter
- Android之Fragment(一)
- (4.3.1.9)【项目一】跳转对话框+异步任务
- Android项目开发实战之使用Fragment和FragmentTabHost搭建底部菜单(一)
- QT学习 之 对话框 (一) 可扩展对话框
- android学习笔记之Fragment(一)
- android学习笔记之Fragment(一)
- Fragment(一)快速入门之使用
- Android之Fragment学习(一)
- Fragment学习之旅(一)
- Android 学习之 Fragment(一)
- Fragment系列之----基础知识(一)
- JavaSwing图形界面编程之对话框(一)
- Android之Dialog 对话框(一)
- msp430f149波特率设置
- [leetcode] Product of Array Except Self
- Centos环境下安装Tomcat
- 欢迎使用CSDN-markdown编辑器
- Android Studio相关资源
- (4.3.1.7)【项目一】子Fragment之对话框
- Integer to Roman
- 打开套有 ListVew的 ScrollView的页面布局 默认 起始位置不是最顶部
- linux 任务管理器(top ps)
- [Android]Android接微信支付接口-如何跑通微信支付的demo (欢迎入坑) 群:121382044
- 使用release报错arc forbids explicit message send of 'release'
- Android与IIS身份验证——基本验证_HttpClient Http请求 验证
- LeetCode之Roman & Integer 的转换(简单题)
- 文章标题