/android-ConstraintLayoutExamples

Repository of examples that showcase the various features of ConstraintLayout

Primary LanguageJavaApache License 2.0Apache-2.0

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+
  • Constaint Layout library 2.0.0-alpha3+

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/2) Layout MotionScene
Basic Example (2/2) 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/googlesamples/android-ConstraintLayoutExamples/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.

License

Copyright 2017 The Android Open Source Project, Inc.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.