Some initial concerns were voiced by designers about whether we’d really have the ability to begin to see the XML, but any concerns were short-resided when you begin having fun with it since the visual editor props up established pattern of bottom tabs which enable switching between Text (XML) and style (visual editor) sights. Having said that, the ConstraintLayout XML is very voluminous and never the simplest to know consequently.
Getting talked about ConstraintLayout with numerous android developer Malaysia designers at IO there is an over-all feeling that ConstraintLayout was overall a great factor, but many people were indicating concerns about whether ConstraintLayout would play nicely with CoordinatorLayout and when animating ConstraintLayout could be tricky. These two concerns are without foundation:
The very first factor worth observing about ConstraintLayout is the fact that (although we don’t yet possess the sources for ConstraintLayout, you can observe a decompilation should you expand classes.jar within the constraint-layout-1..-alpha2 exterior library in android developer Malaysia Project view) it stretches ViewGroup. That’s quite important because so all the classical designs which play very well with CoordinatorLayout. In addition, should you really produce a new Fundamental Activity while using New Android Activity wizard (Right click moduleNew…ActivityFundamental Activity) then your wizard will instantly make your ConstraintLayout for that primary content in the CoordinatorLayout and you may assign behaviours towards the ConstraintLayout exactly as possible along with other designs.
What exactly about animating ConstraintLayout? Once more it’s just a ViewGroup therefore it (and it is children) could be animated in much the same way just like any other ViewGroup. If the doesn’t immediately answer the issue for you personally, then let’s take a step back to designs 101 and recap about how designs and Sights really work. A layout is only a ViewGroup which accounts for positioning its child Sights. Before we are able to draw design and it is children we first have to operate a layout pass to calculate and hang the positions and dimensions from the child Sights. This typically will contain a preliminary measurement pass to look for the intrinsic dimensions from the child Sights, after which calculate the positioning and size each child before setting the mLeft, mTop, mRight, and mBottom values for every child in accordance with parents.