Commit bfc60e16 by olly Committed by Andrew Lewis

Set vertical orientation by default in TrackSelectionView

Horizontal orientation doesn't make sense. I thought about
overriding the setter to throw something, but it's probably
not worth the extra lines.

PiperOrigin-RevId: 234632530
parent b68fda03
......@@ -16,9 +16,10 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.exoplayer2.ui.TrackSelectionView
android:id="@+id/download_dialog_track_selection_view"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</ScrollView>
......@@ -87,6 +87,8 @@ public class TrackSelectionView extends LinearLayout {
public TrackSelectionView(
Context context, @Nullable AttributeSet attrs, @AttrRes int defStyleAttr) {
super(context, attrs, defStyleAttr);
setOrientation(LinearLayout.VERTICAL);
overrides = new SparseArray<>();
// Don't save view hierarchy as it needs to be reinitialized with a call to init.
......
......@@ -18,7 +18,6 @@
android:layout_height="match_parent">
<com.google.android.exoplayer2.ui.TrackSelectionView android:id="@+id/exo_track_selection_view"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment