2013-03-26 4 views
0

모두. 비디오보기를 전체 화면으로 표시하고 싶습니다. 몇 가지 명령을 사용해 보았지만 제대로 작동하지 않았습니다. 나는 도움이 필요해. 나는 내 코드 밑에 뒀다.전체 화면으로 비디오보기를 표시하지 않습니다.

비디오는 화면의 약 1/3을 계속 보여줍니다! 나는 초보자 다!

Intro.JAVA

  public class Intro extends Activity { 
    public void onCreate(Bundle b) { 
    super.onCreate(b); 
      getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN); 
     requestWindowFeature(Window.FEATURE_NO_TITLE); 
     setContentView(R.layout.intro); 

     VideoView vid = (VideoView) findViewById(R.id.videoView1); 
     String uriPath = "android.resource://com.english/raw/videoenglish"; 
     Uri uri = Uri.parse(uriPath); 
     vid.setVideoURI(uri); 
     vid.start(); 
     vid.requestFocus(); 

     vid.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { 

     public void onCompletion(MediaPlayer mp) { 
      // TODO Auto-generated method stub 
       Intent main = new Intent(Intro.this, IntentsDemoActivity.class); 
        Intro.this.startActivity(main); 
        Intro.this.finish(); 
      } 

      }); 
     } 
     } 

INTRO.XML 비디오의 화면 비율이 일치하지 않기 때문에

<?xml version="1.0" encoding="utf-8"?> 
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:orientation="vertical" > 

    <VideoView 
    android:id="@+id/videoView1" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:layout_alignParentBottom="true" 
    android:layout_alignParentLeft="true" 
    android:layout_alignParentRight="true" 
    android:layout_alignParentTop="true" 
    android:layout_gravity="center" /> 

</LinearLayout> 
+0

아마이 영상의 해상도가있다 : 여기

참조에 대한 몇 가지 다른 질문을 하나 방법? – Kgrover

답변

0

보통, 실제 비디오 화면 많은 시간을 기입하지 않습니다 스크린 자체의 종횡비.

VideoView 자체가 전체 화면을 가득 채우고 있다고 생각합니다. 다른 장치 또는 에뮬레이터로 시도하십시오.

관련 문제