Short answer
A Chain is a group of views that are bound together in a vertical or horizontal line. Pack means that the views should be kept very closely together, ie, touch each other (excluding any padding).
Pack
Pack means that the views are packed tightly together. Imagine that you are packing your clothes tightly together in a suitcase before going on a trip.
![enter image description here]()
Points to note:
Chain
A chain occurs when two adjacent views both have constraints to each other. Imagine an iron link chain.
![enter image description here]()
The documentation shows this well.
![enter image description here]()
This chain can continue where every link (view) in the chain has a two-way link to its neighbors.
![enter image description here]()
Chain mode/style
As I briefly mentioned above, there are different modes or styles for a chain. They are shown below (image from docs).
- Spread (default)
- Spread inside
- Weighted
- Packed
![enter image description here]()
All of these are chained. Only the bottom one is packed.