Comment on Tutorial - Animation sample program in Android By Ashley
Comment Added by : Sin
Comment Added at : 2013-01-17 05:40:37
Comment on Tutorial : Animation sample program in Android By Ashley
In case your having trouble
1 the ani.xml file must be located in the res/layout directory not the drawable directory.
2 as mentioned earlier Change the line from
imgView.setBackgroundResource(R.drawable.ani);
to
imgView.setBackgroundResource(R.layout.ani);
3. in the ani.xml file you must have the drawable references in your drawable folder or the correct resolution display folder.
eg:
<item
android:drawable="@drawable/ic_launcher1"
android:duration="50" />
<item
android:drawable="@drawable/ic_launcher2"
android:duration="50" />
<item
android:drawable="@drawable/ic_launcher3"
android:duration="50" />
in this example i simply used the ic_launcher icon that by default is included in drawable-hdpi, drawable-mdpi, drawable-ldpi, folders and renamed them as ic_launcher_1,2,3 respectivley. And then copied them into the drawable folder...
you can use any png you want just make sure they are in the drawable folder and referenced in ani.xml
hope this makes sence...
View Tutorial
- Data Science
- Android
- AJAX
- ASP.net
- C
- C++
- C#
- Cocoa
- Cloud Computing
- HTML5
- Java
- Javascript
- JSF
- JSP
- J2ME
- Java Beans
- EJB
- JDBC
- Linux
- Mac OS X
- iPhone
- MySQL
- Office 365
- Perl
- PHP
- Python
- Ruby
- VB.net
- Hibernate
- Struts
- SAP
- Trends
- Tech Reviews
- WebServices
- XML
- Certification
- Interview
categories
Related Tutorials
Program using concept of byte long short and int in java
Update contents of a file within a jar file
Tomcat and httpd configured in port 8080 and 80
Count number of vowels, consonants and digits in a String in Java
Student marks calculation program in Java
Calculate gross salary in Java
Calculate average sale of the week in Java
Vector in Java - Sample Program
MultiLevel Inheritance sample in Java
Archived Comments
1. /
//BSIT
//
#include<iost
View Tutorial By: Joshua Torres at 2012-10-05 16:59:17
2. It's good but not easily understandable....
View Tutorial By: koshal at 2010-12-19 23:32:05
3. Hello all,
I need the codes for sen
View Tutorial By: Fionna at 2009-07-13 00:34:45
4. Can you Please send me the code for movable clock
View Tutorial By: Rajagopal at 2008-09-29 23:10:57
5. Thanks for the Topic. But there are many more comp
View Tutorial By: Uditha Madumal at 2010-09-15 19:39:13
6. i want to sending sms code in java. send me that c
View Tutorial By: Montu at 2011-06-01 15:15:56
7. You are good work ,an axplane is so gread
View Tutorial By: chetan at 2009-06-08 11:58:51
8. Good Job.
Keep up the good work .
View Tutorial By: Syed Imran at 2010-11-27 06:54:36
9. Hi it is working fine .but when my server we imple
View Tutorial By: mohan at 2014-11-28 10:57:22
10. thanks a lot..please tell me how to implement this
View Tutorial By: agnas at 2008-04-26 12:26:52