title: Video not going Fullscreen on Android
body: <p>I want my video activity to go fullscreen when the video starts, but it's not happening. Here are some screenshots and the code that runs this activity.:</p>
  
  <pre><code>public class InfoLentes extends AppCompatActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          this.requestWindowFeature(Window.FEATURE_NO_TITLE);
          this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                  WindowManager.LayoutParams.FLAG_FULLSCREEN);
  
          setContentView(R.layout.infolentes);
      }
  
      public void sendMessage(View view) {
  
         setContentView(R.layout.fullscreen);
          VideoView VideoView = new VideoView(this);
          getWindow().setFlags(
                  WindowManager.LayoutParams.FLAG_FULLSCREEN,
                  WindowManager.LayoutParams.FLAG_FULLSCREEN);
          VideoView.setMediaController(new MediaController(this));
          Uri video = Uri.parse("android.resource://" + getPackageName() + "/"
                  + R.raw.eyeprotect);
          VideoView.setVideoURI(video);
          setContentView(VideoView);
          VideoView.start();
  
      }
  
  }
  </code></pre>
  
  <p>And this is my fullscreem.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
               android:layout_width="match_parent"
               android:layout_height="match_parent"&gt;
  
      &lt;VideoView
          android:id="@+id/VideoViewfull"
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
      &lt;/VideoView&gt;
  
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p>And Screenshots of whats happening.:</p>
  
  <p><a href="https://i.stack.imgur.com/ELb2c.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ELb2c.jpg" alt="enter image description here"></a></p>
  
  <p>What am I doing wrong?</p>
  
  <p>EDIT:</p>
  
  <p>So Using @Sheetal Kumar Maurya answer, I created another activity and used the android:theme="@style/AppTheme.NoActionBar" on the manifest, the result is better, but still not really fullscreen.:</p>
  
  <p><a href="https://i.stack.imgur.com/iazuJ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iazuJ.jpg" alt="enter image description here"></a></p>