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
This commit is contained in:
parent
b68fda0322
commit
bfc60e1694
@ -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"/>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user