Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Simple Animation Situation

Simple Animation Situation

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

Simple Animation Situation

Postby kdiddy » Wed Apr 01, 2009 2:45 am

[align=left]Hi!

I'm trying to figure out how to make a simple animation using png's in my drawable folder. When the user clicks on an button, an animation happens on that button. I want to have it run a little animation cycling through some pics.

I have the following as XML but am unclear on the java

<?xml version="1.0" encoding="utf-8"?>
<animation-list

xmlns:android="http://schemas.android.com/apk/res/android"

<animation-list
android:id="@+id/myanimation"
android:oneshot="false"
>
<item android:drawable="@drawable/laptopblue" android:duration="200" />
<item android:drawable="@drawable/laptopred" android:duration="200" />
<item android:drawable="@drawable/laptopyellow" android:duration="200" />
</animation-list>
[/align]



I'm having an error with the code I'm using to identify the animation. It force closes.

myAnimation = AnimationUtils.loadAnimation(this, R.anim.myanimation);
Is onDraw or a Timer needed, or will it just work based on he duration set in the XML? I'm just not sure what objects and methods are needed to make it work.

Any suggestions?

Thanks!

K
Diddy
kdiddy
Junior Developer
Junior Developer
 
Posts: 19
Joined: Wed Apr 01, 2009 2:30 am

Top

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 5 guests