안드로이드 비디오 재생에 문제가 있습니다. 서버에서 비디오를 가져 와서 videoview로 설정하고 있지만 비디오는 backgroung에서 재생 중입니다. 해당 비디오를 볼 수 없으므로 시도한 코드를 참조하십시오.안드로이드 비디오 너비 및 높이 설정 방법
XML 파일
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<VideoView
android:id="@+id/eventDetailsPage_videosView"
android:layout_width="160dp"
android:layout_height="100dp"
android:layout_marginBottom="16dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
android:background="@drawable/ic_eventvideo_image" />
</LinearLayout>
자바 클래스
Uri uri=Uri.parse(mEventDetailsUtil1.getAttachmentsUrls().get(0).getAttach_url());
VideoView mVideosView = (VideoView) findViewById(R.id.eventDetailsPage_videosView);
MediaController mc = new MediaController(this);
mc.setAnchorView(mVideosView);
mc.setMediaPlayer(mVideosView);
mVideosView.setMediaController(mc);
mVideosView.setVideoURI(uri);
mVideosView.requestFocus();
mVideosView.start();
비디오입니다 같은 활동을 열 때 재생,하지만 난 원하지 않는 내가 VideoView를 지켜 보면서 클릭하면 내가 열 필요가 필요 비디오 전체 화면.
감사합니다 @Siddharth Vyas 시도해 보겠습니다. – venu
@Ydder 도움이 될만한 http://www.edumobile.org/android/android-beginner-tutorials/how-to-play-a-video-file/ –