Skip to content

Latest commit

 

History

History
 
 

ConstraintLayoutExamples

MotionLayout / Constraint Layout Samples

This repository contains a list of layouts that showcases the various features and usage of ConstraintLayout and MotionLayout

Pre-requisites

  • Android Studio 3.3+
  • Constraint Layout library 2.0.0-alpha5+

Getting Started

Import the project using Android Studio. Navigate to the app>res>layout> and open one of the layouts in the layout editor. This sample is best understood by seeing the constraints in the Design mode of the layout editor.

MotionLayout samples overview

Title GIF Layout MotionScene
Basic Example (1/3) Layout MotionScene
Basic Example (2/3) Layout MotionScene
Basic Example (3/3) Layout MotionScene
Custom Attribute Layout MotionScene
ImageFilterView (1/2) Layout MotionScene
ImageFilterView (2/2) Layout MotionScene
Keyframe Position (1/3) Layout MotionScene
Keyframe Interpolation (2/3) Layout MotionScene
Keyframe Cycle (3/3) Layout MotionScene
CoordinatorLayout Example (1/3) Layout MotionScene
CoordinatorLayout Example (2/3) Layout MotionScene
CoordinatorLayout Example (3/3) Layout MotionScene
DrawerLayout Example (1/2) Layout MotionScene
DrawerLayout Example (2/2) Layout Content
Menu
Side Panel Example Layout MotionScene
Parallax Example Layout MotionScene
ViewPager Example Layout MotionScene
ViewPager Lottie Example Layout MotionScene
Complex Motion Example (1/4) Layout MotionScene
Complex Motion Example (2/4) Layout MotionScene
Complex Motion Example (3/4) Layout MotionScene
Complex Motion Example (4/4) N/A Layout MotionScene
Fragment Transition Example (1/2) Layout MotionScene
Fragment Transition Example (2/2) Layout MotionScene
YouTube like motion Example Layout MotionScene
Example using KeyTrigger Layout MotionScene
Example using Multi State Layout MotionScene

ConstraintLayout samples screenshots

Constraint Set Example Advanced Chains Example

Support

If you've found an error in this sample, please file an issue: https://github.com/android/views-widgets/issues

To learn more about ConstraintLayout checkout the Constraint Layout Training Guide

Patches are encouraged, and may be submitted by forking this project and submitting a pull request through GitHub. Please see the contributing guidelines for more details.