安卓做旋转动画
来源:互联网 发布:知乎 精华回答 编辑:程序博客网 时间:2024/06/04 19:56
main.xml
activity 文件
<?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="vertical" android:background="#FFFFFF"> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /> <ImageView android:id="@+id/welcomeLoading" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginTop="18.0dip" android:background="@drawable/spinner_small" /></LinearLayout>
spinner_small.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/ic_loading_40x40_01" android:duration="150" /> <item android:drawable="@drawable/ic_loading_40x40_02" android:duration="150" /> <item android:drawable="@drawable/ic_loading_40x40_03" android:duration="150" /> <item android:drawable="@drawable/ic_loading_40x40_04" android:duration="150" /> <item android:drawable="@drawable/ic_loading_40x40_05" android:duration="150" /> <item android:drawable="@drawable/ic_loading_40x40_06" android:duration="150" /> <item android:drawable="@drawable/ic_loading_40x40_07" android:duration="150" /> <item android:drawable="@drawable/ic_loading_40x40_08" android:duration="150" /></animation-list>
activity 文件
package sdfr.pacsdf.namespace;import android.app.Activity;import android.graphics.drawable.AnimationDrawable;import android.os.Bundle;import android.widget.ImageView;public class SdfActivity extends Activity {private ImageView wLoading; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); wLoading = (ImageView) findViewById(R.id.welcomeLoading); } @Override public void onWindowFocusChanged(boolean hasFocus) { AnimationDrawable ad=(AnimationDrawable) wLoading.getBackground(); ad.start(); super.onWindowFocusChanged(hasFocus); } }
- 安卓做旋转动画
- 旋转动画
- 旋转动画
- 动画旋转
- 旋转动画
- 旋转动画
- 旋转动画
- 旋转动画
- 旋转动画
- 旋转动画
- 旋转动画
- 动画之旋转动画
- 旋转动画加载, 旋转角度
- Android 动画 - RoateAnimation 旋转动画
- Android动画之旋转动画
- 相机旋转动画
- custom ProgressBar|动画 旋转
- blend 动画旋转
- Java Exception: java.lang.NoSuchFieldError
- 使用存储过程批量查询ArcSDE要素类及索引的存储大小
- vc连接数据库
- HDU 1022 堆栈的应用
- Unity3d-Plugin
- 安卓做旋转动画
- 丢失的代码如何找回来
- RAC架构之负载均衡
- MySQL数据类型和java数据类型
- 写于2012年12月22日之前(2012.07.30)
- [转帖]怎样做研究(刘挺)
- Struts2之Action
- J2EE SDK 安装指南
- Android学习笔记(6)---关于Service+MediaPlayer的使用