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 <[email protected]>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 <[email protected]>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 [email protected] >> To unsubscribe from this group, send email to >> [email protected]<android-developers%[email protected]> >> 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 [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

