Constraintlayout

상대 위치에 따라 유연한 방식으로 위젯의 위치와 크기를 지정합니다.

이 표에는 androidx.constraintlayout 그룹의 모든 아티팩트가 나열되어 있습니다.

아티팩트 안정화 버전 출시 후보 버전 베타 버전 알파 버전
constraintlayout 2.1.4 - - 2.2.0-alpha13
constraintlayout-compose 1.0.1 - - 1.1.0-alpha13
constraintlayout-core 1.0.4 - - 1.1.0-alpha13

종속 항목 선언

ConstraintLayout의 종속 항목을 추가하려면 프로젝트에 Google Maven 저장소를 추가해야 합니다. 자세한 내용은 Google Maven 저장소를 읽어보세요.

다음과 같이 앱 또는 모듈의 build.gradle 파일에 필요한 아티팩트의 종속 항목을 추가합니다.

Groovy

dependencies {
    implementation "androidx.constraintlayout:constraintlayout:2.2.0-alpha13"
    // To use constraintlayout in compose
    implementation "androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha13"
}

Kotlin

dependencies {
    implementation("androidx.constraintlayout:constraintlayout:2.2.0-alpha13")
    // To use constraintlayout in compose
    implementation("androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha13")
}

종속 항목에 관한 자세한 내용은 빌드 종속 항목 추가를 참고하세요.

의견

제출하신 의견은 Jetpack을 개선하는 데 도움이 됩니다. 새로운 문제를 발견하거나 라이브러리 개선을 위한 아이디어가 있다면 Google에 알려 주세요. 새 문제를 제출하기 전에 이 라이브러리의 기존 문제를 살펴보시기 바랍니다. 별표 버튼을 클릭하여 기존 문제에 투표할 수 있습니다.

새로운 문제 제출하기

자세한 내용은 Issue Tracker 문서를 참고하세요.

ConstraintLayout-compose 및 ConstraintLayout-Core 1.1

버전 1.1.0-alpha13

2023년 10월 4일

androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha13, androidx.constraintlayout:constraintlayout-compose-android:1.1.0-alpha13, androidx.constraintlayout:constraintlayout-core:1.1.0-alpha13은 변경사항 없이 출시되었습니다. 버전 1.1.0-alpha13에 포함된 커밋을 확인하세요.

  • 이 버전을 사용하면 androidx.constraintlayout 라이브러리가 최신 Compose 버전과 ABI 호환될 수 있습니다.

버전 1.1.0-alpha12

2023년 8월 9일

androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha12, androidx.constraintlayout:constraintlayout-compose-android:1.1.0-alpha12, androidx.constraintlayout:constraintlayout-core:1.1.0-alpha12이 출시되었습니다. 버전 1.1.0-alpha12에 포함된 커밋을 확인하세요.

API 변경사항

  • 전환 DSL에 LayoutScopeMarker를 추가했습니다. 추가했습니다. (If54ce)

버전 1.1.0-alpha11

2023년 7월 26일

androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha11, androidx.constraintlayout:constraintlayout-compose-android:1.1.0-alpha11, androidx.constraintlayout:constraintlayout-core:1.1.0-alpha11이 출시되었습니다. 버전 1.1.0-alpha11에 포함된 커밋을 확인하세요.

새로운 기능

  • 이제 InvalidationStrategy를 제공하여 MotionLayout에서 무효화를 최적화할 수 있습니다. 일반적으로 이는 실적 저하의 원인입니다. 추가했습니다. (Iada0c)
  • 이제 인라인 수정자 DSL (Modifier.constrainAs)과 함께 ConstraintLayout를 사용할 때 animateChanges = true를 사용할 수 있습니다. 제약 조건 DSL의 변경이 완료될 때마다 ConstraintLayout는 자동으로 새 상태로 애니메이션 처리합니다. 추가했습니다. (I9abf1)
  • OnSwipe에서 limitBoundsTo의 기능을 사용 설정했습니다. 추가했습니다. (I56522)

API 변경사항

  • TransitionScope.staggered에서 TransitionScope.maxStaggerDelay으로 이름이 변경되었습니다. 추가했습니다. (I0fd2d)

버그 수정

  • OnSwipedragScale 매개변수가 작동하지 않는 문제를 수정했습니다. 추가했습니다. (8bef26)
  • MotionScenecustomColor가 투명한 색상에서 제대로 작동하지 않는 문제를 수정했습니다. 추가했습니다. (81b2ac)
  • OnSwipe가 중지되었을 때 제대로 알리지 않는 문제를 수정했습니다. touchUp의 초기 속도 계산도 수정했습니다. 추가했습니다. (Ia5f6f)
  • ConstraintLayout 컴포저블 및 Constraintset의 KDoc를 업데이트했습니다. 추가했습니다. (3bfe63)

버전 1.1.0-alpha10

2023년 5월 24일

androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha10, androidx.constraintlayout:constraintlayout-compose-android:1.1.0-alpha10, androidx.constraintlayout:constraintlayout-core:1.1.0-alpha10이 출시되었습니다. 버전 1.1.0-alpha10에 포함된 커밋을 확인하세요.

API 변경사항

  • MotionLayout API가 더 이상 실험용이 아닙니다. MotionLayout의 안정적인 초기 API 세트를 나타냅니다. 추가했습니다. (I288f4)
  • MotionLayoutState을 삭제했습니다. 추가했습니다. (Id3ac1)
  • 이제 시각적 디버깅에 DebugFlags(DebugFlags(showBounds = true))를 사용할 수 있습니다. 추가했습니다. (Ic714b)
  • 확장 변수 Dp.asDimension을(를) 메서드(Dp.asDimension())로 변경했습니다. 추가했습니다. (I2d6ef)
  • 이제 MotionLayout DSL에서 시차를 두고 지원됩니다. TransitionScope.staggered로 최대 지연을 정의합니다. MotionSceneScope 내에서 ConstrainScope.staggeredWeight를 사용하여 맞춤 시차를 가져올 수도 있습니다. 추가했습니다. (I70275)
  • 그리드 도우미에 두 가지 변경사항이 있습니다. 1. paddingLeftpaddingRight를 각각 paddingStartpaddingEnd로, 2. gridSpansgridSkip의 형식을 Span 및 Skip 객체의 배열로 업데이트하여 더 구조를 만듭니다. 추가했습니다. (Idd1eb)

버전 1.1.0-alpha09

2023년 3월 22일

androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha09androidx.constraintlayout:constraintlayout-core:1.1.0-alpha09가 출시되었습니다. 버전 1.1.0-alpha09에 포함된 커밋을 확인하세요.

API 변경사항

  • 이제 Modifier.intermediateLayout에 명시적인 LookaheadScope가 필요하지 않습니다. intermediateLayout의 측정 블록에는 수신기로 IntermediateMeasureScope가 있어 편리한 CoroutineScope, LookaheadScope, MeasureScope를 제공합니다.
  • LookaheadLayout를 더 이상 레이아웃이 아닌 LookaheadScope로 대체했습니다. 이를 통해 LookaheadScope의 하위 콘텐츠를 상위 요소의 MeasurePolicy에서 직접 제어할 수 있습니다. 추가했습니다. (Ibe2e5)
  • 이제 Easing.Cubic()가 오버슈트 매개변수를 사용할 수 있습니다. 추가했습니다. (I2d826)

버전 1.1.0-alpha08

2023년 3월 8일

androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha08androidx.constraintlayout:constraintlayout-core:1.1.0-alpha08가 출시되었습니다. 버전 1.1.0-alpha08에 포함된 커밋을 확인하세요.

새로운 기능

  • 일반적인 패턴으로 인해 예기치 않은 동작이 발생할 수 있는 경우에 Dimension.percent(1f)LayoutReference.withChainParams()의 사용을 제안하기 위해 린트 검사가 추가되었습니다. 추가했습니다. (I62eb0, I03060)

API 변경사항

  • Compose에서 그리드 도우미에 ReverseSpanDirectionSpansOrderFirst 플래그를 사용 설정합니다.
    1. ReverseSpanDirection: 스팬/건너뛰기의 너비와 높이 사양을 반대로 합니다.
    2. SpansOrderFirst: 스팬이 위젯의 순서를 따릅니다. 추가했습니다. (I6ad50)
  • Modifier.onStartEndBoundsChanged(...)를 사용하여 애니메이션의 영향을 받지 않는 MotionLayout에서 컴포저블의 로컬 경계를 가져옵니다. DragAndDrop와 같은 애니메이션도 트리거할 수 있는 레이아웃 정보가 필요한 모든 UI 상호작용에 유용합니다. 추가했습니다. (I6b5f9)
  • Compose에서 그리드 도우미의 건너뛰기 및 스팬을 사용 설정합니다. (I917b6)

버그 수정

  • 변환 속성이 예상 값을 적용하지 않는 문제를 수정했습니다. 추가했습니다. (I961cd)

버전 1.1.0-alpha07

2023년 2월 8일

androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha07androidx.constraintlayout:constraintlayout-core:1.1.0-alpha07이 출시되었습니다. 버전 1.1.0-alpha07에 포함된 커밋을 확인하세요.

새로운 기능

  • DSL을 사용하여 Compose에서 그리드 도우미를 사용 설정하는 새 API를 추가했습니다. (I1143b)

버그 수정

  • Flow의 Wrap.Chain이 지정된 maxElement 매개변수에 올바르게 배치되지 않는 문제를 수정했습니다. (e1f2ed3)
  • MotionLayout(motionScene: MotionScene, progress: Float, transitionName: String)을 통해 전환을 변경할 때 start ConstraintSet가 업데이트되지 않는 문제를 수정했습니다. (17ffff1)
  • ConstraintSet(extendConstraintSet: ConstraintSet, description: ConstraintSetScope.() -> Unit)을 통해 제약 조건을 상속받을 때 ConstraintSet가 일부 변경사항을 반영하지 않는 문제를 수정했습니다. (740804b)

버전 1.1.0-alpha06

2023년 1월 25일

androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha06androidx.constraintlayout:constraintlayout-core:1.1.0-alpha06이 출시되었습니다. 버전 1.1.0-alpha06에 포함된 커밋을 확인하세요.

새로운 기능

  • 컴포저블을 2D 그리드에 배치할 수 있도록 Compose에서 JSON 표현으로 그리드 도우미를 사용 설정하는 새 API를 추가했습니다. (I968ad)

API 변경사항

  • 원호 위로 모드 Arc.Above 및 아래로 모드 Arc.Below 방향 독립적 원호 모드를 MotionLayout에 추가했습니다. (I184a9)
  • 이제 기준 앵커를 상단/하단 앵커로 제한할 수 있으며 그 반대도 가능합니다. (I54628)
  • MotionLayoutScope#motionProperties(파생 포함)의 이름을 MotionLayoutScope#customProperties로 변경했습니다. 이는 맞춤 속성을 설정할 때와 일관성을 유지하기 위한 것입니다. (Ib34c9)
  • 이제 ConstraintSetMotionScene: val (box, text, button) = createRefsFor("box", "text","button")에서 여러 참조를 만들 수 있습니다. constrain(box, button, text)를 사용하여 여러 요소에 제약조건을 적용합니다. 이제 ConstrainScope 내에서 Dp.asDimension: width = 10.dp.asDimension을 사용하여 직관적으로 고정 크기를 설정할 수 있습니다. (I021ec, Ia0960)
  • MotionScene()Transition() 메서드는 이제 구성 불가능한 함수입니다. 이제 이러한 함수의 객체(ConstraintSet 포함)가 서로 올바르게 비교됩니다. 이제 리컴포지션 시 변경된 속성이 있는 한 ConstraintLayoutanimateChanges = true는 하나의 ConstraintSet 참조로만 사용할 수 있습니다. (I7d22e)

버그 수정

  • 도우미가 변경되었을 때 ConstraintLayout이 항상 불필요한 추가 리컴포지션을 트리거하던 문제가 수정되었습니다. (Id83ad, b/222093277)
  • 내장 기능을 ConstraintLayoutMotionLayout과 함께 사용할 때 발생하던 동작을 수정했습니다. (I487ae, b/220527863)
  • 콘텐츠 변경 시 다시 측정할 수 없던 문제를 수정했습니다. (Ibfe8a, b/219091179)

버전 1.1.0-alpha05

2022년 12월 7일

androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha05androidx.constraintlayout:constraintlayout-core:1.1.0-alpha05가 출시되었습니다. 버전 1.1.0-alpha05에 포함된 커밋을 확인하세요.

새로운 기능

  • DSL에서 맞춤 KeyAttributes 지원(b94e748)
  • ConstrainScope의 편향 속성 표시(32625d0)
  • 체인에서 맞춤 매개변수 지원(72a2e9e)
  • Compose에 MotionLayout의 Macrobenchmark 테스트 추가(36f43bc)
  • 이전 버전의 Compose 변경사항에 관한 자세한 내용은 위키 페이지를 참고하세요.

API 변경사항

  • addConstraintSetaddTransition 매개변수 뒤집기(152facc)

버그 수정

버전 1.1.0-alpha01

2022년 5월 20일

androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha01가 출시되었습니다.

MotionLayout API는 실험용이므로 선택해야 합니다.

자세한 내용은 GitHub의 Compose 1.1.0-alpha01의 새로운 기능을 참고하세요.

버전 2.2

버전 2.2.0-alpha13

2023년 10월 4일

androidx.constraintlayout:constraintlayout:2.2.0-alpha13은 변경사항 없이 출시되었습니다. 버전 2.2.0-alpha13에 포함된 커밋을 확인하세요.

버전 2.2.0-alpha12

2023년 8월 9일

androidx.constraintlayout:constraintlayout:2.2.0-alpha12가 출시되었습니다. 버전 2.2.0-alpha12에 포함된 커밋을 확인하세요.

버전 2.2.0-alpha11

2023년 7월 26일

androidx.constraintlayout:constraintlayout:2.2.0-alpha11가 출시되었습니다. 버전 2.2.0-alpha11에 포함된 커밋을 확인하세요.

API 변경사항

  • 개발자가 프로그래매틱 방식으로 mInfiniteCarousel 값을 설정할 수 있는 setter 메서드를 추가합니다. (I0a8ca)

버전 2.2.0-alpha10

2023년 5월 24일

androidx.constraintlayout:constraintlayout:2.2.0-alpha10가 출시되었습니다. 버전 2.2.0-alpha10에 포함된 커밋을 확인하세요.

버그 수정

  • MotionLayout 문서의 깨진 링크를 수정했습니다. (51cbe88)

버전 2.2.0-alpha09

2023년 3월 22일

androidx.constraintlayout:constraintlayout:2.2.0-alpha09가 출시되었습니다. 버전 2.2.0-alpha09에 포함된 커밋을 확인하세요.

버전 2.2.0-alpha08

2023년 3월 8일

androidx.constraintlayout:constraintlayout:2.2.0-alpha08가 출시되었습니다. 버전 2.2.0-alpha08에 포함된 커밋을 확인하세요.

버전 2.2.0-alpha07

2023년 2월 8일

androidx.constraintlayout:constraintlayout:2.2.0-alpha07가 출시되었습니다. 버전 2.2.0-alpha07에 포함된 커밋을 확인하세요.

버그 수정

  • ConstraintLayout 페이지 콘텐츠 누락 문제를 수정했습니다. (I82e25)

버전 2.2.0-alpha05

2022년 12월 7일

androidx.constraintlayout:constraintlayout:2.2.0-alpha05가 출시되었습니다. 버전 2.2.0-alpha05에 포함된 커밋을 확인하세요.

버그 수정

  • 뷰 캐러셀의 누수 문제 해결(eb67b82)

버전 2.2.0-alpha01

2022년 5월 20일

androidx.constraintlayout:constraintlayout:2.2.0-alpha01가 출시되었습니다.

새로운 Grid 도우미의 미리보기가 포함되어 있습니다.

자세한 내용은 GitHub의 2.2.0-alpha01의 새로운 기능을 참고하세요.

ConstraintLayout-compose 1.0

ConstraintLayout-compose 1.0은 Jetpack Compose에서 ConstraintLayout 기능을 제공합니다.

버전 1.0.1

2022년 5월 20일

androidx.constraintlayout:constraintlayout-compose:1.0.1가 출시되었습니다.

MotionLayout API는 실험용이므로 선택해야 합니다.

자세한 내용은 GitHub의 Compose 1.0.1의 새로운 기능을 참고하세요.

버전 1.0.0

2022년 1월 13일

androidx.constraintlayout:constraintlayout-compose:1.0.0가 출시되었습니다.

MotionLayout API는 현재 실험용이므로 선택해야 합니다.

자세한 내용은 GitHub 도움말 1.0(Compose)의 새로운 기능을 참고하세요.

버전 1.0.0-rc02

2021년 11월 16일

androidx.constraintlayout:constraintlayout-compose:1.0.0-rc02가 출시되었습니다.

자세한 내용은 GitHub 도움말 1.0(Compose)의 새로운 기능을 참고하세요.

버전 1.0.0-rc01

2021년 9월 27일

androidx.constraintlayout:constraintlayout-compose:1.0.0-rc01가 출시되었습니다.

이 버전은 두 번째 베타 버전입니다. 이 버전은 기능이 완전한 것으로 간주되며 Compose에 ConstraintLayoutMotionLayout을 제공합니다.

자세한 내용은 GitHub 도움말 1.0(Compose)의 새로운 기능을 참고하세요.

버전 1.0.0-beta02

2021년 7월 30일

androidx.constraintlayout:constraintlayout-compose:1.0.0-beta02가 출시되었습니다.

이 버전은 두 번째 베타 버전입니다. 이 버전은 기능이 완전한 것으로 간주되며 Compose에 ConstraintLayoutMotionLayout을 제공합니다.

자세한 내용은 GitHub 도움말 1.0(Compose)의 새로운 기능을 참고하세요.

버전 1.0.0-beta01

2021년 7월 22일

androidx.constraintlayout:constraintlayout-compose:1.0.0-beta01가 출시되었습니다.

이 버전은 첫 번째 베타 버전입니다. 이 버전은 기능이 완전한 것으로 간주되며 Compose에 ConstraintLayoutMotionLayout을 제공합니다.

자세한 내용은 GitHub 도움말 1.0(Compose)의 새로운 기능을 참고하세요.

버전 1.0.0-alpha07

2021년 5월 18일

androidx.constraintlayout:constraintlayout-compose:1.0.0-alpha07가 출시되었습니다.

  • Compose 버전 1.0.0-beta07과 호환되도록 업데이트되었습니다.

버전 1.0.0-alpha06

2021년 5월 4일

androidx.constraintlayout:constraintlayout-compose:1.0.0-alpha06가 출시되었습니다.

  • Compose 최적화: Constraintlayout 인라인 컴포저블(#193)
  • Compose에서 재측정 최소화(#210)

버전 1.0.0-alpha05

2021년 3월 15일

androidx.constraintlayout:constraintlayout-compose:1.0.0-alpha05가 출시되었습니다.

  • 최적화 엔진에 관한 수정사항이 포함됩니다. (b/182657720)
  • ConstraintLayout 컴포저블에 optimizationLevel 매개변수를 추가합니다.

버전 1.0.0-alpha04

2021년 3월 11일

androidx.constraintlayout:constraintlayout-compose:1.0.0-alpha04가 출시되었습니다.

최신 constraintlayout-core 엔진을 사용하는 업데이트입니다.

버전 1.0.0-alpha03

2021년 2월 24일

androidx.constraintlayout:constraintlayout-compose:1.0.0-alpha03가 출시되었습니다.

Jetpack Compose beta01 버전에 관한 버전 업데이트입니다.

버전 1.0.0-alpha02

2021년 2월 10일

androidx.constraintlayout:constraintlayout-compose:1.0.0-alpha02가 출시되었습니다.

Jetpack Compose alpha12 버전에 관한 버전 업데이트입니다.

버전 1.0.0-alpha01

2021년 2월 2일

androidx.constraintlayout:constraintlayout-compose:1.0.0-alpha01가 출시되었습니다.

라이브러리의 첫 번째 버전으로, 제약 조건을 표현하기 위해 인라인 및 외부 DSL을 제공합니다.

버전 2.1

ConstraintLayout 2.1.0에서는 MotionLayout 및 새로운 도우미(캐러셀 등)에서 더 풍부한 기능을 제공합니다.

버전 2.1.4

2022년 5월 20일

androidx.constraintlayout:constraintlayout:2.1.4가 출시되었습니다.

자세한 내용은 GitHub의 2.1.4의 새로운 기능을 참고하세요.

버전 2.1.3

2022년 1월 13일

androidx.constraintlayout:constraintlayout:2.1.3가 출시되었습니다.

자세한 내용은 GitHub 도움말 2.1의 새로운 기능을 참고하세요.

버전 2.1.2

2021년 11월 16일

androidx.constraintlayout:constraintlayout:2.1.2가 출시되었습니다.

자세한 내용은 GitHub 도움말 2.1의 새로운 기능을 참고하세요.

버전 2.1.1

2021년 9월 27일

androidx.constraintlayout:constraintlayout:2.1.1가 출시되었습니다.

이 버전은 2.1.1의 최종 출시 버전입니다.

자세한 내용은 GitHub 도움말 2.1의 새로운 기능을 참고하세요.

버전 2.1.0

2021년 7월 30일

androidx.constraintlayout:constraintlayout:2.1.0가 출시되었습니다.

이 버전은 2.1.0의 최종 출시 버전입니다.

자세한 내용은 GitHub 도움말 2.1의 새로운 기능을 참고하세요.

버전 2.1.0-rc01

2021년 7월 22일

androidx.constraintlayout:constraintlayout:2.1.0-rc01가 출시되었습니다.

이 버전은 2.1.0의 출시 후보로, 지난 베타 버전의 사소한 개선사항과 수정사항을 제공합니다. 자세한 내용은 GitHub 도움말 2.1의 새로운 기능을 참고하세요.

버전 2.1.0-beta02

2021년 5월 4일

androidx.constraintlayout:constraintlayout:2.1.0-beta02가 출시되었습니다.

MotionLayout의 새로운 기능은 다음과 같습니다.

  • 스프링(강성, 감쇠, 질량 등)을 포함한 OnSwipe 개선 및 완료되지 않도록 설정
  • jumpToState 함수
  • Down을 터치하면 100으로 재생되고 Up을 터치하면 0으로 역전되는 ViewTransition downUp 모드

주요 수정사항은 다음과 같습니다.

  • MotionLayout의 세로 스크롤 문제 해결(#173)
  • 중첩된 MotionLayout의 성능 개선(#189)
  • MotionLayout에서 NestedScrollView로 빠른 전환(#189)
  • MotionLayout에서 ConstraintSet을 없앰(#189)
  • MotionLayout에서 downUp ViewTransitions 지원(#190)
  • 드로어블 재사용 시 ImageFilter 문제 해결(#192)
  • MotionLayout에서 스프링 지원 추가(#199)
  • CircularFlow 성능 개선(#200)
  • 파생 제약 조건/제약 조건 재정의 문제 해결(#212)

버전 2.1.0-beta01

2021년 3월 11일

androidx.constraintlayout:constraintlayout:2.1.0-beta01가 출시되었습니다.

ConstraintLayout

android:layout_width 및 android:layout_height는 호환성 문제로 인해 다시 선택사항에서 제외되었습니다.

MotionLayout

  • 전환 시 onSwipe와 onClick을 삽입 및 삭제하는 프로그래매틱 방식을 지원합니다.
  • 화면 회전을 통한 전환에 관한 실험용 지원을 제공합니다.
  • 전환의 시간 인수를 지원합니다.
  • 부울 또는 참조인 customAttribute 지원을 개선합니다.

도우미

  • 캐러셀의 특정 항목으로 애니메이션을 실행하여 이동하거나 바로 이동하는 방법을 추가했습니다.
  • 새로운 CircularFlow 도우미가 제공됩니다.

이 버전에 관한 자세한 정보는 여기수정된 버그를 참고하세요.

버전 2.1.0-alpha2

2020년 12월 17일

androidx.constraintlayout:constraintlayout:2.1.0-alpha2가 출시되었습니다.

이 두 번째 알파 버전에서는 여러 새로운 기능을 추가합니다.

ConstraintLayout

  • android:layout_width 및 android:layout_height가 이제 선택사항이며 기본 동작으로 wrap_content가 사용됩니다.
  • 새 layout_constraintWidth 및 layout_constraintHeight 속성이 크기 제약 조건을 표현합니다.
  • 제약 조건의 음수 여백을 지원합니다.
  • 기준선에서 상단까지, 기준선에서 하단까지 제약 조건을 지원합니다.
  • 기준선 여백 제약 조건을 지원합니다.
  • SharedValues로 외부 값을 ConstraintLayout에 삽입할 수 있습니다.

MotionLayout

  • 오버슈트 보간기를 지원합니다(anticipate, overshoot).
  • MotionHelper 지원을 개선했습니다.
  • ConstraintSet의 애니메이션 업데이트를 MotionLayout updateStateAnimate(id,cset,duration)에 추가합니다.
  • 값에 기반한 ViewTransition을 공유했습니다.
  • scheduleTransitonTo로 현재 전환이 완료될 때 실행할 전환을 대기열에 추가할 수 있습니다.

도우미

  • 캐러셀이 이제 무한(wrap-around) 모드를 지원합니다.
  • ReactiveGuide - SharedValue가 변경될 때 자동으로 배치되는 가이드라인입니다.
  • MotionEffect - 주어진 방향으로 이동하는 참조된 뷰에 Keyframe을 삽입합니다.
  • MotionLabel - 단일 줄 텍스트를 애니메이션 처리하는 View입니다.

이 버전에 관한 자세한 내용은 여기를 참고하세요.

버전 2.1.0-alpha1

2020년 11월 19일

androidx.constraintlayout:constraintlayout:2.1.0-alpha1가 출시되었습니다.

2.1 버전의 최초 알파 버전입니다. 다음 지원을 도입합니다.

  • 캐러셀 모션 도우미로 맞춤 캐러셀 뷰를 빌드합니다.
  • MotionLayout 장면이 포함 및 제약 조건 재정의를 지원합니다.
  • MotionLayout이 더 풍부한 회전 지원을 추가합니다(입력 및 출력).
  • MotionLayout이 ViewTransitions를 추가하여 constraintsets의 변형을 위한 단일 뷰 전환을 허용합니다.

이 버전에 관한 자세한 내용은 여기를 참고하세요.

버전 2.0

ConstraintLayout 2.0에는 새로운 레이아웃 기능(가상 레이아웃 등)과 뷰 애니메이션을 단순화하는 MotionLayout이라는 새로운 클래스가 추가되었습니다.

버전 2.0.4

2020년 10월 29일

androidx.constraintlayout:constraintlayout:2.0.4가 출시되었습니다.

버그 수정

이 버전에서는 런타임에 하위 뷰를 삭제할 때 발생할 수 있는 잠재적인 NPE를 수정했습니다. 이 버전으로 업데이트하는 것이 좋습니다.

종료된 문제 목록은 여기를 참고하세요.

버전 2.0.3

2020년 10월 27일

androidx.constraintlayout:constraintlayout:2.0.3가 출시되었습니다.

버그 수정

이 버전에서는 몇 가지 문제를 해결했습니다. 이 버전으로 업데이트하는 것이 좋습니다.

  • Windows 인셋 처리
  • 일부 상황에서 크기 비율 처리
  • 일부 RTL 레이아웃에서 비정상 종료

종료된 문제 목록은 여기를 참고하세요.

버전 2.0.2

2020년 10월 6일

androidx.constraintlayout:constraintlayout:2.0.2가 출시되었습니다.

버그 수정

이번 버전에서는 성능을 개선할 뿐 아니라 몇 가지 문제를 수정했습니다. 이 버전으로 업데이트하는 것이 좋습니다.

  • ConstraintLayout에서 뷰 GONE의 공개 상태 처리가 잘못되는 경우가 있었음
  • ConstraintLayout에서 내장된 체인 처리가 잘못되는 경우가 있었음
  • Flow 가상 레이아웃 도우미에 관한 API 15의 인플레이션 예외가 수정됨
  • limitationBoundsTo가 MotionLayout에서 손상됨
  • MotionLayout에서 jump to end가 손상되는 경우가 있었음(체인 전환)

종료된 문제 목록은 여기를 참고하세요.

버전 2.0.1

2020년 8월 25일

androidx.constraintlayout:constraintlayout:2.0.1가 출시되었습니다.

이번 소규모 업데이트로 Android 스튜디오에서 MotionEditor를 사용할 수 있게 되었습니다.

버전 2.0.0

2020년 8월 21일

androidx.constraintlayout:constraintlayout:2.0.0가 출시되었습니다.

버그 수정

종료된 문제 목록은 여기를 참고하세요.

주목할 만한 수정사항은 다음과 같습니다.

  • MotionLayout 전환 지연 및 TransitionListener 수정
  • ConstraintLayout 흐름 및 경계선 수정

버전 2.0.0-rc1

2020년 7월 29일

androidx.constraintlayout:constraintlayout:2.0.0-rc1가 출시되었습니다.

버그 수정

종료된 문제 목록은 여기를 참고하세요.

주목할 만한 수정사항은 다음과 같습니다.

  • 흐름 수정
  • RecyclerView 수정(recyclerview 1.2.0 alpha 5 이상으로 업데이트하는 것이 좋음).
  • MotionLayout TransitionListener 수정
  • MotionLayout 메모리 누수 수정

버전 2.0.0-beta8

2020년 7월 7일

androidx.constraintlayout:constraintlayout:2.0.0-beta8가 출시되었습니다.

버그 수정

종료된 문제 목록은 여기를 참고하세요.

주목할 만한 수정사항은 다음과 같습니다.

  • 자리표시자 동작
  • 레이어 공개 상태
  • 흐름, 경계선 수정
  • transitionListener 수정

버전 2.0.0-beta7

2020년 6월 12일

androidx.constraintlayout:constraintlayout:2.0.0-beta7이 출시되었습니다.

버그 수정

종료된 문제 목록은 여기를 참고하세요.

주목할 만한 수정사항은 다음과 같습니다.

  • MotionLayout의 중첩 스크롤 뷰 문제
  • MotionLayout의 전환 리스너 문제
  • MotionLayout의 메모리 누수
  • RecyclerView 문제
  • 그룹 공개 상태
  • 패딩 문제

버전 2.0.0-beta6

2020년 5월 13일

androidx.constraintlayout:constraintlayout:2.0.0-beta6가 출시되었습니다.

버그 수정

종료된 문제 목록은 여기를 참고하세요. 중요 수정사항은 MotionLayout의 그룹 공개 상태 처리 및 파생 제약 조건 문제입니다.

버전 2.0.0-beta5

2020년 5월 7일

androidx.constraintlayout:constraintlayout:2.0.0-beta5가 출시되었습니다.

버그 수정

종료된 문제 목록은 여기를 참고하세요.

버전 2.0.0-beta4

2019년 12월 16일

androidx.constraintlayout:constraintlayout:2.0.0-beta4가 출시되었습니다.

새로운 기능

MotionLayout

새 전환 속성:

  • layoutDuringTransition: 전환하는 동안 MotionLayout이 하위 요소의 requestLayouts 호출에 어떻게 반응할지 구성할 수 있습니다. 가능한 값은 {ignoreRequest, honorRequest}입니다.
  • pathMotionArc: 움직이는 요소의 경로에는 호가 사용됩니다. 가능한 값은 {startVertical | startHorizontal | flip | none}입니다.

이제 시작 및 끝 ConstraintSets를 생략하는 것으로 기본 전환을 정의할 수 있습니다. 현재의 시작/끝 상태와 일치하는 기존의 다른 전환을 찾을 수 없는 경우 기본 전환이 사용됩니다.

버그 수정

종료된 문제 목록은 여기를 참고하세요.