Diagonal Screen transition.

by satish bhoyar » Thu, 14 Jan 2010 01:21:51 GMT


Sponsored Links
 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,



Diagonal Screen transition.

by satish bhoyar » Thu, 14 Jan 2010 19:39:53 GMT


 Hi Guys,

I was hoping any kind of help regarding this...

please help regarding this..

Thanks
satish




>


Sponsored Links


Diagonal Screen transition.

by Sean Hodges » Thu, 14 Jan 2010 19:51:39 GMT


 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.




>



Diagonal Screen transition.

by Justin Anderson » Thu, 14 Jan 2010 21:57:30 GMT


 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...




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>


>



Diagonal Screen transition.

by Sean Hodges » Thu, 14 Jan 2010 22:14:32 GMT


 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




>>



Diagonal Screen transition.

by XCaffeinated » Fri, 15 Jan 2010 09:19:27 GMT


 i 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:55am, satish bhoyar <getsatonl...@gmail.com



Diagonal Screen transition.

by satish bhoyar » Fri, 15 Jan 2010 13:01:17 GMT


 hanks a lot guys..
I will try this out..

Thanks,
satish

On Fri, Jan 15, 2010 at 6:49 AM, XCaffeinated <ssatn...@gmail.com> wrote:

>



Other Threads

1. Unknown RPC while calling my ASE method in Python Script

HI,
I facing difficulty in adding a contact in the contact book. The exact
code that i gave in the python script is

1)
import android
import time

receiver = android.Android("2")
# Adding contacts to the Emulator
receiver.addContact("Shyam","5554")

       Here only the number is getting added but NOT the name.

2) And the second Query is i have created a method named
addNewContact() in ContactsFacade.java.
    When i try to invoke that method, i getting "Unknown RPC" while
calling this method in Python Script.

Please guide me with the solution for the above two problems.

-- 

2. Validating PBAP server profile

Hi All,
I am trying to validate PBAP server profile on my dev board, i am
using PTS tool to validate.
I am using  Android clair  version. Actually  for PTS tool i am able
to search PBAP service ; "sdp tool browse local" also give PBAP
service record. But i am not able to connect to PBAP server ; OBEX
connection is getting error.
1) Is there any thing i have to add while compiling to support PBAP
service
2) How can i check whether PBAP server is running or not; in process
list i am able to see Bluetooth service

Please help me in enabling PBAP server for clair.

Thanks
Vikram

-- 

3. Maybe a bug In LauncherModel.java function bindWorkspace()

4. Orientation sensor battery usage

5. Ubale to add artist to media provider

6. Raw file system access.

7. Android/Java Developers Wanted - Portland, OR