[android-beginners] Re: Diagonal Screen transition.
Hi Guys, I was hoping any kind of help regarding this... please help regarding this.. Thanks satish On Fri, Jan 8, 2010 at 6:25 PM, satish bhoyar getsatonl...@gmail.comwrote: Hi, I am trying to do the diagonal screen transition, i am not able to figure out what I should use. In my case the user should get the feel that next screen is coming from one corner of the current screen . Thanks, -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] Re: Diagonal Screen transition.
As far as I'm aware, there are no diagonal screen transitions in Android. You also can't define them per app, the activity transitions are defined by the system theme. On Thu, Jan 14, 2010 at 11:39 AM, satish bhoyar getsatonl...@gmail.com wrote: Hi Guys, I was hoping any kind of help regarding this... please help regarding this.. Thanks satish On Fri, Jan 8, 2010 at 6:25 PM, satish bhoyar getsatonl...@gmail.com wrote: Hi, I am trying to do the diagonal screen transition, i am not able to figure out what I should use. In my case the user should get the feel that next screen is coming from one corner of the current screen . Thanks, -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] Re: Diagonal Screen transition.
You might be able to define it as a layout animation, but I have never tried this... So, let's say your main activity has a LinearLayout that encompasses everything else. You should be able to specify animations for that Layout for when it comes on and off the screen. Take a look at the Dev Guide where it talks about animations... On Jan 14, 2010 4:51 AM, Sean Hodges seanhodge...@googlemail.com wrote: As far as I'm aware, there are no diagonal screen transitions in Android. You also can't define them per app, the activity transitions are defined by the system theme. On Thu, Jan 14, 2010 at 11:39 AM, satish bhoyar getsatonl...@gmail.com wrote: Hi Guys, I wa... -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] Re: Diagonal Screen transition.
My understanding is that animation controllers can be applied to layouts and views, but not whole activities. You might be able to apply a layout animation on the root layout, and perform a transition that appears to take up the whole screen. This could be coupled with a screen shot of the next activity to give the illusion that the transition is taking you to it. However, the effect you would get is a diagonal transition, followed by the built-in system transition (the horizontal swipe effect), which would finally land you at the next activity. So I think the transitions are the responsibility of the base system, and the user-level applications have no control over them. The best you could to is imitate them with an animation, and tell the user to turn off the system one (Settings - Sound Display - Animation); which is not ideal. On Thu, Jan 14, 2010 at 1:57 PM, Justin Anderson janderson@gmail.com wrote: You might be able to define it as a layout animation, but I have never tried this... So, let's say your main activity has a LinearLayout that encompasses everything else. You should be able to specify animations for that Layout for when it comes on and off the screen. Take a look at the Dev Guide where it talks about animations... On Jan 14, 2010 4:51 AM, Sean Hodges seanhodge...@googlemail.com wrote: As far as I'm aware, there are no diagonal screen transitions in Android. You also can't define them per app, the activity transitions are defined by the system theme. On Thu, Jan 14, 2010 at 11:39 AM, satish bhoyar getsatonl...@gmail.com wrote: Hi Guys, I wa... -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Diagonal Screen transition.
Hi Satish, Animation between activities is indeed possible in Android 2.0 and later, using the overridePendingTransition() API, with the caveat as implied by Sean, that the user can override the animations if he so wishes, in his global device settings. This API was specifically added to give developers more control over inter-activity animations (versus view animations which are done intra-activity). I posted a tutorial on exactly how to use overridePendingTransition() at anddev.org: http://www.anddev.org/viewtopic.php?p=32766 Though the tutorial shows a fade transition between two activities, it can easily be changed to do a diagonal transition, as per your OP: In my case the user should get the feel that next screen is coming from one corner of the current screen. Here is how: In the tutorial, replace mainfadein.xml with diagslide_enter.xml: ?xml version=1.0 encoding=utf-8? translate xmlns:android=http://schemas.android.com/apk/res/ android android:fromXDelta=-100% android:toXDelta=0% android:fromYDelta=-100% android:toYDelta=0% android:duration=2000 / and replace splashfadeout.xml with diagslide_leave.xml: ?xml version=1.0 encoding=utf-8? translate xmlns:android=http://schemas.android.com/apk/res/ android android:fromXDelta=0% android:toXDelta=-100% android:fromYDelta=0% android:toYDelta=-100% android:duration=2000 / Add diagslide_enter.xml and diagslide_leave.xml to your /res/anim directory, and change the overridePendingTransition() statement to: overridePendingTransition(R.anim.diagslide_enter, R.anim.diagslide_leave); This will give the feel of the next screen coming from one corner, while the previous screen leaves from the other corner. Here's a YouTube video (forgive the quality, the emulator runs horribly slowly on my system, but it looks terrific on the Droid): http://www.youtube.com/watch?v=vqTbdAg_82c If you'd rather have the next screen come from one corner, while the previous screen stays put, do this: overridePendingTransition(R.anim.diagslide_enter, R.anim.hold); where hold.xml is a placeholder to keep the old activity from disappearing too soon: ?xml version=1.0 encoding=utf-8? translate xmlns:android=http://schemas.android.com/apk/res/ android android:fromXDelta=0 android:toXDelta=0 android:duration=2000 / If you'd rather have the next screen come from one corner over an empty background, do this: overridePendingTransition(R.anim.diagslide_enter, 0); Once you get it working you should probably consider shortening the durations, 2 seconds is kind of long. Great info on other animation attributes is here: http://developer.android.com/intl/zh-CN/guide/topics/resources/available-resources.html#animation There are examples in the SDK (search *.java in the 2.X platforms for overridePendingTransition). I will add some of this info to the anddev tutorial, and post a trackback. Hope this helps! XCaf On Jan 8, 7:55 am, satish bhoyar getsatonl...@gmail.com wrote: Hi, I am trying to do the diagonal screen transition, i am not able to figure out what I should use. In my case the user should get the feel that next screen is coming from one corner of the current screen . Thanks, -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en