0
480x360
mp4 비디오가 전체 화면 VideoView 내에 중첩되어 있습니다. 내가 원하는 것은 더 높은 해상도의 물리적 장치에서 전체 화면으로 재생하는 것입니다. 비디오를 장치 화면의 크기로 늘려 비디오가 왜곡 되어도 상관 없어요. 난 그냥 그걸 원해. 전체 화면.전체 화면 모드에서 고해상도 장치로 작은 해상도의 비디오 재생
내 자바 코드는 이것이다 :
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
VideoView vv = (VideoView) findViewById(R.id.videoView);
vv.setOnPreparedListener(new OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mp) {
mp.setLooping(true);
}
});
Uri url=Uri.parse("android.resource://" + getPackageName() +"/"+ R.raw.bubblessd);
vv.setVideoURI(url);
vv.start();
vv.requestFocus();
}
}
그리고 내 활동 XML은 이것이다 : 당신이 VideoView를 지켜 보면서을 사용하는 경우
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
tools:context=".MainActivity" >
<VideoView
android:id="@+id/videoView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"/>
</RelativeLayout>
귀하의 질문은 무엇입니까? – njzk2
가능한 중복 [VideoView 전체 화면 안드로이드 응용 프로그램] (http://stackoverflow.com/questions/11310764/videoview-full-screen-in-android-application) – njzk2