now i found a matter in my device,but the emulation is ok. that is, when i use the movieview in camera to play video ,but when i come back to another activity in my app. the orientation of the screen is also transverse. who know why?
On Sat, Apr 25, 2009 at 4:32 PM, Nithin Varamballi <nithi...@gmail.com>wrote: > > Try this code... This code woks for me...... > > package mypack.mydemos; > > import android.app.Activity; > import android.graphics.PixelFormat; > import android.os.Bundle; > import android.widget.MediaController; > import android.widget.VideoView; > > public class demo extends Activity { > /** Called when the activity is first created. */ > private VideoView myVideo,myVideo1; > private MediaController mc,mc1; > @Override > public void onCreate(Bundle savedInstanceState) { > super.onCreate(savedInstanceState); > setContentView(R.layout.main); > getWindow().setFormat(PixelFormat.TRANSLUCENT); > setContentView(R.layout.main); > > myVideo1=(VideoView)findViewById(R.id.video); > myVideo1.setVideoPath("/sdcard/nithin.mp4"); > myVideo1.start(); > mc1=new MediaController(this); > mc1.setMediaPlayer(myVideo1); > myVideo1.setMediaController(mc1); > //mc.show(RESULT_OK); > myVideo1.requestFocus(); > } > } > > Thsnk You > Nithin N V > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---