{"id":14108731,"url":"https://github.com/androidx/constraintlayout","last_synced_at":"2025-09-02T14:30:41.490Z","repository":{"id":37067622,"uuid":"212409034","full_name":"androidx/constraintlayout","owner":"androidx","description":"ConstraintLayout is an Android layout component which allows you to position and size widgets in a flexible way","archived":true,"fork":false,"pushed_at":"2023-10-24T22:10:06.000Z","size":36470,"stargazers_count":1078,"open_issues_count":109,"forks_count":175,"subscribers_count":37,"default_branch":"main","last_synced_at":"2025-02-24T01:38:24.029Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/androidx.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}},"created_at":"2019-10-02T18:08:50.000Z","updated_at":"2025-02-20T20:50:02.000Z","dependencies_parsed_at":"2022-07-09T11:00:27.617Z","dependency_job_id":"bbc725f1-7137-42af-995c-546e29e5f90c","html_url":"https://github.com/androidx/constraintlayout","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/androidx/constraintlayout","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/androidx%2Fconstraintlayout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/androidx%2Fconstraintlayout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/androidx%2Fconstraintlayout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/androidx%2Fconstraintlayout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/androidx","download_url":"https://codeload.github.com/androidx/constraintlayout/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/androidx%2Fconstraintlayout/sbom","scorecard":{"id":194778,"data":{"date":"2025-08-11","repo":{"name":"github.com/androidx/constraintlayout","commit":"9cd4b5a4079a14175f91dc897abd83270799364a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":1,"reason":"Found 2/16 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/core.yml:1","Warn: no topLevel permission defined: .github/workflows/experiment-calculator.yml:1","Warn: no topLevel permission defined: .github/workflows/experiment-foldable.yaml:1","Warn: no topLevel permission defined: .github/workflows/experiment-motionlayout.yaml:1","Warn: no topLevel permission defined: .github/workflows/experiment-viewtransition.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/androidx/.github/SECURITY.md:1","Info: Found linked content: github.com/androidx/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/androidx/.github/SECURITY.md:1","Info: Found text in security policy: github.com/androidx/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Binary-Artifacts","score":0,"reason":"binaries present in source code","details":["Warn: binary detected: constraintlayout/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: demoProjects/ComposeAnimatedDragAndDrop/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: demoProjects/ComposeConstraintLayoutDemo/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: demoProjects/ComposeDemos/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: demoProjects/ComposeGraph3d/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: demoProjects/ComposeMail/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: demoProjects/Drag2D/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: demoProjects/Drag2DCompose/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: demoProjects/ExampleComposeGrid/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: demoProjects/ExamplesComposeConstraintLayout/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: demoProjects/ExamplesComposeMotionLayout/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: demoProjects/ExamplesMotionLayout/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: demoProjects/ExamplesRecyclerView/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: demoProjects/MotionDemos/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: demoProjects/OpenGLEsGraph3D/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: demoProjects/ViewsGraph3d/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: desktop/CycleEditor/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: desktop/ValidationTool/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: projects/CalculatorExperiments/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: projects/CameraExperiments/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: projects/CarouselExperiments/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: projects/ComposeConstraintLayout/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: projects/ConstraintLayoutValidation/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: projects/DeveloperTemplate/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: projects/FoldableExperiments/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: projects/GridExperiments/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: projects/MotionLayoutExperiments/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: projects/MotionLayoutVerification/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: projects/ViewTransitionExperiments/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: toolsAndroid/CLAnalyst/gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/core.yml:112: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/core.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/core.yml:114: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/core.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/core.yml:116: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/core.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/core.yml:122: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/core.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/core.yml:130: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/core.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/core.yml:140: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/core.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/core.yml:151: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/core.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/core.yml:163: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/core.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/core.yml:170: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/core.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/core.yml:181: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/core.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/core.yml:183: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/core.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/core.yml:185: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/core.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/core.yml:191: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/core.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/core.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/core.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/core.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/core.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/core.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/core.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/core.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/core.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/core.yml:75: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/core.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/core.yml:77: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/core.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/core.yml:79: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/core.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/core.yml:85: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/core.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/core.yml:97: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/core.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/experiment-calculator.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/experiment-calculator.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/experiment-calculator.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/experiment-calculator.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/experiment-calculator.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/experiment-calculator.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/experiment-calculator.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/experiment-calculator.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/experiment-foldable.yaml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/experiment-foldable.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/experiment-foldable.yaml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/experiment-foldable.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/experiment-foldable.yaml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/experiment-foldable.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/experiment-foldable.yaml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/experiment-foldable.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/experiment-motionlayout.yaml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/experiment-motionlayout.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/experiment-motionlayout.yaml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/experiment-motionlayout.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/experiment-motionlayout.yaml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/experiment-motionlayout.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/experiment-motionlayout.yaml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/experiment-motionlayout.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/experiment-viewtransition.yaml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/experiment-viewtransition.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/experiment-viewtransition.yaml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/experiment-viewtransition.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/experiment-viewtransition.yaml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/experiment-viewtransition.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/experiment-viewtransition.yaml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/androidx/constraintlayout/experiment-viewtransition.yaml/main?enable=pin","Info:   0 out of  26 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  12 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T21:36:56.985Z","repository_id":37067622,"created_at":"2025-08-16T21:36:56.985Z","updated_at":"2025-08-16T21:36:56.985Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273297463,"owners_count":25080405,"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","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-08-14T10:01:43.010Z","updated_at":"2025-09-02T14:30:36.466Z","avatar_url":"https://github.com/androidx.png","language":"Java","readme":"# ConstraintLayout 🗜️📏\n\n# Sample Code\n* [MotionLayout Compose Examples](https://github.com/androidx/constraintlayout/tree/main/demoProjects/ExamplesComposeMotionLayout#motionlayout-for-compose-examples) JSON \u0026 **DSL** samples\n* [ConstraintLayout Compose Examples](https://github.com/androidx/constraintlayout/tree/main/demoProjects/ExamplesComposeConstraintLayout#constraintlayout-for-compose-examples)\n* [MotionLayout \u0026 RecyclerView Examples](https://github.com/androidx/constraintlayout/tree/main/demoProjects/ExamplesRecyclerView#motionlayout-recyclerview-sample)\n* [Compose Grid Helper Examples](https://github.com/androidx/constraintlayout/tree/main/demoProjects/ExampleComposeGrid#grid-for-compose-examples)\n\n![core](https://github.com/androidx/constraintlayout/workflows/core/badge.svg) [![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0)\n\n\u003cimg src=\"https://img.shields.io/badge/stable-2.1.4-blue\"/\u003e\u003cimg src=\"https://img.shields.io/badge/compose-1.0.1-blue\"/\u003e \n\n\nConstraintLayout is a layout manager for Android which allows you to position and size widgets in a flexible way. It's available for both the Android view system and Jetpack Compose.\n\nThis repository contains the core Java engine, Android library, validation tools, and experiments.\n\n[Android Reference Docs](https://developer.android.com/reference/androidx/constraintlayout/widget/ConstraintLayout)\n\n[Reference Docs for Compose](https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/package-summary)\n\nHave a question that isn't answered here? Try StackOverflow for [ConstraintLayout](https://stackoverflow.com/questions/tagged/android-constraintlayout) or [MotionLayout](https://stackoverflow.com/questions/tagged/android-motionlayout).\n\n## Using ConstraintLayout\n\n### ⬇️ Installation\n\nAdd the Gradle dependency:\n\nYou need to make sure you have the Google repository included in the `build.gradle` file in the root of your project:\n\n```gradle\nrepositories {\n    google()\n}\n```\n\nNext add a dependency in the `build.gradle` file of your Gradle module.\n\nIf using ConstraintLayout with the Android View system, add:\n\n```gradle\ndependencies {\n\n    implementation(\"androidx.constraintlayout:constraintlayout:2.1.4\")\n\n}\n```\n\nIf using ConstraintLayout with Jetpack Compose, add:\n\n```gradle\ndependencies {\n\n    implementation(\"androidx.constraintlayout:constraintlayout-compose:1.0.1\")\n\n}\n```\n\nAdditionally, for MotionLayout with Jetpack Compose, you require to opt-in to ExprimentalMotionApi:\n```gradle\ntasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {\n    kotlinOptions {\n        // For Kotlin 1.6.0+\n        freeCompilerArgs += \"-opt-in=androidx.constraintlayout.compose.ExperimentalMotionApi\"\n        \n        // For older than Kotlin 1.6.0\n        freeCompilerArgs += \"-Xopt-in=androidx.constraintlayout.compose.ExperimentalMotionApi\"\n    }\n}\n\n```\n\n### 🎒🥾 Requirements\n\n- AndroidX (Your `gradle.properties` **must** include `android.useAndroidX=true`)\n- Min SDK 14+\n- Java 8+\n\n### ✨🤩📱 Key Features\n\nHello World\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003candroidx.constraintlayout.widget.ConstraintLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    \u003e\n\n    \u003cTextView\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"Hello World!\"\n        app:layout_constraintTop_toTopOf=\"parent\"\n        app:layout_constraintStart_toStartOf=\"parent\"\n        app:layout_constraintEnd_toEndOf=\"parent\"\n        app:layout_constraintBottom_toBottomOf=\"parent\" /\u003e\n\n\u003c/androidx.constraintlayout.widget.ConstraintLayout\u003e\n```\n\n📐 [Aspect Ratio](https://developer.android.com/reference/androidx/constraintlayout/widget/ConstraintLayout#ratio) defines one dimension of a widget as a ratio of the other one. If both `width` and `height` are set to `0dp` the system sets the largest dimensions that satisfy all constraints while maintaining the aspect ratio.\n\n```xml\n\u003cImageView\n    android:id=\"@+id/image_1\"\n    android:layout_width=\"0dp\"\n    android:layout_height=\"0dp\"\n    app:layout_constraintDimensionRatio=\"1:1\"\n    app:layout_constraintEnd_toEndOf=\"parent\"\n    app:layout_constraintStart_toStartOf=\"parent\"\n    app:layout_constraintTop_toTopOf=\"parent\"\n    app:layout_constraintBottom_toBottomOf=\"parent\"\n    tools:src=\"@tools:sample/avatars\" /\u003e\n```\n\n⛓️ [Chains](https://developer.android.com/reference/androidx/constraintlayout/widget/ConstraintLayout#Chains) provide group-like behavior in a single axis (horizontally or vertically). The other axis can be constrained independently.\n\n🦮 [Guidelines](https://developer.android.com/reference/androidx/constraintlayout/widget/Guideline) allow reactive layout behavior with fixed or percentage based positioning for multiple widgets.\n\n```xml\n\u003candroidx.constraintlayout.widget.Guideline\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"\n    android:id=\"@+id/guideline\"\n    app:layout_constraintGuide_begin=\"100dp\"\n    android:orientation=\"vertical\"/\u003e\n```\n\n🚧 [Barrier](https://developer.android.com/reference/androidx/constraintlayout/widget/Barrier) references multiple widgets to create a virtual guideline based on the most extreme widget on the specified side.\n\n```xml\n\u003candroidx.constraintlayout.widget.Barrier\n    android:id=\"@+id/barrier\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"\n    app:barrierDirection=\"start\"\n    app:constraint_referenced_ids=\"button1,button2\" /\u003e\n```\n\n☂️ [Group](https://developer.android.com/reference/androidx/constraintlayout/widget/Group) controls the visibility of a set of referenced widgets.\n\n```xml\n\u003candroidx.constraintlayout.widget.Group\n    android:id=\"@+id/group\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"\n    android:visibility=\"visible\"\n    app:constraint_referenced_ids=\"button4,button9\" /\u003e\n```\n\n💫 [MotionLayout](https://developer.android.com/reference/androidx/constraintlayout/motion/widget/MotionLayout) a subclass of ConstraintLayout that supports transitions between constraint sets defined in MotionScenes. See [projects/MotionLayoutExperiments](projects/MotionLayoutExperiments) for examples.\n\n🌊 [Flow](https://developer.android.com/reference/androidx/constraintlayout/helper/widget/Flow) is a VirtualLayout that allows positioning of referenced widgets horizontally or vertically similar to a Chain. If the referenced elements do not fit within the given bounds it has the ability to wrap them and create multiple chains. See [projects/CalculatorExperiments](projects/CalculatorExperiments) for examples.\n\n🌀 [CircularFlow](https://developer.android.com/reference/androidx/constraintlayout/helper/widget/CircularFlow) is a VirtualLayout that easily organize objects in a circular pattern. See [projects/CarouselExperiments](projects/CarouselExperiments) for basic examples and [projects/MotionLayoutVerification](projects/MotionLayoutVerification) for examples with MotionLayout.\n```xml\n\u003candroidx.constraintlayout.helper.widget.CircularFlow\n   android:id=\"@+id/circularFlow\"\n   android:layout_width=\"match_parent\"\n   android:layout_height=\"match_parent\"\n   app:circularflow_angles=\"0,40,80,120\"\n   app:circularflow_radiusInDP=\"90,100,110,120\"\n   app:circularflow_viewCenter=\"@+id/view1\"\n   app:constraint_referenced_ids=\"view2,view3,view4,view5\" /\u003e\n```\n\n## 📚👩‍🏫 Learning Materials\n\n- [Build a Responsive UI with ConstraintLayout](https://developer.android.com/training/constraint-layout)\n- [ConstraintLayout Codelab](https://codelabs.developers.google.com/codelabs/constraint-layout/index.html#0)\n- Introduction to MotionLayout [Part I](https://medium.com/google-developers/introduction-to-motionlayout-part-i-29208674b10d) | [Part II](https://medium.com/google-developers/introduction-to-motionlayout-part-ii-a31acc084f59) | [Part III](https://medium.com/google-developers/introduction-to-motionlayout-part-iii-47cd64d51a5) | [Part IV](https://medium.com/google-developers/defining-motion-paths-in-motionlayout-6095b874d37)\n- [MotionLayout Codelab](https://codelabs.developers.google.com/codelabs/motion-layout#0)\n\n## 🤝 Contributing\n\nIf you'd like to get involved and contribute please read [CONTRIBUTING](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\n## 💻 Authors\n\n- **John Hoford** : MotionLayout ([jafu888](https://github.com/jafu888))\n- **Nicolas Roard** : ConstraintLayout ([camaelon](https://github.com/camaelon))\n\nSee also the list of [contributors](https://github.com/androidx/constraintlayout/graphs/contributors) who participated in this project.\n\n## 🔖 License\n\nThis project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details\n","funding_links":[],"categories":["Java"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandroidx%2Fconstraintlayout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandroidx%2Fconstraintlayout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandroidx%2Fconstraintlayout/lists"}