You can also set the screenOrientation to be as "landscape" in your Android Manifest file for the Activity which has the video player.
Eg:- <activity android:name=".videoplayer" android:label="@string/app_name" android:screenOrientation="landscape"></activity> Thanks, Prajakta On Mon, Apr 26, 2010 at 10:13 AM, Felipe Silveira <webfel...@gmail.com>wrote: > Hi Abhi, > > You need to do 2 things: > > 1) Add android:configChanges="orientation" to the activity declaration on > your manifest file. Something like this: > <activity android:name="activity" > ... > android:configChanges="orientation"> > > 2) Override method onConfigurationChanged() in your activity. To learn > more: > http://developer.android.com/reference/android/app/Activity.html#onConfigurationChanged(android.content.res.Configuration) > > > Felipe Silveira > felipesilveira.com.br > > On Mon, Apr 26, 2010 at 12:31 PM, Abhi <abhishek.r.sha...@gmail.com>wrote: > >> hello >> >> I am workin on a video player app in which I want only the landscape >> orientation active coz right now when the user tilts the phone during >> video runtime, it restarts playback in that orientation. >> >> How can I easily avoid this? >> >> Thanks, >> >> Abhi >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to android-developers@googlegroups.com >> To unsubscribe from this group, send email to >> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en > > > > > -- > Felipe Silveira > http://www.felipesilveira.com.br > ------------------------------------------------- > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en