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
Subscribe to Tutorials
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. I've been learning C++/C for the past year or so,
View Tutorial By: William Semple at 2013-01-05 17:53:30
2. Hi Rajesh, you have found the right site. look at
View Tutorial By: mohan at 2008-07-27 08:55:17
3. I am getting
jayana-desktop/127.0.
View Tutorial By: GSA at 2010-11-23 02:36:26
4. Hi every body.. I accomplished the task of sending
View Tutorial By: Ashray P Shetty at 2010-11-18 06:25:54
5. hi ,
this is prakash and i want to know how
View Tutorial By: prakash at 2010-05-24 07:27:46
6. I used a txt file and stored it under my drawable
View Tutorial By: Sara at 2014-09-18 16:33:30
7. i want very simple & easy notes on php which u
View Tutorial By: deepa at 2011-07-12 09:04:30
8. you example does not run it errors can you pls fix
View Tutorial By: dionesia at 2009-08-24 05:27:37
9. pls give me code for exact communication between
View Tutorial By: SIRAJ at 2009-02-19 06:24:10
10. a very good explanation
View Tutorial By: ramakrishna at 2012-12-20 04:06:12