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 - How to do this animation in xml

How to do this animation in xml

Put your problem here if it does not fit any of the other categories.

How to do this animation in xml

Postby MrSnowflake » Sun Oct 19, 2008 3:09 pm

I have this animation, I wish to do in xml. But it seems to me it's not possible, so I hope I'm mistaking and someone can help me with it.
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. //Out animation
  3.  
  4. Animation anim = new TranslateAnimation(TranslateAnimation.RELATIVE_TO_PARENT, 0.0f,
  5.  
  6.                         TranslateAnimation.RELATIVE_TO_PARENT, 1.0f, TranslateAnimation.RELATIVE_TO_PARENT, 0.0f,
  7.  
  8.                         TranslateAnimation.RELATIVE_TO_PARENT, 0.0f);
  9.  
  10. anim.setDuration(2000);
  11.  
  12.  
  13.  
  14. //In animation
  15.  
  16. anim = new TranslateAnimation(TranslateAnimation.RELATIVE_TO_PARENT, -1.0f,
  17.  
  18.                         TranslateAnimation.RELATIVE_TO_PARENT, 0.0f, TranslateAnimation.RELATIVE_TO_PARENT, 0.0f,
  19.  
  20.                         TranslateAnimation.RELATIVE_TO_PARENT, 0.0f);
  21.  
  22. anim.setDuration(2000);
  23.  
  24.  
Parsed in 0.011 seconds, using GeSHi 1.0.8.4
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Top

Postby MrSnowflake » Sun Oct 19, 2008 11:34 pm

I've found it:
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <translate xmlns:android="http://schemas.android.com/apk/res/android"
  3.  
  4.         android:fromXDelta="-100%p"
  5.  
  6.         android:toXDelta="0%p"
  7.  
  8.         android:duration="400"/>
  9.  
  10.  
Parsed in 0.000 seconds, using GeSHi 1.0.8.4

The p after fromXDelta="-100%p" tells us it's relative to parent, it only works with % though.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 10 guests