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 - Animated activity transition, diagonal slide.

Animated activity transition, diagonal slide.

Quickly share your Android Code Snippets here...

Animated activity transition, diagonal slide.

Postby XCaffeinated » Fri Jan 15, 2010 3:50 am

A user asked how to create a diagonal screen transition at Google Groups/Android-Beginners here. Based on my earlier tutorial I posted some example code there. You can read the whole post there, but the gist is:

From the tutorial, replace mainfadein.xml with diagslide_enter.xml:
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="utf-8"?>
  2.  
  3. <translate xmlns:android="http://schemas.android.com/apk/res/android"
  4.  
  5.  android:fromXDelta="-100%" android:toXDelta="0%"
  6.  
  7.  android:fromYDelta="-100%" android:toYDelta="0%"
  8.  
  9.  android:duration="2000" />
Parsed in 0.001 seconds, using GeSHi 1.0.8.4

and replace splashfadeout.xml with diagslide_leave.xml:
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="utf-8"?>
  2.  
  3. <translate xmlns:android="http://schemas.android.com/apk/res/android"
  4.  
  5.  android:fromXDelta="0%" android:toXDelta="-100%"
  6.  
  7.  android:fromYDelta="0%" android:toYDelta="-100%"
  8.  
  9.  android:duration="2000" />
Parsed in 0.001 seconds, using GeSHi 1.0.8.4

Add diagslide_enter.xml and diagslide_leave.xml to your /res/anim directory, and change the overridePendingTransition() statement to:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. overridePendingTransition(R.anim.diagslide_enter, R.anim.diagslide_leave);
Parsed in 0.012 seconds, using GeSHi 1.0.8.4

You can see more information, and a link to a YouTube video of this transition, in the original link.

Hope this helps!
XCaf
XCaffeinated
Developer
Developer
 
Posts: 25
Joined: Sun Nov 29, 2009 10:16 pm

Top

Return to Code Snippets for Android

Who is online

Users browsing this forum: No registered users and 6 guests