In the ConstraintLayout
we have new type of param creator
: layout_constraintTop_creator
or layout_constraintRight_creator
How it should be used?
A ConstraintLayout is a ViewGroup which allows you to position and size widgets in a flexible way. Note: ConstraintLayout is available as a support library that you can use on Android systems starting with API level 9 (Gingerbread). As such, we are planning on enriching its API and capabilities over time.
You can create linear layouts now with ConstraintLayout by constraining the sides of each element with each other. The quick way of creating these layouts is to select all the views together and right click to center horizontally or vertically.
You can use a ConstraintLayout in an other ConstraintLayout but you need to respect some rules. All direct childs of a ConstraintLayout should have constraint on left,top, right and bottom.
As the namespace implies (tools:layout_constraintTop_creator
), it's purely used by Android Studio -- those attributes (using the namespace tool
) are actually stripped out when the xml file is pushed on a device.
So it shouldn't be used :)
Now if you want to know how Studio use those, it's actually simple: we use the creator attributes to keep track of who created the constraints, particularly if they are created by the inference engine, as we want to scrap them / replace them in some cases.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With