Skip to content

SufianBabri/ConstraintLayoutTutorial

Repository files navigation

ConstraintLayoutTutorial

This is a basic tutorial of ConstraintLayout.

Modules or features and their uses:

  1. Barrier - useful when one of the elements is aligned against multiple views and we are not sure which element will have the largest width/height.
  2. Group - groups views for easily changing their visibilities.
  3. Chain - arranges the elements so they fill width or height of parent in different ways.
  4. Guideline - helps in aligning multiple views easily. It can be defined either in dp or in percentage.
  5. Bias - defines affinity the view has towards one of the anchor points on a single axis (i.e. left vs right for horizontal bias or top vs bottom for vertical bias).

References:

  1. Build a Responsive UI with ConstraintLayout
  2. ConstraintLayout – Guidelines, Barriers, Chains and Groups
  3. Android Reference - ConstraintLayout
  4. Wrap content but not exceed parent

License:

The MIT License (MIT)

Copyright (c) 2019 Sufian

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

Demo of basic functionality of ConstraintLayout

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages