Fixed unable to scroll on the small screen

This commit is contained in:
Super12138 2024-01-24 14:55:29 +08:00
parent e28f918949
commit 435b2fce27
2 changed files with 58 additions and 48 deletions

View file

@ -1,24 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingStart="25dp"
android:paddingTop="5dp"
android:paddingEnd="25dp">
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/backup_tips" />
<TextView
android:id="@+id/json_output"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:fontFamily="monospace"
android:textColor="?android:attr/textColorPrimary"
android:textIsSelectable="true" />
</LinearLayout>
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingStart="25dp"
android:paddingTop="5dp"
android:paddingEnd="25dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/backup_tips" />
<TextView
android:id="@+id/json_output"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:fontFamily="monospace"
android:textColor="?android:attr/textColorPrimary"
android:textIsSelectable="true" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>

View file

@ -1,39 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingStart="25dp"
android:paddingTop="5dp"
android:paddingEnd="25dp">
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/restore_tips" />
<CheckBox
android:id="@+id/overwrite_data"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/overwrite_data" />
android:orientation="vertical"
android:paddingStart="25dp"
android:paddingTop="5dp"
android:paddingEnd="25dp">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/json_input"
style="?attr/textInputFilledStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/paste_data"
app:endIconMode="clear_text"
app:errorEnabled="true"
app:helperText=" "
app:helperTextEnabled="true">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/restore_tips" />
<com.google.android.material.textfield.TextInputEditText
<CheckBox
android:id="@+id/overwrite_data"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true" />
android:text="@string/overwrite_data" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/json_input"
style="?attr/textInputFilledStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/paste_data"
app:endIconMode="clear_text"
app:errorEnabled="true"
app:helperText=" "
app:helperTextEnabled="true">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>