I want to make a layout that lets me scroll down using constraint layout, but I dont know how to go about it. should the scrollview be the parent of the constraintlayout like this?
<?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"
android:fillViewport="true">
<android.support.constraint.ConstraintLayout
android:id="@+id/Constraint"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.constraint.ConstraintLayout>
Or the other way around? maybe someone can point me to a good tutorial on this or give an example, I cant seem to find one.
Also I dont know if this is a bug or some configuration that I dont have set up but I've seen images like this one where there are some components outside the blueprint "blue rectangle" yet they are visible, while on my side if I place a component on the "white space" I cant see it or move it anywhere,and it appears on the component tree.
UPDATE
I found a way to make the constraint layout scrollable in the design tool, using a horiontal guideline to push down the constraint layout border and extend it beyond the device, after that you can use the guide line as the new bottom of the constraint layout to anchor the components.
you need surrounded my constraint-layout with a ScrollView tag and gave it the property android:isScrollContainer="true".
For completing the previous answers I am adding the following example, which also takes into account the use of the AppBar. With this code, the Android Studio design editor seems to work fine with the ConstraintLayout.