Fix custom theme name EditText gone when IME popup
- Make bottom layout scrollable, let it won't be blocked when IME popup
video: https://drive.google.com/file/d/1o06AlY_fkbi_LpXircmdcF15ZmdHc-rU/view?usp=sharing
Fixes: 158431885
Test: manually
Change-Id: I6ef7a02da46a4e3a33d4f87593360617005ae64a
diff --git a/res/layout/fragment_custom_theme_name.xml b/res/layout/fragment_custom_theme_name.xml
index ab3c459..532e904 100644
--- a/res/layout/fragment_custom_theme_name.xml
+++ b/res/layout/fragment_custom_theme_name.xml
@@ -36,7 +36,7 @@
android:clipToPadding="false"
android:background="@color/fullscreen_preview_background"
app:layout_constrainedHeight="true"
- app:layout_constraintBottom_toTopOf="@+id/component_options_title"
+ app:layout_constraintBottom_toTopOf="@+id/component_scroll_view"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_max="@dimen/preview_pager_max_height"
app:layout_constraintStart_toStartOf="parent"
@@ -47,40 +47,41 @@
<include layout="@layout/theme_preview_card"/>
</FrameLayout>
- <TextView
- android:id="@+id/component_options_title"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginVertical="18dp"
- android:layout_marginHorizontal="16dp"
- android:textAlignment="center"
- android:textAppearance="@style/TitleTextAppearance"
- android:textSize="@dimen/component_options_title_size"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/component_preview_container"
- app:layout_constraintBottom_toTopOf="@+id/edit_text_container"/>
+ <ScrollView
+ android:id="@+id/component_scroll_view"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/component_preview_container"
+ app:layout_constraintBottom_toBottomOf="parent">
- <FrameLayout
- android:id="@+id/edit_text_container"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/component_options_title"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintVertical_bias="1">
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
- <EditText
- android:id="@+id/custom_theme_name"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginVertical="16dp"
- android:layout_marginHorizontal="16dp"
- android:layout_gravity="center|top"
- android:importantForAutofill="no"
- android:minWidth="300dp"
- style="@style/CustomThemeNameEditText"/>
- </FrameLayout>
+ <TextView
+ android:id="@+id/component_options_title"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginVertical="18dp"
+ android:layout_marginHorizontal="16dp"
+ android:textAlignment="center"
+ android:textAppearance="@style/TitleTextAppearance"
+ android:textSize="@dimen/component_options_title_size"/>
+
+ <EditText
+ android:id="@+id/custom_theme_name"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginVertical="16dp"
+ android:layout_marginHorizontal="16dp"
+ android:layout_gravity="center|top"
+ android:importantForAutofill="no"
+ android:minWidth="300dp"
+ style="@style/CustomThemeNameEditText"/>
+ </LinearLayout>
+ </ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>