模仿Zaker加载框
来源:互联网 发布:linux查看所有服务 编辑:程序博客网 时间:2024/05/09 18:38
MyProgressDialog.java
package com.xzq.view;import android.app.Dialog;import android.content.Context;import android.view.LayoutInflater;import android.view.View;import android.view.animation.AnimationUtils;import android.view.animation.RotateAnimation;import android.widget.ImageView;import android.widget.RelativeLayout;import com.xzq.zaker.R;/** * @author XZQ * @version */public class MyProgressDialog extends Dialog { public Context context;// 上下文 public MyProgressDialog(Context context) { super(context); this.context = context; } public MyProgressDialog(Context context, boolean cancelable, OnCancelListener cancelListener) { super(context, cancelable, cancelListener); this.context = context; } public MyProgressDialog(Context context, int theme) { super(context, theme); this.context = context; View view = LayoutInflater.from(context).inflate(R.layout.load, null); // 加载自己定义的布局 ImageView img_loading = (ImageView) view.findViewById(R.id.img_load); RelativeLayout img_close = (RelativeLayout) view.findViewById(R.id.img_cancel); RotateAnimation rotateAnimation = (RotateAnimation) AnimationUtils.loadAnimation(context, R.anim.refresh); // 加载XML文件中定义的动画 img_loading.setAnimation(rotateAnimation);// 开始动画 setContentView(view);// 为Dialoge设置自己定义的布局 // 为close的那个文件添加事件 img_close.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { dismiss(); } }); }}
- 模仿Zaker加载框
- ZAKER
- Android实现Zaker的加载对话框
- [转载]Android实现Zaker的加载对话框
- 模仿懒惰加载的图片加载方法
- Android性能优化之解密ZAKER,网易云阅读等新闻应用的内容缓存加载方式
- android 队列模仿listview同步加载图片
- 模仿百度分页(Ajax异步加载)
- 模仿搜狗浏览器加载小球
- 模仿饿了么的加载效果
- zaker splash页面实现
- 模仿QQ 输入框
- 模仿文章框
- 模仿
- 模仿
- 模仿
- 模仿
- 模仿微博拉动滚动条加载数据
- C++之1---main函数中省略返回语句
- html5-桌球
- 树状数组模板区间更新 区间询问
- 在eclipse中用ns3
- paip.JS的调试--DOM元素的属性与事件绑定
- 模仿Zaker加载框
- BUPT 652 Confusing Problem(AC自动机+数位DP)
- 将二叉树的两个孩子换位置,即左变右,右变左。(用递归和非递归两种方法)
- 输出字符串中没有重复的字符,比如“baaca”,则会输出“bac”
- VBscript常用函数——数值型函数
- 密码 stl函数的应用 注意map的使用 2012-10-7
- gpio_request 原形代码解读
- wordpress执行php文件 [大三TJB_708]
- ssh和springside 实现ajax返回对象列表