diff --git a/AnkiDroid/src/main/res/layout/template_previewer.xml b/AnkiDroid/src/main/res/layout/template_previewer.xml
index 2d7ca98251b2..a65d1cda55cc 100644
--- a/AnkiDroid/src/main/res/layout/template_previewer.xml
+++ b/AnkiDroid/src/main/res/layout/template_previewer.xml
@@ -1,18 +1,18 @@
-
+ android:layout_height="match_parent"
+ android:orientation="vertical">
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/AnkiDroid/src/main/res/layout/template_previewer_container.xml b/AnkiDroid/src/main/res/layout/template_previewer_container.xml
index d05c79c51059..43bf12c6a5f6 100644
--- a/AnkiDroid/src/main/res/layout/template_previewer_container.xml
+++ b/AnkiDroid/src/main/res/layout/template_previewer_container.xml
@@ -9,21 +9,20 @@
android:background="?attr/alternativeBackgroundColor"
tools:context=".previewer.TemplatePreviewerPage">
-
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+ android:layout_height="wrap_content">
@@ -45,8 +44,7 @@
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/appbar"
- app:layout_constraintBottom_toBottomOf="parent" />
-
+ android:layout_weight="1"/>
+
\ No newline at end of file