I create a PlayerView
programmatically:
PlayerView playerView = new PlayerView(context);
Instead of using SurfaceView
, I want it to use TextureView
. In the documentation, it says to do the following:
<com.google.android.exoplayer2.ui.PlayerView
android:id="@+id/player_view"
app:surface_type="texture_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
However, like I said, I'm creating it programmatically, so how would I set it to use TextureView
in my situation?