android的UI中经常出现的菊花圈(圆形的加载圈)
来源:互联网 发布:linux 配置文件生效 编辑:程序博客网 时间:2024/05/17 01:31
夜深也是无聊,翻看以前的老代码,发现那个我们经常用的菊花圈,原来是帧动画做的,有点意思。突然感觉帧动画做的东西效果不错啊,至少看起来听耐看的。开工上代码:
先是布局文件:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/login_bg" > <ProgressBar android:layout_width="24dip" android:layout_height="24dip" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" android:layout_marginBottom="100dip" android:indeterminate="true" android:indeterminateDrawable="@drawable/progress_animation" /></RelativeLayout>
<?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/pull_ref_pb_1" android:duration="80"/> <item android:drawable="@drawable/pull_ref_pb_2" android:duration="80"/> <item android:drawable="@drawable/pull_ref_pb_3" android:duration="80"/> <item android:drawable="@drawable/pull_ref_pb_4" android:duration="80"/> <item android:drawable="@drawable/pull_ref_pb_5" android:duration="80"/> <item android:drawable="@drawable/pull_ref_pb_6" android:duration="80"/> <item android:drawable="@drawable/pull_ref_pb_7" android:duration="80"/> <item android:drawable="@drawable/pull_ref_pb_8" android:duration="80"/> <item android:drawable="@drawable/pull_ref_pb_9" android:duration="80"/> <item android:drawable="@drawable/pull_ref_pb_10" android:duration="80"/> <item android:drawable="@drawable/pull_ref_pb_11" android:duration="80"/> <item android:drawable="@drawable/pull_ref_pb_12" android:duration="80"/></animation-list>
package com.woyou.frameanimation;import java.util.Timer;import java.util.TimerTask;import android.content.Intent;import android.os.Bundle;import android.support.v7.app.ActionBarActivity;/** * 菊花圈布局 * @author Administrator * */public class FrameActivity extends ActionBarActivity {@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.login_main);Timer timer = new Timer();timer.schedule(new TimerTask() {@Overridepublic void run() {Intent intent = new Intent(FrameActivity.this, LoginActivity.class);startActivity(intent);finish();}}, 5000);}}
定时久点在让他跳转过去吧...效果图
0 0
- android的UI中经常出现的菊花圈(圆形的加载圈)
- 关于AFNetworking菊花转圈圈的问题
- iOS开发加载网页(webview)时的菊花(小圈)
- Android 带小圆圈的倒计时圆形进度条
- IT 圈里经常被读错的英文单词
- IT 圈里经常被读错的词
- UIWebview 和加载的圈
- 推荐几个经常关注的GIS圈的博客
- 微信小程序实现美美的虚线圆形进度圈
- IT 圈里那些经常被读错的词
- VR 圈里经常被提起的概念
- android的不通过xml添加组件,用new来生成组件。(加载的小圆圈)
- Android自定义View之带小圆圈的倒计时圆形进度条
- 束缚我的圈
- 进度圈的显示
- 媒体圈的翘楚
- 绕圈的兔子
- 圈复杂度的计算
- Android依赖注入的实现
- hust 1006 - Stones 优先队列
- Java枚举类型的使用
- 类与对象 类的分类 方法 继承 重写
- 基于java config的springSecurity(三)--加入RememberMe,启用CSRF和增强密码
- android的UI中经常出现的菊花圈(圆形的加载圈)
- cocos2dx-3.0以上版本之 创建Sprite精灵的6种形式
- ECLIPSE中MAVEN构建spring 多模块工程jar包不能自动扫描问题解决办法
- Activiti学习入门(4) -- 学习查询个人的任务
- C语言中int到float的强制类型转换
- new types may not be defined in a return type
- BlueZ移植与配置
- 20150111
- 理解和使用alsa配置-默认静音,必须先用amixer解除主音量和pcm音量的静音