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 changed need to made to add a font.ttf file ?

Hi ,

What changed need to made to add a font.ttf file ?

SKfontHost.cpp loadfonts() changes not reflecting in system/fonts/

Is their anything else to change ?


2. Casense update 1.1.1

Setelah nyoba hofo 307, 308, myhero 205 tetep ngerasa masih kurang cepet.
Akhirnya nandroid restore ke case 1.1 ditambah update 1.1.1 nnya yg udah nongol 
di threadnya casense.
Update baru ini udah enable swap, jadi saya pake swap 64mb, hasilnya.. gila 
kenceng amat ya hehehe
Ngetik juga nggak ada lag sama sekali, buka tutup email lancar tanpa lag, 
market ada ebuddy nya.

== android mail ==
Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to

To request to subscribe to this group:


3. How to begin with android

4. Override Dock Launcher

5. Uncaught RuntimeExceptions in Services fail silently

6. how to run android market on emulator

7. baby monitor paling mahal :-)