Reputation: 31
So this is a bit difficult to describe please bear with me.
I have a fragment with a ScrollView and a ConstraintLayout inside. The idea is that the fragment should be filled with a survey so there are a lot of textviews and checkboxes.
The scrollview is working but as I said I can't add any new content since I run out of space.
After adding some content but not nearly enough I reached the "end" of my editor. Here is a screenshot:
I can't add anything else since my designer is full. The last checkbox in the image is an example of my situation, it can't be added since it's below the green line.
Here is the code of the xml file:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="visible"
tools:context=".ui.gallery.GalleryFragment"
tools:layout_editor_absoluteY="1dp"
>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
I've edited the xml file and cut the whole textviews and checkboxes since it would be quite large.
I know this question is most likely convoluted and not pleasant to read. I'm sorry about that. This is all quite new to me.
Upvotes: 0
Views: 36
Reputation: 680
which approach are you using to add TextViews inside your ConstraintLayout, is it at the runting using the programmatic way or is it in the design mode ? (xml editor or the UI editor) ?
If it's in the design mode (xml editor or UI editor) you just need to properly specify the constraints for all ConstraintLayout children
Upvotes: 1