rotate application according orientation

by Jean-FrančŽ½ois Vidal » Thu, 14 Oct 2010 01:35:44 GMT

Sponsored Links
 Hi all,

I am modifying an application to rotate according orientation (like
Ipad) and I am not satisfied with the result.

To apply the rotation I use Animation and Animation.AnimationListener.
My Animation class is a modification of Sample API Rotate3dAnimation
and I have no problem with it. I have two problems :

1)I configure android:screenOrientation="sensor" in AndroidManifest. I
tested calling animation in "public void
onConfigurationChanged(Configuration newConfig)" and
"OrientationEventListener::public void onOrientationChanged (int
orientation)", i both case the orientation occur too late. Android
system already redraw the screen when animation start, the status bar
changed and coordinate for my rotation point are no more correct.

2)My application display text and video with homemade method. I render
video inside SurfaceView that is never animated but switch from
portrait to landscape while Textview is correctly rotate animated. I
tried to replace SurfaceView by ImageView with videoshot before
rotation and restore SurfaceView after, I get image rotation animation
but the switch from Video to Image is not smooth enough (and make my
application unstable :( ).

I have the following questions ?

Is there any existing Android application with rotation animation
according orientation (like Ipad) ?
Is there anyway to play rotation animation before the system redraw
for new orientation ?
Is it possible to rotate a SurfaceView?

I recognize this is not essential for me but I develop application for
a public attracted by eyes candies, animated rotation is almost
mandatory for my application.



Other Threads

1. What does the "Home" button do?

I'm running into a problem that when I press Home in say the settings
page of my app, it finishes OK but the next time I start it's back in
settings. I'd really prefer it to start at the beginning!
It looks from the trace that the calling activity is not itself
returned to and stopped

2. security enforcemen

Hi all,

I am trying to understand security enforcement in Android.

I don't really understand how it works. When one component tries to
access another one, which part in Android will check the permission?
How is permission checking procedure?

As I read from "Understanding Android security" (PennState Unv), there
are 2 enforcement mechanisms: system level and ICC level. However,
that document doesn't really talk about system level (or I miss it).
Can anyone explain me more about both mechanisms?

Thanks in advance,


3. Problem with Wi-Fi connectivity with Android 1.6

4. App name/icon problems on Hero after reboot

5. is there a way to get the "carrier"

6. Tripit Oauth

7. Android SDK loads every time i open Eclipse