Skip to content

Commit ba35717

Browse files
committed
Encapsulate MainActivity layout in ScrollView
Encapsulate MainActivity layout in a ScrollView to prevent overlapping UI elements on small screens. This fix is based on Biswa96's PR #133 and Rahula-12's (unmerged) PRs #249 and #253. Closes: #238
1 parent d89c8f6 commit ba35717

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

app/src/main/res/layout/activity_main.xml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?><!--
2-
~ SMS Import / Export: a simple Android app for importing and exporting SMS messages from and to JSON files.
3-
~ Copyright (c) 2021-2022 Thomas More
2+
~ SMS Import / Export: a simple Android app for importing and exporting SMS and MMS messages,
3+
~ call logs, and contacts, from and to JSON / NDJSON files.
4+
~
5+
~ Copyright (c) 2021-2025 Thomas More
6+
~ Copyright (c) 2022 Bindu
47
~
58
~ This file is part of SMS Import / Export.
69
~
@@ -18,14 +21,20 @@
1821
~ along with SMS Import / Export. If not, see <https://www.gnu.org/licenses/>.
1922
-->
2023

21-
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
24+
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
2225
xmlns:app="http://schemas.android.com/apk/res-auto"
2326
xmlns:tools="http://schemas.android.com/tools"
24-
android:fitsSystemWindows="true"
2527
android:layout_width="match_parent"
2628
android:layout_height="match_parent"
29+
android:fillViewport="true"
30+
android:fadeScrollbars="false"
2731
tools:context=".MainActivity">
2832

33+
<androidx.constraintlayout.widget.ConstraintLayout
34+
android:layout_width="match_parent"
35+
android:layout_height="wrap_content"
36+
android:fitsSystemWindows="true">
37+
2938
<androidx.appcompat.widget.Toolbar
3039
android:id="@+id/toolbar"
3140
android:layout_width="0dp"
@@ -171,4 +180,6 @@
171180
app:layout_constraintStart_toStartOf="parent"
172181
app:layout_constraintTop_toBottomOf="@+id/default_sms_app_warning" />
173182

174-
</androidx.constraintlayout.widget.ConstraintLayout>
183+
</androidx.constraintlayout.widget.ConstraintLayout>
184+
185+
</ScrollView>

0 commit comments

Comments
 (0)