title: Android videoview fullscreen
body: <p>i working videoview. i wrote code witch can play video from url with asynctask.at the moment everythink is ok but i have  another problem.when i run my app videoview is not full screen.</p>
  
  <p>[i have like this resulit <a href="http://postimg.org/image/kwc43ftu1/" rel="nofollow">1</a></p>
  
  <p>this is a my source</p>
  
  <pre><code>public class Layout1 extends Fragment  {
  
  
  
  
  VideoView video;
  MediaController media;
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
  
  }
  
  @SuppressWarnings("deprecation")
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
          Bundle savedInstanceState) {
  
  
      View view = inflater.inflate(R.layout.fragment_layout1, null);
  
  
      video = (VideoView) view.findViewById(R.id.video_view);
  
  
      new BackgroundAsyncTask()
      .execute(Global.yutubeDownloadUrl);
  
  
  
  
  
  
  
  
  
  
  
      return view;
  }
  
  public class BackgroundAsyncTask extends AsyncTask&lt;String, Uri, Void&gt; {
      Integer track = 0;
      ProgressDialog dialog;
  
      protected void onPreExecute() {
          dialog = new ProgressDialog(getActivity());
          dialog.setMessage("Loading, Please Wait...");
          dialog.setCancelable(true);
          dialog.show();
      }
  
      protected void onProgressUpdate(final Uri... uri) {
  
          try {
  
              media=new MediaController(getActivity());
              video.setMediaController(media);
              media.setVisibility(View.GONE);
              media.setPrevNextListeners(new View.OnClickListener() {
                  @Override
                  public void onClick(View v) {
                      // next button clicked
  
                  }
              }, new View.OnClickListener() {
                  @Override
                  public void onClick(View v) {
  
  
                  }
              });
              media.show();
  
              video.setVideoURI(uri[0]);
              video.requestFocus();
              video.setOnPreparedListener(new OnPreparedListener() {
  
                  public void onPrepared(MediaPlayer arg0) {
                      video.start();
                      dialog.dismiss();
                  }
              });
  
  
          } catch (IllegalArgumentException e) {
              e.printStackTrace();
          } catch (IllegalStateException e) {
              e.printStackTrace();
          } catch (SecurityException e) {
  
              e.printStackTrace();
          }
  
  
      }
  
      @Override
      protected Void doInBackground(String... params) {
          try {
              Uri uri = Uri.parse(params[0]);
  
              publishProgress(uri);
          } catch (Exception e) {
              e.printStackTrace();
  
          }
  
          return null;
      }
  
  
  }
  </code></pre>
  
  <p>and xml code</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent" &gt;
  
  &lt;VideoView
      android:id="@+id/video_view"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>what am i doing wrong? if anyone knows solution please help me</p>