zoukankan      html  css  js  c++  java
  • CustomProgressDialog

    1 ,布局文件

    <?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">
        <ImageView
            android:id="@+id/loadingImageView"
               android:layout_width="wrap_content"
               android:layout_height="wrap_content"
               android:background="@anim/progress_round"/>
        <TextView
            android:id="@+id/id_tv_loadingmsg"
            android:layout_width="wrap_content"
               android:layout_height="wrap_content"
               android:layout_gravity="center_vertical"
               android:textSize="20dp"/>
    </LinearLayout>

    anim/progress_round.xml

    <?xml version="1.0" encoding="utf-8"?>
    <animation-list
        xmlns:android="http://schemas.android.com/apk/res/android"
          android:oneshot="false">
        <item android:drawable="@drawable/progress_1" android:duration="200"/>
        <item android:drawable="@drawable/progress_2" android:duration="200"/>
        <item android:drawable="@drawable/progress_3" android:duration="200"/>
        <item android:drawable="@drawable/progress_4" android:duration="200"/>
        <item android:drawable="@drawable/progress_5" android:duration="200"/>
        <item android:drawable="@drawable/progress_6" android:duration="200"/>
        <item android:drawable="@drawable/progress_7" android:duration="200"/>
        <item android:drawable="@drawable/progress_8" android:duration="60"/>
    </animation-list>


    progressdialog 样式

        <style name="CustomDialog" parent="@android:style/Theme.Dialog">
            <item name="android:windowFrame">@null</item>
            <item name="android:windowIsFloating">true</item>
            <item name="android:windowContentOverlay">@null</item>
            <item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
            <item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item>
        </style>
        
        <style name="CustomProgressDialog" parent="@style/CustomDialog">
            <item name="android:windowBackground">@android:color/transparent</item>
            <item name="android:windowNoTitle">true</item>
        </style>
        
  • 相关阅读:
    数据库产生的背景
    VS2008执行MFC程序,提示microsoft incremental linker已停止工作解决方法
    leetcode第一刷_Add Binary
    【MongoDB】深入了解MongoDB不可不知的十点
    哈理工2015暑假训练赛 zoj 2078Phone Cell
    dpdk l2fwd 应用流程分析
    在Redhat Linux中执行非Redhat的Openstack, Redhat将对其Linux不提供支持
    Wing IDE 怎样设置 python版本号
    Shell编程入门
    通达OA 小飞鱼OA实施法:以项目管理的方式来推进工作流设计项目实施
  • 原文地址:https://www.cnblogs.com/java-g/p/4629543.html
Copyright © 2011-2022 走看看