Reputation: 83
I am creating individual test activities in android studios as i need them (before combining these tests into my project at a later date) so I have to periodically add more buttons to start new activities as they are added. I have only found a long workaround of removing constraints and creating a new chain and resetting the constraints for each item (a tedious process as they are constrained to guidelines, so each have to be reset to 0dp each time)
Despite my experimenting with the IDE over the last couple months and googling /seacrching stackOverflow, i cannot find a way to simply 'add to existing chain' ie another (button) view to the bottom of a verical chain?
Upvotes: 2
Views: 637
Reputation: 81
I don't know how to do it using design window, but you always can open code window with XML. The idea is that chain automatically generates when you constraining neighboring sides of two views. In the example below chain between two TextViews will appear:
<TextView
android:id="@+id/view_1"
...
app:layout_constraintRight_toLeftOf="@+id/view_2"/>
<TextView
android:id="@+id/view_2"
...
app:layout_constraintLeft_toRightOf="@id/view_1"/>
Upvotes: 2