34,333
edits
Changes
no edit summary
<td width="20%">[[An Android Studio Layout Editor ConstraintLayout Tutorial|Previous]]<td align="center">[[Android Studio Development Essentials - Java Edition|Table of Contents]]<td width="20%" align="right">[[Managing Android Constraints using Constraint Sets|Next]]</td>
<tr>
<td width="20%">An Android Studio Layout Editor ConstraintLayout Tutorial<td align="center"><td width="20%" align="right">Managing Android Constraints using Constraint Sets</td>
</table>
<hr>
</pre>
This declaration should be followed by the root element of the layout, typically a container view such as a layout manager. This is represented by both opening and closing tags and any properties that need to be set on the view. The following XML, for example, declares a ConstraintLayout view as the root element, assigns the ID activity_main and sets match_parent attributes attributes such that it fills all the available space of the device display:
<pre>
<td width="20%">[[An Android Studio Layout Editor ConstraintLayout Tutorial|Previous]]<td align="center">[[Android Studio Development Essentials - Java Edition|Table of Contents]]<td width="20%" align="right">[[Managing Android Constraints using Constraint Sets|Next]]</td>
<tr>
<td width="20%">An Android Studio Layout Editor ConstraintLayout Tutorial<td align="center"><td width="20%" align="right">Managing Android Constraints using Constraint Sets</td>
</table>