Reputation: 28288
So I have been developing this layout using a ConstraintLayout inside a ScrollView. It works fine, but now I have hit a problem. I have to expand the layout outside the screen. I can scroll in Design mode, but I cannot add anything without it getting stuck to the top. The constraints are for earlier objects, not the current one I'm adding.
I can add constraints in Blueprint mode, but it looks like I cannot scroll the ScrollView in blueprint mode. Is this even possible? Using Android Studio 2.2(release) and constraint-layout:1.0.0-alpha8
I tried doing it like in Design mode, but it doesn't scroll. Any ideas?
Scrolling normally with ConstraintLayout causes the constraints to stay in the same location.
EDIT:
Updated to alpha9
but still does not solve it
EDIT 2:
beta1 does not work either. AS 2.2.2.
EDIT 3:
Sample layout:
<Button
android:text="Button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/sampleButton"
/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:ignore="HardcodedText">
<android.support.constraint.ConstraintLayout
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- ETC constraints -->
</android.support.constraint.ConstraintLayout>
</ScrollView>
Upvotes: 12
Views: 8276
Reputation: 28288
As of ConstraintLayout 1.0.1 scrolling scrolls the constraints. Meaning it is possible to scroll a ConstraintLayout in blueprint mode and it functions as expected. It works at Android Studio 2.3.2 and up (I haven't older versions).
Now when scrolling, both the visible view, the border, and constraints move along with the drawn button.
Upvotes: 1
Reputation: 587
Put the Scroll view outside of the Constraint layout. Then use this [Red mark] to drag the view and it will make a custom device editor to you. When you have done, change back to the device editor [Beside rotation icon]...
Upvotes: 2
Reputation: 8449
Not yet.
Maybe try to have a separate file to edit the content instead, and use an include in the file where you have the ScrollView?
Upvotes: 1
Reputation: 3158
In latest android studio 2.2.2 version with constraint-layout:1.0.0-beta1
you can scroll blueprint
for better working, after updating constraint-layout
please restart android studio (invalidate caches)
Upvotes: 1
Reputation: 7935
beta1
version has been released. I doubt this is fixed, but check it out.
You can ask for a bugfix for this here: http://tools.android.com/feedback
PS: you are trying to scroll using the mouse scroll wheel, right? hehe just checking... I say that because just recently I figured out I could scroll in the design mode using the mouse wheel.. duhh haha. I never tried in blueprint mode though.
Upvotes: 0
Reputation: 591
In android studio 2.2 update, it includes scrolling in design and blueprint mode by default. click on design mode in the preview pane and try to scroll your screen it will start scrolling. There is another option of blueprint in that mode it shows you the blueprint of the design and by doing same for this will help you scroll in blueprint mode also.
Upvotes: 3