技术点:

dialog;ProgressBar;animated-rotate;

弹出框:

import com.carspeak.client.R;

import android.app.Dialog;
import android.content.Context;
import android.graphics.drawable.AnimationDrawable;
import android.view.Gravity;
import android.widget.ImageView;
import android.widget.TextView; /**
* 等待进度条
* @author huqiang
*
*/
public class WaitProgressDialog extends Dialog {
private Context context = null;
private static WaitProgressDialog wProgressDialog = null; public WaitProgressDialog(Context context){
super(context);
this.context = context;
} public WaitProgressDialog(Context context, int theme) {
super(context, theme);
} public static WaitProgressDialog createDialog(Context context){
wProgressDialog = new WaitProgressDialog(context,R.style.WaitProgressDialog);
wProgressDialog.setContentView(R.layout.waitprogressdialog);
wProgressDialog.getWindow().getAttributes().gravity = Gravity.CENTER; return wProgressDialog;
}
}

R.style.WaitProgressDialog:

<style name="WaitProgressDialog" parent="@style/TipsDialog">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowNoTitle">true</item>
<item name="android:backgroundDimEnabled">false</item>
</style>

R.layout.waitprogressdialog:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal">
<ProgressBar
android:id="@+id/pb_process"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center"
style="?android:attr/progressBarStyle"
android:indeterminate="false"
android:indeterminateDrawable="@anim/process_round"/>
</LinearLayout>

@anim/process_round:

<?xml version="1.0" encoding="utf-8"?>
<animated-rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_loading"
android:pivotX="50%"
android:pivotY="50%" />

android 开发 制作弹出等待进度条的更多相关文章

  1. Android开发-各种各样好看漂亮的进度条,指示器,加载提示汇总

    导读:之前项目中用到一些进度条,找了不少,打算写个demo自己总结一下,留着以后用, 有些是自己写的,有些是github上找的别人的库,如果大家觉得好看可以用,直接下载复制代码到项目里就可以用,ok ...

  2. android开发学习 ------- 弹出框

    这是一种方法,是我觉得简单易懂代码量较少的一种: /* 创建AlertDialog对象并显示 */ final AlertDialog alertDialog = new AlertDialog.Bu ...

  3. Android 开发笔记 “弹出框”

    AlertDialog.Builder builder = new AlertDialog.Builder(Activity.this); builder.setMessage("Are y ...

  4. android 网络异步加载数据进度条

    ProgressDialog progressDialog = null; public static final int MESSAGETYPE = 0; private void execute( ...

  5. android 自定义控件——(四)圆形进度条

    ----------------------------------↓↓圆形进度条(源代码下有属性解释)↓↓---------------------------------------------- ...

  6. [Swift通天遁地]一、超级工具-(2)制作美观大方的环形进度条

    ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★➤微信公众号:山青咏芝(shanqingyongzhi)➤博客园地址:山青咏芝(https://www.cnblogs. ...

  7. android标题栏上面弹出提示框(二) PopupWindow实现,带动画效果

    需求:上次用TextView写了一个从标题栏下面弹出的提示框.android标题栏下面弹出提示框(一) TextView实现,带动画效果,  总在找事情做的产品经理又提出了奇葩的需求.之前在通知栏显示 ...

  8. android标题栏下面弹出提示框(一) TextView实现,带动画效果

    产品经理用的是ios手机,于是android就走上了模仿的道路.做这个东西也走了一些弯路,写一篇博客放在这里,以后自己也可用参考,也方便别人学习. 弯路: 1.刚开始本来用PopupWindow去实现 ...

  9. jquery制作弹出层带遮罩效果,点击阴影部分层消失

    jquery制作弹出层带遮罩效果,点击阴影部分层消失. 整体还是比较简单的. HTML代码很简单 <a href="#" class="big-link" ...

随机推荐

  1. iOS 层层推进实现代理模式

    1.代理模式核心思想:A类委托B类做某件事,然后A类获取B类的执行的返回结果! 举例:女孩想去买电影票,但是自己不亲自去而是委托男孩了解电影电影票信息,同时女孩获得男孩买票的结果,代码模拟实现: /* ...

  2. Windows Phone 资源管理与换肤思考

    新入手一台Windows 8的笔记本,安装了VS2013后,终于又可以开发WP了.公司暂时不愿意开发WP,那么咱就自行研究吧! 在没有WP开发环境的时候,曾经在WPF尝试了一下换肤功能的实现.最简单的 ...

  3. Android数据库(sqlite)加密方案

    最近因为一些项目的安全性需要将数据库加密,一开始想到的就是先将数据库通过AES加密,然后运行时再解密,另一种是将数据库里的内容加密. 很快这两种方案都是不理想的,第一种加密方式形同虚设,第二种,如果加 ...

  4. Linux字符设备和块设备的区别

    系统中能够随机(不需要按顺序)访问固定大小数据片(chunks)的设备被称作块设备,这些数据片就称作块.最常见的块设备是硬盘,除此以外,还有软盘驱动器.CD-ROM驱动器和闪存等等许多其他块设备.注意 ...

  5. MySQL 5.7.9 免安装配置

    MySQL 5.7.9 免安装配置 环境:win10 64位 mysql版本:mysql-5.7.9-winx64.zip (http://dev.mysql.com/downloads/mysql/ ...

  6. 破解金盘gdlisxp系统

    1.现在要破解的金盘gdlisxp系统版本 2.首先在你电脑上要有脱壳工具AspackDie,和OllyDBG动态调试工具,电脑上装好金盘软件. 3.用AspackDie进行对金盘应用程序脱壳处理,生 ...

  7. 重拾C,一天一点点_9-指针与数组

    这一章节很重要,一定要多思考.理解! 指针是一种保存变量地址的变量. 通常的机器 都有一系列连续编号或编址的存储单元.一个字节可存char类型,两相邻字节存储单元可存一个short,依此类推. p = ...

  8. 网页绘制图表 Google Charts with JavaScript #1....好强、好简单啊!

    此为文章备份,原文出处(我的网站) 网页绘制图表 Google Charts with JavaScript....好强.好简单啊!#1 http://www.dotblogs.com.tw/mis2 ...

  9. 小课堂week13 Clean Code Part2

    Clean Code Part2 对象与数据结构 首先让我们进行一个严肃的思考,对象与数据结构的区别在哪里? 如下两段代码分别用数据结构和对象的方法来描述了一个Point. public class ...

  10. Oracle中查看无效的对象、约束、触发器和索引

    .检查无效的数据库对象: SELECT owner, object_name, object_type,status FROM dba_objects WHERE status = 'INVALID' ...