Android教程網
  1. 首頁
  2. Android 技術
  3. Android 手機
  4. Android 系統教程
  5. Android 游戲
 Android教程網 >> Android技術 >> 關於Android編程 >> 我的Android進階之旅------>Android之動畫之Frame Animation實例

我的Android進階之旅------>Android之動畫之Frame Animation實例

編輯:關於Android編程

Frame animation An animation defined in XML that shows a sequence of images in order (like a film).   FILE LOCATION: res/drawable/filename.xml The filename will be used as the resource ID. COMPILED RESOURCE DATATYPE: Resource pointer to an AnimationDrawable. RESOURCE REFERENCE: In Java: R.drawable.filename In XML: @[package:]drawable.filename SYNTAX: <?xml version="1.0" encoding="utf-8"?> <animation-list xmlns:android="http://schemas.android.com/apk/res/android"     android:oneshot=["true" | "false"] >     <item         android:drawable="@[package:]drawable/drawable_resource_name"         android:duration="integer" /> </animation-list> ELEMENTS: <animation-list> Required. This must be the root element. Contains one or more <item> elements. attributes:   android:oneshot Boolean. "true" if you want to perform the animation once; "false" to loop the animation. <item> A single frame of animation. Must be a child of a <animation-list> element. attributes:   android:drawable Drawable resource. The drawable to use for this frame. android:duration Integer. The duration to show this frame, in milliseconds.  
  1. 上一頁:
  2. 下一頁:
熱門文章
閱讀排行版
Copyright © Android教程網 All Rights Reserved