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?
Step 1: Create an XML file:
Step 2: Create an AttributeSet
Step 3: Pass that into the constructor
I'd like to note that this is stupid, you shouldn't have to do this, I hate that I had to, and I hate Exoplayer sometimes... (most times)