{"id":16965285,"url":"https://github.com/hossain-khan/android-constraint-layout-cheatsheet","last_synced_at":"2026-02-10T07:30:17.461Z","repository":{"id":69331436,"uuid":"131503710","full_name":"hossain-khan/android-constraint-layout-cheatsheet","owner":"hossain-khan","description":"A demo application for Android ConstraintLayout with various usage with sample code.","archived":true,"fork":false,"pushed_at":"2024-06-16T15:25:19.000Z","size":17972,"stargazers_count":32,"open_issues_count":4,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-27T12:46:58.548Z","etag":null,"topics":["android","android-demo","cheat-sheets","cheatsheet","constraint-layout","constraintlayout"],"latest_commit_sha":null,"homepage":"https://developer.android.com/reference/android/support/constraint/ConstraintLayout","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hossain-khan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-29T14:57:39.000Z","updated_at":"2024-08-24T15:50:00.000Z","dependencies_parsed_at":"2023-03-15T06:00:52.663Z","dependency_job_id":null,"html_url":"https://github.com/hossain-khan/android-constraint-layout-cheatsheet","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hossain-khan%2Fandroid-constraint-layout-cheatsheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hossain-khan%2Fandroid-constraint-layout-cheatsheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hossain-khan%2Fandroid-constraint-layout-cheatsheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hossain-khan%2Fandroid-constraint-layout-cheatsheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hossain-khan","download_url":"https://codeload.github.com/hossain-khan/android-constraint-layout-cheatsheet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239805904,"owners_count":19700209,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-demo","cheat-sheets","cheatsheet","constraint-layout","constraintlayout"],"created_at":"2024-10-13T23:45:33.516Z","updated_at":"2026-02-10T07:30:17.409Z","avatar_url":"https://github.com/hossain-khan.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CircleCI](https://circleci.com/gh/amardeshbd/android-constraint-layout-cheatsheet.svg?style=svg)](https://circleci.com/gh/amardeshbd/android-constraint-layout-cheatsheet) [![codebeat badge](https://codebeat.co/badges/bf0c09f2-f87c-49cc-b437-ee1a975ed830)](https://codebeat.co/projects/github-com-amardeshbd-android-constraint-layout-cheatsheet-master) [![Beta Badge](https://img.shields.io/badge/Google%20Play-BETA-orange.svg)](https://play.google.com/store/apps/details?id=com.hossainkhan.android.constraintlayout) [![](https://img.shields.io/github/release/amardeshbd/android-constraint-layout-cheatsheet.svg?label=latest)](https://github.com/amardeshbd/android-constraint-layout-cheatsheet/releases) ![](https://img.shields.io/badge/AS%20Compatibility-v4.0-green.svg?logo=android)   \n\n\n# ConstraintLayout Demo\n\u003e NOTE: See [official demo](#bookmark-official-demo) project by Google for complete set of examples.\n\nA demo application for Android `ConstraintLayout` with various usage with sample code.\n\nGet the **beta** release with current snapshot!  \n[![google-play-badge](https://user-images.githubusercontent.com/99822/40590807-b714614a-61d3-11e8-9fab-a6781bc670c2.png)](https://play.google.com/store/apps/details?id=com.hossainkhan.android.constraintlayout)\n\n## :bookmark: Official Demo\nGoogle has official demo project that contains a list of layouts that showcases the various features and usage of\n[ConstraintLayout](https://developer.android.com/reference/android/support/constraint/ConstraintLayout.html) and \n[MotionLayout](https://developer.android.com/reference/android/support/constraint/motion/MotionLayout)\n\nSee https://github.com/android/views-widgets-samples/tree/master/ConstraintLayoutExamples\n\n## Proposed App Features\n* Have a grid containing different feature set of `ConstraintLayout`\n* For each feature, have different examples\n* Each example should allow you to share the code snippet or copy to clipboard\n* Each example may also contain additional resource links to blog or technical articles\n* Example may have set of sliders/toggle to change metrics dynamically to visualize.\n\nSee **[contribution](CONTRIBUTING.md)** guideline if you want to add demos or fix something.\n\n### `ConstraintLayout` features to cover \n\u003e _TIP: Jump to [layout resources](https://github.com/amardeshbd/android-constraint-layout-cheatsheet/tree/master/app/src/main/res/layout) directoy to see existing layouts._\n\n- [ ] Relative positioning\n  * [ ] Horizontal Axis: left, right, start and end sides\n  * [ ] Vertical Axis: top, bottom sides and text baseline\n- [ ] Margins\n- [x] Centering positioning and bias\n- [x] Circular positioning _(Added in 1.1)_\n- [x] Visibility behavior\n- [ ] Dimension constraints\n  * [x] Ratio\n  * [x] Percent dimension\n  * [x] Min and Max\n  * [ ] `MATCH_CONSTRAINT` dimensions _(Added in 1.1)_\n  * [ ] `WRAP_CONTENT` : enforcing constraints _(Added in 1.1)_\n  * [ ] Widgets dimension constraints\n- [ ] Chains\n  * [x] Chain Style\n  * [x] Weighted chains\n  * [ ] Margins and chains _(Added in 1.1)_\n- [x] Virtual Helpers objects 🥇\n  * [x] Guideline\n  * [x] Barrier\n  * [x] Group\n- [ ] Optimizer _(Added in 1.1)_\n- [x] Fully functional demo screens 🥇\n  * [x] Movie Details Screen\n  * [x] TED Talk Preview Screen\n  * [x] Secure PIN Entry Screen\n\n\n## Objective\nThese are the **my** objectives for this demo application.\n* To explore all the features of constraint layout\n* Learn and use material design component in the sample app\n* Learn and use the new architecture components in the sample app\n* Learn and use proper architecture for the app - likely MVVM\n* Document everything well so that future external contribution is easier\n\n## Preview\nHere is a snapshot of current progress _(This will be updated from time to time)_.  \n\n![Browse Layout Variances - Landscape Mode](https://user-images.githubusercontent.com/99822/39678468-6de62ce8-515b-11e8-9516-5203bef17d8a.png)   \n![Show Layout Screen](https://user-images.githubusercontent.com/99822/39677193-c55efc3c-5144-11e8-822f-b55664d8e5e2.png) ![Complete Demo - Moview Details](https://user-images.githubusercontent.com/99822/56074662-80d4b280-5d84-11e9-83a5-4c6440662359.png) ![Complete Demo - TED Talk](https://user-images.githubusercontent.com/99822/58756502-b6199900-84c7-11e9-9b57-34455a1633cf.png) ![External Learning Resources](https://user-images.githubusercontent.com/99822/59073743-6dcaf400-8896-11e9-9a97-84d3ee384dee.png)\n\n\n### Screencast\n![screencast](https://user-images.githubusercontent.com/99822/55640296-50e04a80-5799-11e9-9209-01b99e7ddd52.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhossain-khan%2Fandroid-constraint-layout-cheatsheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhossain-khan%2Fandroid-constraint-layout-cheatsheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhossain-khan%2Fandroid-constraint-layout-cheatsheet/lists"}