This the custom VideoView that you need to have it in your package.

Custom VideoView Layout:

<your.packagename.VideoView
    android:id="@+id/video_view"
    android:layout_width="300dp"
    android:layout_height="300dp" />

Code for custom Optimized VideoView: