diff --git a/demo/src/main/java/com/google/android/exoplayer/demo/TrackSelectionHelper.java b/demo/src/main/java/com/google/android/exoplayer/demo/TrackSelectionHelper.java
index 190873ee4b..c2024d0b8c 100644
--- a/demo/src/main/java/com/google/android/exoplayer/demo/TrackSelectionHelper.java
+++ b/demo/src/main/java/com/google/android/exoplayer/demo/TrackSelectionHelper.java
@@ -98,7 +98,8 @@ import java.util.Locale;
@SuppressLint("InflateParams")
private View buildView(LayoutInflater inflater) {
- ViewGroup root = (ViewGroup) inflater.inflate(R.layout.track_selection_dialog, null);
+ View view = inflater.inflate(R.layout.track_selection_dialog, null);
+ ViewGroup root = (ViewGroup) view.findViewById(R.id.root);
// View for disabling the renderer.
disableView = (CheckedTextView) inflater.inflate(
@@ -150,7 +151,7 @@ import java.util.Locale;
}
updateViews();
- return root;
+ return view;
}
private void updateViews() {
diff --git a/demo/src/main/res/layout/track_selection_dialog.xml b/demo/src/main/res/layout/track_selection_dialog.xml
index 011fff4f71..6239003abd 100644
--- a/demo/src/main/res/layout/track_selection_dialog.xml
+++ b/demo/src/main/res/layout/track_selection_dialog.xml
@@ -13,7 +13,13 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
+ android:layout_height="match_parent">
+
+
+
+