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. Hello friends ,
I have downloaded all 5 fil
View Tutorial By: pinnacle at 2013-06-08 13:08:55
2. How to send to multiple mobiles at a time
View Tutorial By: rakesh at 2010-04-30 10:33:51
3. This says nothing meaningful.
So ho
View Tutorial By: Andreas at 2012-09-23 23:01:01
4. Hi
Where puts this code in ror app
View Tutorial By: martin at 2013-01-31 08:51:12
5. I am using MacOSX 10.5.4 and only enabling the mod
View Tutorial By: Sachin at 2011-03-26 00:23:05
6. Hi,
My problem is that how to connect the r
View Tutorial By: Twahie at 2011-03-21 05:31:06
7. thank you man.
View Tutorial By: Hariharan at 2012-08-03 01:39:16
8. I'm trying to follow this backward, but I can't fi
View Tutorial By: DMM at 2014-03-14 21:42:06
9. dear sir, plz answer my following questions:
View Tutorial By: hawa at 2012-01-29 08:29:39
10. Thanks!! This example was very helpful for me...
View Tutorial By: Jonathas at 2010-03-11 07:47:51