{"id":285171,"date":"2017-04-18T21:00:31","date_gmt":"2017-04-18T17:00:31","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=285171"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=285171","title":{"rendered":"ConstraintLayout. \u044a"},"content":{"rendered":"<p>\u041f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0413\u0430\u0432\u0440\u0438\u0438\u043b, \u044f Android-\u043b\u0438\u0434 Touch Instinct.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043c\u0430\u0440\u0442\u0435 Google \u0432\u044b\u043a\u0430\u0442\u0438\u043b \u0440\u0435\u043b\u0438\u0437\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 ConstraintLayout, \u0442\u0430\u043a \u0447\u0442\u043e \u0438\u043c \u0443\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0432\u0441\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u0430\u0437 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043d \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0438 <a href=\"https:\/\/www.youtube.com\/watch?v=sO9aX87hq9c\">\u043d\u0430 \u043f\u0440\u043e\u0448\u043b\u043e\u043c Google I\/O<\/a>. \u0421 \u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043f\u0440\u043e\u0448\u043b\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u0438 ConstraintLayout \u0441\u0442\u0430\u043b \u043b\u0443\u0447\u0448\u0435, \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0438 \u043e\u0431\u0440\u043e\u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0447\u0435\u043d\u044c \u043a\u0440\u0443\u0442\u043e, \u0447\u0442\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0446\u0435\u043f\u0438 \u2014 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c ConstraintLayout \u0432\u043c\u0435\u0441\u0442\u043e LinearLayout.<\/p>\n<p>  <\/p>\n<p>\u041e \u0432\u0441\u0435\u0445 \u043d\u043e\u0432\u044b\u0445 \u0438 \u0441\u0442\u0430\u0440\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u0445 ConstraintLayout \u044f \u0438 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<p>  <a name=\"habracut\"><\/a>  <\/p>\n<h2 id=\"kak-dobavit-v-proekt\">\u041a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442<\/h2>\n<p>  <\/p>\n<ol>\n<li>\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0432\u0435\u0440\u0441\u0438\u044e Android Studio \u0434\u043e 2.3 (\u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e);<\/li>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0432\u0435\u0440\u0441\u0438\u044f ConstraintLayout \u2014 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 <code>Android Studio \u2014&gt; Settings(Preferences) \u2014&gt; Appearance &amp; Behavior \u2014&gt; System Settings \u2014&gt; Android SDK \u2014&gt; SDK Tools \u2014&gt; Support Repository<\/code>;<\/li>\n<li>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c dependency \u0432 <code>build.gradle<\/code> \u043c\u043e\u0434\u0443\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<br \/> \n<pre><code class=\"java\">dependencies { ... compile 'com.android.support.constraint:constraint-layout:1.0.2' ... }<\/code><\/pre>\n<\/li>\n<li>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c ConstraintLayout \u0443 \u0441\u0435\u0431\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;android.support.constraint.ConstraintLayout     android:id=&quot;@+id\/my_first_constraint_layout&quot;     android:layout_width=&quot;match_parent&quot;     android:layout_height=&quot;match_parent&quot;&gt;      &lt;TextView         android:id=&quot;@+id\/some_constraint_layout_element&quot;         android:layout_width=&quot;wrap_content&quot;         android:layout_height=&quot;wrap_content&quot;         android:text=&quot;Hello world!&quot;\/&gt;  &lt;\/android.support.constraint.ConstraintLayout&gt;<\/code><\/pre>\n<p>  <\/li>\n<\/ol>\n<p>  <\/p>\n<h2 id=\"constraints\">Constraints<\/h2>\n<p>  <\/p>\n<p><strong>Constraints<\/strong> \u2014 \u044d\u0442\u043e \u043b\u0438\u043d\u0438\u0438, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f view \u0432\u043d\u0443\u0442\u0440\u0438 ConstraintLayout. Constraints \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u044b \u043a <strong>\u0441\u0442\u043e\u0440\u043e\u043d\u0430\u043c<\/strong> \u0441\u0430\u043c\u043e\u0433\u043e ConstraintLayout \u0438\u043b\u0438 \u043a <strong>\u0441\u0442\u043e\u0440\u043e\u043d\u0430\u043c<\/strong> \u0434\u0440\u0443\u0433\u0438\u0445 view \u0432\u043d\u0443\u0442\u0440\u0438 ConstraintLayout. Constraints \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0438 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0435.<\/p>\n<p>  <\/p>\n<p>\u0413\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0435 constraints:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u043f\u0440\u0430\u0432\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b (Right), \u043b\u0435\u0432\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b (Left);<\/li>\n<li>\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b (Start), \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b (End).<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 constraints:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b (Top), \u043d\u0438\u0436\u043d\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b (Bottom);<\/li>\n<li>\u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043b\u0438\u043d\u0438\u0438 (Baseline).<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0438 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e, \u0442\u0430\u043a \u0447\u0442\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0441onstraints \u043d\u0435 \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e <strong>Baseline<\/strong> \u2014 \u044d\u0442\u043e \u043b\u0438\u043d\u0438\u044f \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. \u041f\u0440\u0438\u043c\u0435\u0440 \u2014 \u0434\u043b\u044f <code>TextView<\/code> \u044d\u0442\u043e \u043b\u0438\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u043a\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u0442\u0435\u043a\u0441\u0442. \u0415\u0441\u043b\u0438 \u0443 view \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d Baseline \u0441onstraint, \u0442\u043e \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u043b\u0438\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043b\u0438\u043d\u0438\u0438 view, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u0441onstraint.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0441onstraints, \u043a\u0430\u043a \u0441\u0442\u043e\u0440\u043e\u043d\u044b view. \u0422\u043e \u0435\u0441\u0442\u044c \u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c \u043b\u0435\u0432\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443 view <code>B<\/code> \u043a \u043f\u0440\u0430\u0432\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 view <code>A<\/code> \u2014 \u0442\u043e\u0433\u0434\u0430 view <code>B<\/code> \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u0441\u043f\u0440\u0430\u0432\u0430 \u043e\u0442 view <code>A<\/code>. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0434\u0430\u043b\u044c\u0448\u0435 \u044f \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u0431\u0443\u0434\u0443 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c, \u043a\u0430\u043a <code>Left(B)\u2014&gt;right(A)<\/code>. \u0421 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0431\u0443\u043a\u0432\u044b \u0441onstraint, \u0441 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 \u2014 \u0441\u0442\u043e\u0440\u043e\u043d\u044b view.<\/p>\n<p>  <\/p>\n<p>\u041e\u0431\u0449\u0438\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u0441onstraint \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">  app:layout_constraint{X}_to{Y}Of=&quot;{Z}&quot;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0413\u0434\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li><strong>X<\/strong> \u2014 \u0441onstraint \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 view;<\/li>\n<li><strong>Y<\/strong> \u2014 <strong>\u0441\u0442\u043e\u0440\u043e\u043d\u0430<\/strong> view, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f;<\/li>\n<li><strong>Z<\/strong> \u2014 id view, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f, \u0438\u043b\u0438 <code>parent<\/code>, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e \u043a \u0441\u0442\u043e\u0440\u043e\u043d\u0435 ContraintLayout.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0438\u0432\u044f\u0437\u043e\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">    &lt;android.support.constraint.ConstraintLayout         android:layout_width=&quot;match_parent&quot;         android:layout_height=&quot;wrap_content&quot;&gt;          &lt;!-- \u043b\u0435\u0432\u044b\u0439 constraint view_1 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a \u043b\u0435\u0432\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 ConstraintLayout              \u0432\u0435\u0440\u0445\u043d\u0438\u0439 constraint view_1 \u2014 \u043a \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 ConstraintLayout              \u043f\u0440\u0430\u0432\u044b\u0439 \u0438 \u043d\u0438\u0436\u043d\u0438\u0439 constraint \u043d\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u044b \u2014&gt;         &lt;TextView             android:id=&quot;@+id\/view_1&quot;             android:layout_width=&quot;wrap_content&quot;             android:layout_height=&quot;wrap_content&quot;             android:text=&quot;view_1&quot;             android:textSize=&quot;24sp&quot;             app:layout_constraintLeft_toLeftOf=&quot;parent&quot;             app:layout_constraintTop_toTopOf=&quot;parent&quot;\/&gt;          &lt;!-- \u043b\u0435\u0432\u044b\u0439 constraint \u0443 view_2 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a \u043f\u0440\u0430\u0432\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 view_1              constraint \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043b\u0438\u043d\u0438\u0438 view_2 \u2014 \u043a \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043b\u0438\u043d\u0438\u0438 view_1              \u043f\u0440\u0430\u0432\u044b\u0439 constraint \u043d\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u2014&gt;         &lt;TextView             android:id=&quot;@+id\/view_2&quot;             android:layout_width=&quot;wrap_content&quot;             android:layout_height=&quot;wrap_content&quot;             android:text=&quot;view_2&quot;             android:textSize=&quot;14sp&quot;             app:layout_constraintLeft_toRightOf=&quot;@id\/view_1&quot;             app:layout_constraintBaseline_toBaselineOf=&quot;@id\/view_1&quot;\/&gt;          &lt;!-- \u043b\u0435\u0432\u044b\u0439 constraint view_3 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a \u043f\u0440\u0430\u0432\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 view_1              \u0432\u0435\u0440\u0445\u043d\u0438\u0439 constraint view_3 \u2014 \u043a \u043d\u0438\u0436\u043d\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 view_1              \u043f\u0440\u0430\u0432\u044b\u0439 \u0438 \u043d\u0438\u0436\u043d\u0438\u0439 constraint \u043d\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u044b \u2014&gt;         &lt;TextView             android:id=&quot;@+id\/view_3&quot;             android:layout_width=&quot;wrap_content&quot;             android:layout_height=&quot;wrap_content&quot;             android:text=&quot;view_3&quot;             android:textSize=&quot;14sp&quot;             app:layout_constraintTop_toBottomOf=&quot;@id\/view_1&quot;             app:layout_constraintLeft_toRightOf=&quot;@id\/view_1&quot;\/&gt;          &lt;!-- \u043b\u0435\u0432\u044b\u0439 constraint view_4 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a \u043f\u0440\u0430\u0432\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 view_2              \u043d\u0438\u0436\u043d\u0438\u0439 constraint view_4 \u2014 \u043a \u043d\u0438\u0436\u043d\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 view_2              \u043f\u0440\u0430\u0432\u044b\u0439 \u0438 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 constraint \u043d\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u044b \u2014&gt;         &lt;TextView             android:id=&quot;@+id\/view_4&quot;             android:layout_width=&quot;wrap_content&quot;             android:layout_height=&quot;wrap_content&quot;             android:text=&quot;view_4&quot;             android:textSize=&quot;18sp&quot;             app:layout_constraintBottom_toBottomOf=&quot;@id\/view_1&quot;             app:layout_constraintLeft_toRightOf=&quot;@id\/view_2&quot;\/&gt;      &lt;\/android.support.constraint.ConstraintLayout&gt;<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/bb6\/093\/7f0\/bb60937f04504d928c1062832c13c657.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440\"\/><\/p>\n<p>  <\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u0441\u0442\u043e\u0440\u043e\u043d:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e <code>Start \u0438 End<\/code>, <code>Left \u0438 Right<\/code>, <code>Top \u0438 Bottom<\/code>, <code>Baseline<\/code>. \u0422\u043e \u0435\u0441\u0442\u044c, \u043d\u0435\u043b\u044c\u0437\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c Left \u043a Start \u0438\u043b\u0438 Baseline \u043a Top;<\/li>\n<li>\u043f\u0440\u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0435 Start\/End \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 Left\/Right;<\/li>\n<li>\u043f\u0440\u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0435 Baseline \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 Top\/Bottom;<\/li>\n<li>\u043d\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0439\u0442\u0435 view \u0441 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b ConstraintLayout, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>layout_constraintRight_toLeftOf=&quot;parent&quot;<\/code>. ConstraintLayout \u043d\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 view \u0441 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0441\u0442\u043e\u0440\u043e\u043d, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u0440\u0438 \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e.<\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"zadanie-razmerov-view\">\u0417\u0430\u0434\u0430\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 View<\/h2>\n<p>  <\/p>\n<p>\u0412\u044b\u0441\u043e\u0442\u0430 \u0438 \u0448\u0438\u0440\u0438\u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d\u044b, \u043a\u0430\u043a:<\/p>\n<p>  <\/p>\n<ul>\n<li><code>layout_width=&quot;100dp&quot;<\/code> \u2014 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440. \u042d\u043b\u0435\u043c\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430;<\/li>\n<li><code>layout_width=&quot;wrap_content&quot;<\/code> \u2014 any_size, \u0442\u043e \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u043e\u0439 view, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u044e\u0431\u044b\u043c;<\/li>\n<li><code>layout_width=&quot;0dp&quot;<\/code> + <code>layout_constraintWidth_default=&quot;spread&quot;<\/code> \u2014 match_constraint_spread, \u0442\u043e \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 view \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044e \u043c\u0435\u0436\u0434\u0443 constraints;<\/li>\n<li><code>layout_width=&quot;0dp&quot;<\/code> + <code>layout_constraintWidth_default=&quot;wrap&quot;<\/code> \u2014 match_constraint_wrap, \u0442\u043e \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u043e\u0439 view, \u043d\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0439\u0442\u0438 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 constraints.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 <code>layout_constraintWidth_default<\/code> \u0440\u0430\u0432\u043d\u043e <code>spread<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u043d \u0440\u0430\u0437\u043c\u0435\u0440 match_constraint_wrap \u0438\u043b\u0438 match_constraint_spread, \u0441\u0442\u043e\u0438\u0442 \u0443\u0447\u0435\u0441\u0442\u044c, \u0447\u0442\u043e:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0447\u0442\u043e\u0431\u044b \u0442\u0430\u043a\u043e\u0439 \u0442\u0438\u043f \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e, \u0443 view \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u044b \u0434\u0432\u0430 constraint: \u0434\u043b\u044f \u0448\u0438\u0440\u0438\u043d\u044b \u044d\u0442\u043e <code>Left \u0438 Right<\/code> \u0438\u043b\u0438 <code>Start \u0438 End<\/code>. \u0414\u043b\u044f \u0432\u044b\u0441\u043e\u0442\u044b \u2014 <code>Top \u0438 Bottom<\/code>;<\/li>\n<li>\u0440\u0430\u0437\u043c\u0435\u0440 view \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0439\u0442\u0438 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 constraints;<\/li>\n<li>\u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 view \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 constraints. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b <code>layout_constraintWidth_min<\/code>, <code>layout_constraintHeight_min<\/code>, <code>layout_constraintWidth_max<\/code>, <code>layout_constraintHeight_max<\/code>;<\/li>\n<li>\u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0442\u0438\u043f \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0434\u043b\u044f \u0432\u044b\u0441\u043e\u0442\u044b, \u0435\u0441\u043b\u0438 \u0443 view \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d <code>Baseline<\/code> constraint \u2014 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0432\u044b\u0441\u043e\u0442\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0432\u0435\u0440\u043d\u043e.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u0438\u043f\u043e\u0432 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u0441\u0442\u043e\u0438\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 <code>match_parent<\/code> \u0438\u043b\u0438 <code>fill_parent<\/code> \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e. \u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043c\u0435\u0440 view \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u043b \u0441 \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u043c\u0438 ConstraintLayout, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c constraints \u043a \u0441\u0442\u043e\u0440\u043e\u043d\u0430\u043c ConstraintLayot \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 <code>match_constraint_spread<\/code>;<\/li>\n<li>\u0435\u0441\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u043d any_size \u0438\u043b\u0438 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440, \u0442\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u044c \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 constraints. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0437 \u0440\u0430\u0437\u0434\u0435\u043b\u0430 &quot;Constraints&quot;, \u0435\u0441\u043b\u0438 \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 view \u0437\u0430\u0434\u0430\u0442\u044c \u0434\u043b\u0438\u043d\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442, \u0442\u043e \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u044c \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 ConstraintLayout;<\/li>\n<li>\u043d\u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u044b ConstraintLayout \u0432\u043b\u0438\u044f\u044e\u0442 view \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c, any_size \u0438 match_constraint_wrap. \u0415\u0441\u043b\u0438 \u043f\u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0440 ConstraintLayout \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d \u043d\u0435\u0432\u0435\u0440\u043d\u043e, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0432\u0438\u043d\u043e\u0432\u0430\u0442\u0430 \u043e\u0434\u043d\u0430 \u0438\u0437 view \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u043c\u0438;<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/8a6\/a93\/539\/8a6a9353971b4c59befd9de5c3b80e99.png\" alt=\"\u0420\u0430\u0437\u043c\u0435\u0440\u044b\"\/><\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"razmery-na-osnove-sootnosheniya-storon\">\u0420\u0430\u0437\u043c\u0435\u0440\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u0441\u0442\u043e\u0440\u043e\u043d<\/h2>\n<p>  <\/p>\n<p>ConstraintLayout \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u044b\u0441\u043e\u0442\u0443 \u0438\u043b\u0438 \u0448\u0438\u0440\u0438\u043d\u0443 view \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u0441\u0442\u043e\u0440\u043e\u043d. \u0422\u043e \u0435\u0441\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u0441\u0442\u043e\u0440\u043e\u043d <code>16:9<\/code>, \u0435\u0441\u043b\u0438 \u0432\u044b\u0441\u043e\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 <code>900dp<\/code>, \u0442\u043e \u0448\u0438\u0440\u0438\u043d\u0430 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f, \u043a\u0430\u043a <code>1600dp<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0417\u0430 \u044d\u0442\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>layout_constraintDimensionRatio<\/code>. \u0417\u0430\u0434\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u0440\u043e\u043d \u043c\u043e\u0436\u043d\u043e \u0432 \u0434\u0432\u0443\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u0445: \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c <code>16:9<\/code> \u0438\u043b\u0438 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u043c <code>1.8<\/code>. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0435\u0440\u0435\u0434 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u0435 \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>H,16:9<\/code> \u0431\u0443\u0434\u0435\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c, \u0447\u0442\u043e 16 \u2014 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0441\u043e\u043e\u0442\u0432\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u0432\u044b\u0441\u043e\u0442\u0435 (H), \u0430 9 \u2014 \u0448\u0438\u0440\u0438\u043d\u0435 (W).<\/p>\n<p>  <\/p>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 <code>layout_constraintDimensionRatio<\/code> \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0440\u0430\u0441\u0447\u0435\u0442\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 view, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u0430 \u0438\u0437 \u0441\u0442\u043e\u0440\u043e\u043d \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0432 <code>match_constraint_wrap<\/code> \u0438\u043b\u0438 <code>match_constraint_spread<\/code>.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">    &lt;android.support.constraint.ConstraintLayout         android:layout_width=&quot;match_parent&quot;         android:layout_height=&quot;match_parent&quot;&gt;          &lt;!-- \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u0440\u043e\u043d 16:9, \u0432\u0441\u0435 constraints \u0443 view \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u044b \u043a \u0441\u0442\u043e\u0440\u043e\u043d\u0430\u043c ConstraintLayout,              \u0448\u0438\u0440\u0438\u043d\u0430 view \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u0430 \u0448\u0438\u0440\u0438\u043d\u0435 ConstraintLayout, \u0442\u0430\u043a \u043a\u0430\u043a layout_width \u2014 match_constraint_spread              \u0432\u044b\u0441\u043e\u0442\u0430 view \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u043a\u0430\u043a layout_height \u2014 any_size \u2014&gt;         &lt;ImageView             android:layout_width=&quot;0dp&quot;             android:layout_height=&quot;wrap_content&quot;             android:scaleType=&quot;centerCrop&quot;             app:layout_constraintDimensionRatio=&quot;16:9&quot;             app:layout_constraintLeft_toLeftOf=&quot;parent&quot;             app:layout_constraintTop_toTopOf=&quot;parent&quot;             app:layout_constraintRight_toRightOf=&quot;parent&quot;             app:layout_constraintBottom_toBottomOf=&quot;parent&quot;             android:background=&quot;@drawable\/big_widescreen_image&quot;\/&gt;      &lt;\/android.support.constraint.ConstraintLayout&gt;<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"otnositelnoe-raspolozhenie-view-vnutri-constraints\">\u041e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 View \u0432\u043d\u0443\u0442\u0440\u0438 constraints<\/h2>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 view \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c \u0434\u0432\u0430 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0445 constraints, \u0442\u043e \u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0422\u043e \u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e \u0438 \u0434\u043b\u044f \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 constraints.<\/p>\n<p>  <\/p>\n<p>\u0417\u0430 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>layout_constraintHorizontal_bias<\/code>, \u0437\u0430 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u2014 <code>layout_constraintVertical_bias<\/code>. \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043e\u0442 0 \u0434\u043e 1. <\/p>\n<p>  <\/p>\n<p>\u041f\u043e \u0441\u0443\u0442\u0438, \u044d\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u0430\u044f \u0437\u0430\u043c\u0435\u043d\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 <code>layout_gravity<\/code>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f <strong>0<\/strong> \u0431\u0443\u0434\u0435\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <strong>\u043a\u0440\u0430\u0439\u043d\u0435 \u0441\u043b\u0435\u0432\u0430<\/strong>, <strong>0.5<\/strong> \u2014 <strong>\u043f\u043e \u0446\u0435\u043d\u0442\u0440\u0443<\/strong>, <strong>1<\/strong> \u2014 <strong>\u043a\u0440\u0430\u0439\u043d\u0435 \u0441\u043f\u0440\u0430\u0432\u0430<\/strong>. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u2014 <strong>0.5<\/strong>.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong>0.3<\/strong>. \u042d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c, \u0447\u0442\u043e <strong>30%<\/strong> \u043d\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u043e\u0433\u043e view \u043c\u0435\u0441\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0432\u0430 \u043e\u0442 view, \u0430 <strong>70%<\/strong> \u2014 \u0441\u043f\u0440\u0430\u0432\u0430. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0440\u0430\u0437\u043c\u0435\u0440 view \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 constraints, \u0442\u043e <strong>30%<\/strong> \u0432\u044b\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0437\u0430 constraints \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0432\u0430 \u043e\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439, \u0430 <strong>70%<\/strong> \u2014 \u0441\u043f\u0440\u0430\u0432\u0430.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/e7f\/02d\/b46\/e7f02db462f54b539e083321d627781d.png\" alt=\"\u041e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435\"\/><\/p>\n<p>  <\/p>\n<p>\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435: \u0435\u0441\u043b\u0438 \u0432 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0435 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 RTL \u044f\u0437\u044b\u043a\u043e\u0432, \u0442\u043e <code>layout_constraintHorizontal_bias<\/code> \u0432\u043c\u0435\u0441\u0442\u043e &quot;\u0441\u043b\u0435\u0432\u0430&quot; \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b &quot;\u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u0430&quot;, \u0430 \u0432\u043c\u0435\u0441\u0442\u043e &quot;\u0441\u043f\u0440\u0430\u0432\u0430&quot; \u2014 &quot;\u043e\u0442 \u043a\u043e\u043d\u0446\u0430&quot;. \u0422\u043e \u0435\u0441\u0442\u044c \u0442\u0435\u043c, \u043a\u0442\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 RTL \u044f\u0437\u044b\u043a\u0438 \u0441\u0442\u043e\u0438\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u044f\u0432\u043d\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 &quot;\u0441\u043b\u0435\u0432\u0430&quot; \u0438 &quot;\u0441\u043f\u0440\u0430\u0432\u0430&quot; \u043d\u0435 \u0432\u044b\u0439\u0434\u0435\u0442. \u041f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435, \u044f \u0442\u0430\u043a\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043d\u0435 \u043d\u0430\u0448\u0435\u043b.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">    &lt;android.support.constraint.ConstraintLayout         android:layout_width=&quot;match_parent&quot;         android:layout_height=&quot;match_parent&quot;&gt;          &lt;!-- \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0439 bias \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432 0.3 (30% \u043e\u0442\u0441\u0442\u0443\u043f \u0441\u043b\u0435\u0432\u0430\/\u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u0430), \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 bias - \u0432 1 (\u0441\u043d\u0438\u0437\u0443)              constraints \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u044b \u043a \u0441\u0442\u043e\u0440\u043e\u043d\u0430\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430,              \u0448\u0438\u0440\u0438\u043d\u0430 \u2014 match_constraint_wrap, \u0432\u044b\u0441\u043e\u0442\u0430 \u2014 match_constraint_wrap \u2014&gt;         &lt;TextView             android:id=&quot;@+id\/view_1&quot;             android:text=&quot;view_1&quot;             android:layout_width=&quot;0dp&quot;             android:layout_height=&quot;0dp&quot;             app:layout_constraintWidth_default=&quot;wrap&quot;             app:layout_constraintHeight_default=&quot;wrap&quot;             android:scaleType=&quot;centerCrop&quot;             app:layout_constraintHorizontal_bias=&quot;0.3&quot;             app:layout_constraintVertical_bias=&quot;1&quot;             app:layout_constraintLeft_toLeftOf=&quot;parent&quot;             app:layout_constraintRight_toRightOf=&quot;parent&quot;             app:layout_constraintTop_toTopOf=&quot;parent&quot;             app:layout_constraintBottom_toBottomOf=&quot;parent&quot;\/&gt;      &lt;\/android.support.constraint.ConstraintLayout&gt;<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"osobennosti-privyazki-liniy\">\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u043b\u0438\u043d\u0438\u0439<\/h2>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0438 ConstraintLayout \u0435\u0433\u043e \u0447\u0430\u0441\u0442\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043b\u0438 \u0441 RelativeLayout. \u041d\u043e, \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0443 \u043d\u0438\u0445 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u0440\u0430\u0441\u0447\u0435\u0442\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u0412 RelativeLayout \u0443 view \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0441 \u043a\u0430\u043a\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0434\u0440\u0443\u0433\u043e\u0439 view \u0435\u0439 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u2014 &quot;\u0441\u043b\u0435\u0432\u0430 \u043e\u0442&quot;, &quot;\u0441\u043f\u0440\u0430\u0432\u0430 \u043e\u0442&quot; \u0438 \u0442.\u0434. \u0412 ConstraintLayout constraints \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043a \u0441\u0442\u043e\u0440\u043e\u043d\u0430\u043c \u0434\u0440\u0443\u0433\u0438\u0445 views \u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 view \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0435\u0435 constraints \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u044b.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f constraint \u0441\u043f\u0435\u0440\u0432\u0430 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 view, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044d\u0442\u043e\u0442 constraint \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d. \u0410 \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f view \u0441\u043f\u0435\u0440\u0432\u0430 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043d\u0435\u0435 constraints. \u0426\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 view \u0438 constraints \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u044b, \u0442\u0430\u043a \u0447\u0442\u043e, \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0432\u043d\u0443\u0442\u0440\u0438 ConstraintLayout \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0434\u0435\u0440\u0435\u0432\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0438 \u0434\u0435\u0440\u0435\u0432\u043e \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 constraints \u043e\u0442 view \u0438 view \u043e\u0442 constraints. \u0412\u0441\u0435 \u0440\u0430\u0441\u0447\u0435\u0442\u044b \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u043d\u043e \u043e\u0442 \u043a\u043e\u0440\u043d\u044f \u0434\u0435\u0440\u0435\u0432\u0430. \u041a\u043e\u0440\u043d\u0435\u043c \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0430\u043c ConstraintLayout.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 constraints:<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;android.support.constraint.ConstraintLayout     xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;     xmlns:app=&quot;http:\/\/schemas.android.com\/apk\/res-auto&quot;     android:layout_width=&quot;match_parent&quot;     android:layout_height=&quot;wrap_content&quot;&gt;      &lt;TextView         android:id=&quot;@+id\/view_A&quot;         android:layout_width=&quot;wrap_content&quot;         android:layout_height=&quot;wrap_content&quot;         android:text=&quot;View A&quot;         app:layout_constraintLeft_toLeftOf=&quot;parent&quot;         app:layout_constraintTop_toTopOf=&quot;parent&quot;\/&gt;      &lt;TextView         android:id=&quot;@+id\/view_B&quot;         android:text=&quot;View B&quot;         android:layout_width=&quot;wrap_content&quot;         android:layout_height=&quot;0dp&quot;         app:layout_constraintTop_toBottomOf=&quot;@id\/view_A&quot;         app:layout_constraintBottom_toTopOf=&quot;@id\/view_A&quot;\/&gt;      &lt;TextView         android:id=&quot;@+id\/view_C&quot;         android:text=&quot;View C&quot;         android:layout_width=&quot;wrap_content&quot;         android:layout_height=&quot;wrap_content&quot;         app:layout_constraintLeft_toRightOf=&quot;@id\/view_A&quot;         app:layout_constraintTop_toBottomOf=&quot;@id\/view_B&quot;\/&gt;  &lt;\/android.support.constraint.ConstraintLayout&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/647\/665\/308\/647665308ecf4d75851f14fa0c362b19.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 !\"\/><\/p>\n<p>  <\/p>\n<p>View <code>A<\/code> \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a \u043b\u0435\u0432\u043e\u0439 \u0438 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0430\u043c ConstraintLayout, \u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043b\u0435\u0432\u0430 \u0441\u0432\u0435\u0440\u0445\u0443.<\/p>\n<p>  <\/p>\n<p>View <code>B<\/code> \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u2014 <code>Top(B)-&gt;bottom(A) \u0438 Bottom(B)-&gt;top(A)<\/code>, \u2014 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0435\u0433\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 constraints, \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435. \u0421\u0430\u043c\u0430 \u0432\u044b\u0441\u043e\u0442\u0430 <code>B<\/code> \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0432 match_constraint_spread.<\/p>\n<p>  <\/p>\n<p>View <code>C<\/code> \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043f\u0440\u0430\u0432\u0430 \u043e\u0442 <code>A<\/code> \u2014 <code>Left(C)\u2014&gt;right(A)<\/code> \u2014 \u0438 (\u0432\u0440\u043e\u0434\u0435 \u043a\u0430\u043a) \u0441\u043d\u0438\u0437\u0443 \u043e\u0442 <code>B<\/code> \u2014 <code>Top(C)\u2014&gt;bottom(B)<\/code>.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e. \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u044e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u0432:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u0414\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 <code>C<\/code> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0435\u0435 \u043d\u0438\u0436\u043d\u0438\u0439 constraint;<\/li>\n<li>\u0414\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043d\u0438\u0436\u043d\u0435\u0433\u043e constraint <code>C<\/code> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0435\u0440\u0445\u043d\u044e\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443 <code>B<\/code>;<\/li>\n<li>\u0414\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b <code>B<\/code> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0435\u0435 \u043d\u0438\u0436\u043d\u0438\u0439 \u0438 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 constraints;<\/li>\n<li>\u0414\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043d\u0438\u0436\u043d\u0435\u0433\u043e \u0438 \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e constraints <code>B<\/code> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0435\u0440\u0445\u043d\u044e\u044e \u0438 \u043d\u0438\u0436\u043d\u044e\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u044b <code>A<\/code>;<\/li>\n<li><code>A<\/code> \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0432\u0430-\u0441\u0432\u0435\u0440\u0445\u0443, \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u0430\u043c.<\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u0432:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u0412\u0435\u0440\u0445\u043d\u044f\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u0430 <code>A<\/code> \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b ConstraintLayout, \u043d\u0438\u0436\u043d\u044f\u044f \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0443 \u0442\u0435\u043a\u0441\u0442\u0430 <code>A<\/code>, \u0442\u0430\u043a \u043a\u0430\u043a \u0443 <code>A<\/code> \u0432\u044b\u0441\u043e\u0442\u0430 wrap_content;<\/li>\n<li>\u0412\u0435\u0440\u0445\u043d\u0438\u0439 constraint <code>B<\/code> \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043d\u0438\u0436\u043d\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b <code>A<\/code>, \u043d\u0438\u0436\u043d\u0438\u0439 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 <code>A<\/code>, \u0442\u043e \u0435\u0441\u0442\u044c \u043e\u043d \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b ConstraintLayout;<\/li>\n<li>\u0422\u0430\u043a \u043a\u0430\u043a \u0432\u044b\u0441\u043e\u0442\u0430 <code>B<\/code> \u2014 match_constraint_spread, \u0442\u043e \u0432\u0435\u0440\u0445\u043d\u044f\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u0430 <code>B<\/code> \u2014 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043d\u0438\u0436\u043d\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b <code>A<\/code>, \u0430 \u043d\u0438\u0436\u043d\u044f\u044f \u2014 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b ConstraintLayout. \u042d\u0442\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u043d\u043e, \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0432\u044b\u0441\u043e\u0442\u0430 <code>B<\/code> \u2014 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f.<\/li>\n<li>\u0412\u0435\u0440\u0445\u043d\u0438\u0439 constraint <code>C<\/code> \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a \u043d\u0438\u0436\u043d\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 <code>B<\/code>, \u0442\u043e \u0435\u0441\u0442\u044c \u043e\u043d \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b ConstraintLayout;<\/li>\n<li>\u0412 \u0438\u0442\u043e\u0433\u0435, \u0432\u0435\u0440\u0445\u043d\u044f\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u0430 <code>C<\/code> \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b ConstraintLayout, \u043d\u0438\u0436\u043d\u044f\u044f \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0443 \u0442\u0435\u043a\u0441\u0442\u0430 <code>C<\/code>, \u0442\u0430\u043a \u043a\u0430\u043a \u0443 <code>A<\/code> \u0432\u044b\u0441\u043e\u0442\u0430 wrap_content.<\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0442\u0430\u043a\u043e\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0441\u0442\u043e\u0438\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f view \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0441\u0447\u0435\u0442\u0435.<\/p>\n<p>  <\/p>\n<h2 id=\"osobennosti-privyazki-po-baseline\">\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u043f\u043e Baseline.<\/h2>\n<p>  <\/p>\n<p>View, \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043d\u0430\u044f \u043f\u043e Baseline, \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0430 \u0441\u0432\u0435\u0440\u0445\u0443 \u0438 \u0441\u043d\u0438\u0437\u0443, \u0442\u043e \u0435\u0441\u0442\u044c Top \u0438 Bottom constraints \u0431\u0443\u0434\u0443\u0442 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0434\u043b\u044f \u0442\u0430\u043a\u043e\u0439 view \u043d\u0435\u043b\u044c\u0437\u044f \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 match_constraint_spread \u0438\u043b\u0438 match_constraint_wrap.<\/p>\n<p>  <\/p>\n<p>\u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442, \u0447\u0442\u043e \u043f\u043e Baseline \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0435\u0432\u044b\u0441\u043e\u043a\u0438\u0435 view \u043a \u0432\u044b\u0441\u043e\u043a\u0438\u043c. \u0418\u043d\u0430\u0447\u0435 \u0435\u0441\u0442\u044c \u0448\u0430\u043d\u0441, \u0447\u0442\u043e \u0432\u044b\u0441\u043e\u043a\u0430\u044f view \u0432\u044b\u0439\u0434\u0435\u0442 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 ConstraintLayout \u0438\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0440 ConstraintLayout \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d \u043d\u0435\u0432\u0435\u0440\u043d\u043e.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 Baseline-\u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">    &lt;android.support.constraint.ConstraintLayout         android:layout_width=&quot;match_parent&quot;         android:layout_height=&quot;wrap_content&quot;&gt;          &lt;!-- \u0440\u0430\u0437\u043c\u0435\u0440 \u0442\u0435\u043a\u0441\u0442\u0430 12sp \u2014&gt;         &lt;TextView             android:id=&quot;@+id\/left_view&quot;             android:layout_width=&quot;wrap_content&quot;             android:layout_height=&quot;wrap_content&quot;             android:text=&quot;Left view&quot;             android:textSize=&quot;12sp&quot;             app:layout_constraintLeft_toLeftOf=&quot;parent&quot;             app:layout_constraintTop_toTopOf=&quot;parent&quot;\/&gt;          &lt;!-- \u0440\u0430\u0437\u043c\u0435\u0440 \u0442\u0435\u043a\u0441\u0442\u0430 20sp              \u0442\u043e \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043f\u043e \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043b\u0438\u043d\u0438\u0438 \u043a \u043c\u0435\u043d\u044c\u0448\u0435\u043c\u0443 \u2014&gt;         &lt;TextView             android:id=&quot;@+id\/right_view&quot;             android:text=&quot;Right view&quot;             android:layout_width=&quot;wrap_content&quot;             android:layout_height=&quot;wrap_content&quot;             android:textSize=&quot;20sp&quot;             app:layout_constraintBaseline_toBaselineOf=&quot;@id\/left_view&quot;             app:layout_constraintLeft_toRightOf=&quot;@id\/left_view&quot;\/&gt;      &lt;\/android.support.constraint.ConstraintLayout&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c65\/6ec\/0a6\/c656ec0a615a4e029f8d2ebb01a7770d.png\" alt=\"\u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 Baseline\"\/><\/p>\n<p>  <\/p>\n<p>\u0412\u044b\u0441\u043e\u0442\u0430 ConstraintLayout (\u0432 \u0447\u0435\u0440\u043d\u043e\u0439 \u0440\u0430\u043c\u043a\u0435) \u0440\u0430\u0432\u043d\u0430 \u0432\u044b\u0441\u043e\u0442\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 TextView (\u0432 \u043a\u0440\u0430\u0441\u043d\u043e\u0439 \u0440\u0430\u043c\u043a\u0435), \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u044b\u0441\u043e\u0442\u0430 TextView \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430, \u043a\u0430\u043a <code>wrap_content<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u043b\u0438\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0439 TextView \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u0430 \u043a \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043b\u0438\u043d\u0438\u0438 \u043c\u0430\u043b\u043e\u0439 TextView (\u0432 \u0437\u0435\u043b\u0435\u043d\u043e\u0439 \u0440\u0430\u043c\u043a\u0435), \u0442\u0430\u043a \u0447\u0442\u043e \u0442\u0435\u043a\u0441\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u043b\u0438\u043d\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u0430\u044f TextView \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 ConstraintLayout.<\/p>\n<p>  <\/p>\n<h2 id=\"cepi-chains\">\u0426\u0435\u043f\u0438 (chains)<\/h2>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0435 \u0441\u0442\u043e\u0440\u043e\u043d \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u2014 \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c \u0434\u0432\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0434\u0432\u0443\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u0440\u0443\u0433 \u043a \u0434\u0440\u0443\u0433\u0443 <code>Left(B)\u2014&gt;right(A) \u0438 right(A)\u2014&gt;Left(B)<\/code>, \u0442\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b \u0432 \u0446\u0435\u043f\u044c \u0438 \u043a \u043d\u0438\u043c \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043e\u0441\u043e\u0431\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p><strong>\u0426\u0435\u043f\u044c\u044e<\/strong> \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0431\u043e\u0440 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u044b \u0434\u0440\u0443\u0433 \u043a \u0434\u0440\u0443\u0433\u0443. \u0426\u0435\u043f\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f <strong>\u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438<\/strong> \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u043e\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 <code>ConstraintLayout<\/code>. \u0426\u0435\u043f\u044c \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u043e\u043a \u0435\u0435 \u043a\u0440\u0430\u0439\u043d\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u0446\u0435\u043f\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0442\u0438\u043b\u044f \u0446\u0435\u043f\u0438. \u0421\u0442\u0438\u043b\u044c \u0446\u0435\u043f\u0438 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u043c <code>layout_constraint{X}_chainStyle<\/code>, \u0433\u0434\u0435 <strong>X<\/strong> \u2014 <code>Horizontal<\/code> \u0434\u043b\u044f \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0446\u0435\u043f\u0435\u0439\u00a0\u0438\u043b\u0438 <code>Vertical<\/code> \u0434\u043b\u044f \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0446\u0435\u043f\u0438: \u043f\u0440\u0430\u0432\u0438\u043b\u043e <code>Right(A)\u2014&gt;left(B) + Left(B)\u2014&gt;right(A)<\/code> \u0441\u0432\u044f\u0436\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b <code>A<\/code> \u0438 <code>B<\/code> \u0432 \u0446\u0435\u043f\u044c, \u0430 <code>Left(A)\u2014&gt;left(parent) + Right(B)\u2014&gt;right(parent)<\/code> \u043f\u0440\u0438\u0432\u044f\u0436\u0435\u0442 \u0432\u0441\u044e \u0446\u0435\u043f\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043a \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u0441\u0442\u043e\u0440\u043e\u043d\u0430\u043c <code>ConstraintLayout<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0421\u0442\u0438\u043b\u044c \u0446\u0435\u043f\u0438 \u0438 \u0435\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u0438\u0437 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0433\u043e\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0446\u0435\u043f\u0438 \u2014 \u0441\u0430\u043c\u043e\u0433\u043e \u043b\u0435\u0432\u043e\u0433\u043e, \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u043b\u0438 \u0441\u0430\u043c\u043e\u0433\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e.<\/p>\n<p>  <\/p>\n<h3 id=\"stil-spread\">\u0421\u0442\u0438\u043b\u044c spread<\/h3>\n<p>  <\/p>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0446\u0435\u043f\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e, \u0442\u043e \u0435\u0441\u0442\u044c \u043e\u0442\u0441\u0442\u0443\u043f\u044b \u043c\u0435\u0436\u0434\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0438 \u043e\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043e \u0433\u0440\u0430\u043d\u0438\u0446 \u0446\u0435\u043f\u0438 \u0431\u0443\u0434\u0443\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e;<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">    &lt;android.support.constraint.ConstraintLayout         android:layout_width=&quot;match_parent&quot;         android:layout_height=&quot;match_parent&quot;&gt;          &lt;!-- \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e chainStyle \u2014 spread, \u0442\u0430\u043a \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u2014&gt;         &lt;TextView             android:id=&quot;@+id\/view_1&quot;             android:layout_width=&quot;wrap_content&quot;             android:layout_height=&quot;wrap_content&quot;             android:text=&quot;view_1&quot;             app:layout_constraintLeft_toLeftOf=&quot;parent&quot;             app:layout_constraintRight_toLeftOf=&quot;@+id\/view_2&quot;\/&gt;          &lt;TextView             android:id=&quot;@+id\/view_2&quot;             android:layout_width=&quot;100dp&quot;             android:layout_height=&quot;wrap_content&quot;             android:text=&quot;view_2&quot;             app:layout_constraintLeft_toRightOf=&quot;@id\/view_1&quot;             app:layout_constraintRight_toLeftOf=&quot;@+id\/view_3&quot;\/&gt;          &lt;TextView             android:id=&quot;@+id\/view_3&quot;             android:layout_width=&quot;200dp&quot;             android:layout_height=&quot;wrap_content&quot;             android:text=&quot;view_3&quot;             app:layout_constraintLeft_toRightOf=&quot;@id\/view_2&quot;             app:layout_constraintRight_toRightOf=&quot;parent&quot;\/&gt;      &lt;\/android.support.constraint.ConstraintLayout&gt;<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/6a4\/574\/22e\/6a457422e3234267a133f54c6bdb673d.png\" alt=\"Spread\"\/><\/p>\n<p>  <\/p>\n<h3 id=\"stil-spread_inside\">\u0421\u0442\u0438\u043b\u044c spread_inside<\/h3>\n<p>  <\/p>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0446\u0435\u043f\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 \u043f\u0440\u0438 \u0441\u0442\u0438\u043b\u0435 <code>spread<\/code>, \u043d\u043e \u043e\u0442\u0441\u0442\u0443\u043f\u044b \u043e\u0442 \u0433\u0440\u0430\u043d\u0438\u0446 \u0446\u0435\u043f\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0432\u043d\u044b \u043d\u0443\u043b\u044e;<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">    &lt;android.support.constraint.ConstraintLayout         android:layout_width=&quot;match_parent&quot;         android:layout_height=&quot;match_parent&quot;&gt;          &lt;!-- chainStyle \u0433\u043e\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u2014 spread_inside \u2014&gt;         &lt;TextView             android:id=&quot;@+id\/view_1&quot;             app:layout_constraintHorizontal_chainStyle=&quot;spread_inside&quot;             android:layout_width=&quot;wrap_content&quot;             android:layout_height=&quot;wrap_content&quot;             android:text=&quot;view_1&quot;             app:layout_constraintLeft_toLeftOf=&quot;parent&quot;             app:layout_constraintRight_toLeftOf=&quot;@+id\/view_2&quot;\/&gt;          &lt;TextView             android:id=&quot;@+id\/view_2&quot;             android:layout_width=&quot;100dp&quot;             android:layout_height=&quot;wrap_content&quot;             android:text=&quot;view_2&quot;             app:layout_constraintLeft_toRightOf=&quot;@id\/view_1&quot;             app:layout_constraintRight_toLeftOf=&quot;@+id\/view_3&quot;\/&gt;          &lt;TextView             android:id=&quot;@+id\/view_3&quot;             android:layout_width=&quot;200dp&quot;             android:layout_height=&quot;wrap_content&quot;             android:text=&quot;view_3&quot;             app:layout_constraintLeft_toRightOf=&quot;@id\/view_2&quot;             app:layout_constraintRight_toRightOf=&quot;parent&quot;\/&gt;      &lt;\/android.support.constraint.ConstraintLayout&gt;<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/7a5\/f02\/794\/7a5f0279431349d288638848b31512b2.png\" alt=\"Spread inside\"\/><\/p>\n<p>  <\/p>\n<h3 id=\"stil-packed\">\u0421\u0442\u0438\u043b\u044c packed<\/h3>\n<p>  <\/p>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f \u0433\u0440\u0443\u043f\u043f\u043e\u0439 \u0434\u0440\u0443\u0433 \u0437\u0430 \u0434\u0440\u0443\u0433\u043e\u043c. \u0422\u0430\u043a\u043e\u0439 \u0441\u0442\u0438\u043b\u044c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0433\u0440\u0443\u043f\u043f\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u043c \u0446\u0435\u043f\u0438 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0447\u0435\u0440\u0435\u0437 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>layout_constraint{*}_bias<\/code>. Bias \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0443 \u0433\u043e\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0446\u0435\u043f\u0438;<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">    &lt;android.support.constraint.ConstraintLayout         android:layout_width=&quot;match_parent&quot;         android:layout_height=&quot;match_parent&quot;&gt;          &lt;!-- chainStyle \u0433\u043e\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u2014 packed, bias \u2014 0.3 (30% \u043e\u0442\u0441\u0442\u0443\u043f \u0441\u043b\u0435\u0432\u0430\/\u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u0430) \u2014&gt;         &lt;TextView             android:id=&quot;@+id\/view_1&quot;             app:layout_constraintHorizontal_chainStyle=&quot;packed&quot;             app:layout_constraintHorizontal_bias=&quot;0.3&quot;             android:layout_width=&quot;wrap_content&quot;             android:layout_height=&quot;wrap_content&quot;             android:text=&quot;view_1&quot;             app:layout_constraintLeft_toLeftOf=&quot;parent&quot;             app:layout_constraintRight_toLeftOf=&quot;@+id\/view_2&quot;\/&gt;          &lt;TextView             android:id=&quot;@+id\/view_2&quot;             android:layout_width=&quot;100dp&quot;             android:layout_height=&quot;wrap_content&quot;             android:text=&quot;view_2&quot;             app:layout_constraintLeft_toRightOf=&quot;@id\/view_1&quot;             app:layout_constraintRight_toLeftOf=&quot;@+id\/view_3&quot;\/&gt;          &lt;TextView             android:id=&quot;@+id\/view_3&quot;             android:layout_width=&quot;200dp&quot;             android:layout_height=&quot;wrap_content&quot;             android:text=&quot;view_3&quot;             app:layout_constraintLeft_toRightOf=&quot;@id\/view_2&quot;             app:layout_constraintRight_toRightOf=&quot;parent&quot;\/&gt;      &lt;\/android.support.constraint.ConstraintLayout&gt;<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/105\/a43\/462\/105a434629f6451284a0c04a9dae2d2e.png\" alt=\"Packed\"\/><br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/171\/a29\/0a3\/171a290a391f4de5b2f178e673409103.png\" alt=\"Packed bias\"\/><\/p>\n<p>  <\/p>\n<h3 id=\"stil-weighted\">\u0421\u0442\u0438\u043b\u044c weighted<\/h3>\n<p>  <\/p>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0438\u0445 \u0432\u0435\u0441\u043e\u043c \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 LinearLayout. \u0427\u0442\u043e\u0431\u044b \u0442\u0430\u043a\u043e\u0439 \u0441\u0442\u0438\u043b\u044c \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b, \u043e\u0434\u043d\u0430 \u0438\u0437 view \u0446\u0435\u043f\u0438 \u0434\u043e\u043b\u0436\u043d\u0430 \u0438\u043c\u0435\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 match_constraint_spread. \u0414\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0432\u0435\u0441\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b layout_constraintHorizontal_weight \u0438 layout_constraintVertical_weight.<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">    &lt;android.support.constraint.ConstraintLayout         android:layout_width=&quot;match_parent&quot;         android:layout_height=&quot;match_parent&quot;&gt;          &lt;!-- \u0448\u0438\u0440\u0438\u043d\u0430  match_constraint_spread, weight=3              \u0437\u0430\u0439\u043c\u0435\u0442 3\/4 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u2014&gt;         &lt;TextView             android:id=&quot;@+id\/view_1&quot;             android:layout_width=&quot;0dp&quot;             android:layout_height=&quot;wrap_content&quot;             app:layout_constraintHorizontal_weight=&quot;3&quot;             android:text=&quot;view_1&quot;             app:layout_constraintLeft_toLeftOf=&quot;parent&quot;             app:layout_constraintRight_toLeftOf=&quot;@+id\/view_2&quot;\/&gt;          &lt;!-- \u0448\u0438\u0440\u0438\u043d\u0430 \u2014 match_constraint_spread, weight=1              \u0437\u0430\u0439\u043c\u0435\u0442 1\/4 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u2014&gt;         &lt;TextView             android:id=&quot;@+id\/view_2&quot;             android:layout_width=&quot;0dp&quot;             android:layout_height=&quot;wrap_content&quot;             app:layout_constraintHorizontal_weight=&quot;1&quot;             android:text=&quot;view_2&quot;             app:layout_constraintLeft_toRightOf=&quot;@id\/view_1&quot;             app:layout_constraintRight_toLeftOf=&quot;@+id\/view_3&quot;\/&gt;          &lt;!-- \u0448\u0438\u0440\u0438\u043d\u0430 \u2014 any_size, \u0437\u0430\u0439\u043c\u0435\u0442 \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0435\u0439 \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u2014&gt;         &lt;TextView             android:id=&quot;@+id\/view_3&quot;             android:layout_width=&quot;wrap_content&quot;             android:layout_height=&quot;wrap_content&quot;             android:text=&quot;view_3&quot;             app:layout_constraintLeft_toRightOf=&quot;@id\/view_2&quot;             app:layout_constraintRight_toRightOf=&quot;parent&quot;\/&gt;      &lt;\/android.support.constraint.ConstraintLayout&gt;<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/136\/d01\/2d3\/136d012d31fa4d8796013628339eb72d.png\" alt=\"Weighted\"\/><\/p>\n<p>  <\/p>\n<h2 id=\"otstupy-i-uchet-skrytyh-elementov\">\u041e\u0442\u0441\u0442\u0443\u043f\u044b \u0438 \u0443\u0447\u0435\u0442 \u0441\u043a\u0440\u044b\u0442\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432<\/h2>\n<p>  <\/p>\n<p>\u041e\u0442\u0441\u0442\u0443\u043f\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438 <code>layout_margin{X}<\/code>, \u0433\u0434\u0435 <strong>X<\/strong> \u2014 \u0441\u0442\u043e\u0440\u043e\u043d\u0430 \u043e\u0442\u0441\u0442\u0443\u043f\u0430 (<code>Left\/Right\/Top\/Bottom\/Start\/End<\/code>). \u042d\u0442\u0438 \u043e\u0442\u0441\u0442\u0443\u043f\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043a \u043b\u0438\u043d\u0438\u044f\u043c \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u0430 \u043d\u0435 \u043a \u0441\u0442\u043e\u0440\u043e\u043d\u0430\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043b\u0438\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u0441 \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u043c \u043e\u0442 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043d\u0430 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u0430.<\/p>\n<p>  <\/p>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0431\u044b\u043b\u0438 \u0432\u0432\u0435\u0434\u0435\u043d\u044b \u0434\u043b\u044f \u0441\u043a\u0440\u044b\u0442\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0442\u043e \u0435\u0441\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 <code>Visibility<\/code> \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>GONE<\/code>. \u041a\u043e\u0433\u0434\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043a\u0440\u044b\u0442, \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u043e\u0442\u0441\u0442\u0443\u043f\u044b \u043e\u0442 \u0435\u0433\u043e \u0441\u0442\u043e\u0440\u043e\u043d \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f, \u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 <code>gone-\u043e\u0442\u0441\u0442\u0443\u043f\u044b<\/code>. \u0415\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0440\u0438 \u0440\u0430\u0441\u0447\u0435\u0442\u0430\u0445 \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0440\u0430\u0432\u043d\u044b\u043c\u0438 \u043d\u0443\u043b\u044e. <code>Gone-\u043e\u0442\u0441\u0442\u0443\u043f\u044b<\/code> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438: <code>layout_goneMargin{X}<\/code>, \u0433\u0434\u0435 <strong>X<\/strong> \u2014 \u0441\u0442\u043e\u0440\u043e\u043d\u0430 \u043e\u0442\u0441\u0442\u0443\u043f\u0430.<\/p>\n<p>  <\/p>\n<p>\u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 <code>A<\/code> \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043e\u0442\u0441\u0442\u0443\u043f \u0441\u043b\u0435\u0432\u0430 \u043e\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 <code>B<\/code> \u0440\u0430\u0432\u043d\u044b\u0439 <code>10dp<\/code>, \u0430 gone-\u043e\u0442\u0441\u0442\u0443\u043f \u0441\u043b\u0435\u0432\u0430 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d <code>50dp<\/code>. \u0415\u0441\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 <code>B<\/code> \u0441\u043a\u0440\u044b\u0442 (<code>GONE<\/code>), \u0442\u043e \u043e\u0442\u0441\u0442\u0443\u043f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 <code>A<\/code> \u0441\u043b\u0435\u0432\u0430 \u0431\u0443\u0434\u0435\u0442 <code>50dp<\/code>, \u0435\u0441\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 <code>B<\/code> \u2014 <code>VISIBLE<\/code> \u0438\u043b\u0438 <code>INVISIBLE<\/code>, \u0442\u043e \u043e\u0442\u0441\u0442\u0443\u043f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 <code>A<\/code> \u0441\u043b\u0435\u0432\u0430 \u0431\u0443\u0434\u0435\u0442 <code>10dp<\/code>.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">    &lt;android.support.constraint.ConstraintLayout         android:layout_width=&quot;match_parent&quot;         android:layout_height=&quot;match_parent&quot;&gt;          &lt;TextView             android:id=&quot;@+id\/view_1&quot;             android:layout_width=&quot;wrap_content&quot;             android:layout_height=&quot;wrap_content&quot;             android:visibility=&quot;gone&quot;             android:text=&quot;view_1&quot;             app:layout_constraintLeft_toLeftOf=&quot;parent&quot;\/&gt;          &lt;!-- \u043b\u0435\u0432\u044b\u0439 constraint view_2 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a \u043f\u0440\u0430\u0432\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 view_1              \u0442\u0430\u043a \u043a\u0430\u043a view_1 \u0441\u043a\u0440\u044b\u0442\u0430 (gone), \u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u0441\u0442\u0443\u043f goneMarginLeft (50dp) \u2014&gt;         &lt;TextView             android:id=&quot;@+id\/view_2&quot;             android:layout_marginLeft=&quot;10dp&quot;             app:layout_goneMarginLeft=&quot;50dp&quot;             android:layout_width=&quot;wrap_content&quot;             android:layout_height=&quot;wrap_content&quot;             android:text=&quot;view_2&quot;             app:layout_constraintHorizontal_bias=&quot;0&quot;             app:layout_constraintLeft_toRightOf=&quot;@id\/view_1&quot;             app:layout_constraintRight_toRightOf=&quot;parent&quot;\/&gt;      &lt;\/android.support.constraint.ConstraintLayout&gt;<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/a31\/b26\/fbc\/a31b26fbc1364efc8ace624da89b305c.png\" alt=\"\u041e\u0442\u0441\u0442\u0443\u043f\u044b \u0438 \u0443\u0447\u0435\u0442 \u0441\u043a\u0440\u044b\u0442\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432\"\/><\/p>\n<p>  <\/p>\n<h2 id=\"guidelines\">Guidelines<\/h2>\n<p>  <\/p>\n<p><strong>Guideline<\/strong> \u2014 \u044d\u0442\u043e \u0430\u043d\u0430\u043b\u043e\u0433 \u043b\u0438\u043d\u0438\u0438, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u043d\u0430 \u043c\u0430\u043a\u0435\u0442\u0430\u0445 \u0432 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430\u0445, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u044b \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b. \u0422\u0430\u043a\u0443\u044e \u043b\u0438\u043d\u0438\u044e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 view \u043a\u043b\u0430\u0441\u0441\u0430 <code>android.support.constraint.Guideline<\/code>. Guideline \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u043c \u0438\u043b\u0438 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u2014 \u044d\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u043c <code>android:orientation<\/code>. \u0421\u0430\u043c guideline \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430, \u043d\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u0435\u0441\u0442\u0430 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043a \u0441\u0442\u043e\u0440\u043e\u043d\u0430\u043c ConstraintLayout.<\/p>\n<p>  <\/p>\n<p>Guideline \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c \u043a \u043d\u0435\u043c\u0443 \u0441\u0442\u043e\u0440\u043e\u043d\u044b view \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044f \u0438\u0445 \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043f\u043e \u043e\u0434\u043d\u043e\u0439 \u043b\u0438\u043d\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 guideline \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0442\u0440\u0435\u043c\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li><code>layout_constraintGuide_begin<\/code> \u2014 \u043e\u0442\u0441\u0442\u0443\u043f \u043e\u0442 \u043b\u0435\u0432\u043e\u0439 (\u043d\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439) \u0441\u0442\u043e\u0440\u043e\u043d\u044b ConstraintLayout \u0434\u043b\u044f \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 gudeline \u0438 \u043e\u0442 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u2014 \u0434\u043b\u044f \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0445;<\/li>\n<li><code>layout_constraintGuide_end<\/code> \u2014 \u043e\u0442\u0441\u0442\u0443\u043f \u043e\u0442 \u043f\u0440\u0430\u0432\u043e\u0439 (\u043d\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439) \u0441\u0442\u043e\u0440\u043e\u043d\u044b ConstraintLayout \u0434\u043b\u044f \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 guideline \u0438 \u043e\u0442 \u043d\u0438\u0436\u043d\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u2014 \u0434\u043b\u044f \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0445;<\/li>\n<li><code>layout_constraintGuide_percent<\/code> \u2014 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0441\u0442\u0443\u043f guideline \u0432 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430\u0445 \u043e\u0442 \u043b\u0435\u0432\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b ConstraintLayout \u0434\u043b\u044f \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 gudeline \u0438 \u043e\u0442 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u2014 \u0434\u043b\u044f \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0445. \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0447\u0438\u0441\u043b\u043e\u043c \u043e\u0442 0 \u0434\u043e 1.<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"xml\">    &lt;android.support.constraint.ConstraintLayout         android:layout_width=&quot;match_parent&quot;         android:layout_height=&quot;match_parent&quot;&gt;          &lt;!-- \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 guideline \u0441 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u043c 25% \u2014&gt;         &lt;android.support.constraint.Guideline             android:id=&quot;@+id\/line_1&quot;             android:orientation=&quot;vertical&quot;             app:layout_constraintGuide_percent=&quot;0.25&quot;             android:layout_width=&quot;wrap_content&quot;             android:layout_height=&quot;wrap_content&quot;\/&gt;          &lt;!-- \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 guideline \u0441 \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u043c 100dp \u043e\u0442 \u043b\u0435\u0432\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b ConstraintLayout \u2014&gt;         &lt;android.support.constraint.Guideline             android:id=&quot;@+id\/line_2&quot;             android:orientation=&quot;vertical&quot;             app:layout_constraintGuide_begin=&quot;100dp&quot;             android:layout_width=&quot;wrap_content&quot;             android:layout_height=&quot;wrap_content&quot;\/&gt;          &lt;!-- \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 guideline \u0441 \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u043c 50dp \u043e\u0442 \u043f\u0440\u0430\u0432\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b ConstraintLayout \u2014&gt;         &lt;android.support.constraint.Guideline             android:id=&quot;@+id\/line_3&quot;             android:orientation=&quot;vertical&quot;             app:layout_constraintGuide_end=&quot;50dp&quot;             android:layout_width=&quot;wrap_content&quot;             android:layout_height=&quot;wrap_content&quot;\/&gt;          &lt;TextView             android:id=&quot;@+id\/view_1&quot;             android:layout_width=&quot;0dp&quot;             android:layout_height=&quot;wrap_content&quot;             android:text=&quot;view_1&quot;             app:layout_constraintLeft_toLeftOf=&quot;@id\/line_1&quot;             app:layout_constraintRight_toRightOf=&quot;parent&quot;\/&gt;          &lt;TextView             android:id=&quot;@+id\/view_2&quot;             android:layout_width=&quot;0dp&quot;             android:layout_height=&quot;wrap_content&quot;             android:text=&quot;view_2&quot;             app:layout_constraintTop_toBottomOf=&quot;@id\/view_1&quot;             app:layout_constraintLeft_toLeftOf=&quot;@id\/line_1&quot;             app:layout_constraintRight_toRightOf=&quot;@id\/line_3&quot;\/&gt;          &lt;TextView             android:id=&quot;@+id\/view_3&quot;             android:layout_width=&quot;0dp&quot;             android:layout_height=&quot;wrap_content&quot;             android:text=&quot;view_3&quot;             app:layout_constraintTop_toBottomOf=&quot;@id\/view_2&quot;             app:layout_constraintLeft_toLeftOf=&quot;parent&quot;             app:layout_constraintRight_toRightOf=&quot;@id\/line_2&quot;\/&gt;      &lt;\/android.support.constraint.ConstraintLayout&gt;<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/0c0\/b80\/810\/0c0b80810d7b4461b528975cd3680564.png\" alt=\"Guidelines\"\/><\/p>\n<p>  <\/p>\n<h2 id=\"nastroyka-parametrov-constraintlayout-iz-koda\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 ConstraintLayout \u0438\u0437 \u043a\u043e\u0434\u0430<\/h2>\n<p>  <\/p>\n<p>\u0417\u0430 \u044d\u0442\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u2014 <code>android.support.constraint.ConstraintSet<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u044d\u0442\u043e\u0442 <code>ConstraintSet<\/code> \u043c\u043e\u0436\u043d\u043e \u0442\u0440\u0435\u043c\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0437 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e <code>ConstraintLayout<\/code>;<br \/> \n<pre><code class=\"java\">    ConstraintLayout constraintLayout = LayoutInflater.from(context).inflate(R.layout.my_constraint_layout, null);     ConstraintSet constraintSet = new ConstraintSet();     constraintSet.clone(constraintLayout);<\/code><\/pre>\n<\/li>\n<li>\u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0437 <code>*.xml<\/code> \u0444\u0430\u0439\u043b\u0430, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f <code>ConstraintLayout<\/code>;<br \/> \n<pre><code class=\"java\">    ConstraintSet constraintSet = new ConstraintSet();     constraintSet.clone(context, R.layout.my_constraint_layout);<\/code><\/pre>\n<\/li>\n<li>\u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 <code>ConstraintSet<\/code>.<br \/> \n<pre><code class=\"java\">    ConstraintSet constraintSet = new ConstraintSet();     constraintSet.clone(constraintSet2);<\/code><\/pre>\n<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f <code>ConstraintSet<\/code> \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 <a href=\"https:\/\/developer.android.com\/reference\/android\/support\/constraint\/ConstraintSet.html\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a> (\u0438\u0445 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e).<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c <code>ConstraintSet<\/code> \u043a <code>ConstraintLayout<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043c\u0435\u0442\u043e\u0434 <code>applyTo<\/code>.<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">        final ConstraintLayout constraintLayout = (ConstraintLayout) findViewById(R.id.constr);         ConstraintSet constraintSet = new ConstraintSet();         constraintSet.clone(constraintLayout);         constraintSet.setHorizontalBias(R.id.sample_view, 0.5f);         constraintSet.applyTo(constraintLayout);<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c <code>LayoutParams<\/code> \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0438 \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c <code>requestLayout<\/code>. \u041a\u043b\u0430\u0441\u0441, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0432\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0432 <code>ConstraintLayout<\/code> \u2014 \u044d\u0442\u043e <code>android.support.constraint.ConstraintLayout.LayoutParams<\/code>. <\/p>\n<p>  <\/p>\n<h2 id=\"animacii\">\u0410\u043d\u0438\u043c\u0430\u0446\u0438\u0438<\/h2>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439 \u0432 <code>ConstraintLayout<\/code> \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432. <code>ConstraintLayout<\/code> \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442 <code>ViewGroup<\/code>, \u0442\u0430\u043a \u0447\u0442\u043e \u0434\u043b\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0442\u0435 \u0436\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u0447\u0442\u043e \u0438 \u0434\u043b\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 <code>ValueAnimator<\/code>, <code>TransitionManager<\/code> \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>  <\/p>\n<h2 id=\"stoit-li-polzovatsya-constraintlayout\">\u0421\u0442\u043e\u0438\u0442 \u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f ConstraintLayout?<\/h2>\n<p>  <\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0448\u0438\u0440\u043e\u043a\u0438\u043c \u0441\u043f\u0435\u043a\u0442\u0440\u043e\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435;<\/li>\n<li>\u0432 Android Studio \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440;<\/li>\n<li>\u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0438\u0437\u043b\u0438\u0448\u043d\u0435\u0439 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0434\u0440\u0443\u0433 \u0432 \u0434\u0440\u0443\u0433\u0430, \u0447\u0442\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u043a\u043e\u0434\u0430;<\/li>\n<li>\u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b, \u0442\u043e \u0435\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u0443\u0447\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u0440\u0430\u0437 <code>ConstraintLayout<\/code> \u0438 \u043d\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0442\u0430\u043a\u0438\u043c\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438, \u043a\u0430\u043a: <code>FrameLayout<\/code>, <code>LinearLayout<\/code>, <code>RelativeLayout<\/code>, <code>GridLayout<\/code>, <code>PercentRelativeLayout<\/code>;<\/li>\n<li>\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0432 Support Library, \u0442\u0430\u043a \u0447\u0442\u043e \u0431\u0430\u0433\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u0438, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043d\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0432 \u0441\u0438\u043b\u0443 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0443\u0445\u043e\u0434\u0438\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043a\u0430\u043a \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442;<\/li>\n<li>\u043f\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u0441\u043b\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u043a\u043e\u0434-\u0440\u0435\u0432\u044c\u044e \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u2014 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043f\u0440\u043e\u0449\u0435, \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043e\u0434\u043d\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435;<\/li>\n<li>\u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043f\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0445\u0443\u0436\u0435 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0434\u0435\u0440\u0435\u0432\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439;<\/li>\n<li>\u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0440\u0435\u043b\u0438\u0437\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e, \u0432\u0441\u0435 \u0435\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0442\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0435 \u0431\u0430\u0433\u0438;<\/li>\n<li>\u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0443 views \u0431\u0443\u0434\u0435\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 layouts.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0412 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 Touch Instinct \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f, \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c, \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a \u043e\u043d \u043f\u043e\u0432\u0435\u0434\u0435\u0442 \u0441\u0435\u0431\u044f \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0432 \u044f\u0447\u0435\u0439\u043a\u0430\u0445 <code>RecyclerView<\/code> \u2014 \u0442\u0430\u043c \u0447\u0430\u0441\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0447\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043f\u0435\u0440\u0435\u0441\u0447\u0435\u0442\u0443 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u044f\u0447\u0435\u0439\u043a\u0435 \u0438 \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u0441\u0447\u0435\u0442\u0443 \u0435\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430.<\/p>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/326814\/\"> https:\/\/habrahabr.ru\/post\/326814\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0413\u0430\u0432\u0440\u0438\u0438\u043b, \u044f Android-\u043b\u0438\u0434 Touch Instinct.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043c\u0430\u0440\u0442\u0435 Google \u0432\u044b\u043a\u0430\u0442\u0438\u043b \u0440\u0435\u043b\u0438\u0437\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 ConstraintLayout, \u0442\u0430\u043a \u0447\u0442\u043e \u0438\u043c \u0443\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0432\u0441\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u0430\u0437 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043d \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0438 <a href=\"https:\/\/www.youtube.com\/watch?v=sO9aX87hq9c\">\u043d\u0430 \u043f\u0440\u043e\u0448\u043b\u043e\u043c Google I\/O<\/a>. \u0421 \u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043f\u0440\u043e\u0448\u043b\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u0438 ConstraintLayout \u0441\u0442\u0430\u043b \u043b\u0443\u0447\u0448\u0435, \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0438 \u043e\u0431\u0440\u043e\u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0447\u0435\u043d\u044c \u043a\u0440\u0443\u0442\u043e, \u0447\u0442\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0446\u0435\u043f\u0438 \u2014 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c ConstraintLayout \u0432\u043c\u0435\u0441\u0442\u043e LinearLayout.<\/p>\n<p>  <\/p>\n<p>\u041e \u0432\u0441\u0435\u0445 \u043d\u043e\u0432\u044b\u0445 \u0438 \u0441\u0442\u0430\u0440\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u0445 ConstraintLayout \u044f \u0438 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<p>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-285171","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/285171","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=285171"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/285171\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=285171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=285171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=285171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}