Compose UI

Latest Update Current Release
January 29, 2020 0.1.0-dev04

Declaring dependencies

To add a dependency on Compose UI, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.

Add the dependencies for the artifacts you need in the build.gradle file for your app or module:

dependencies {
    def ui_version = "0.1.0-dev04"

    implementation 'androidx.ui:ui-tooling:$ui_version'
    implementation 'androidx.ui:ui-layout:$ui_version'
    implementation 'androidx.ui:ui-material:$ui_version'
}

For more information about dependencies, see Add build dependencies.

Version 0.1.0-dev

Version 0.1.0-dev04

January 29, 2020

androidx.ui:ui-*:0.1.0-dev04 is released. The commits included in this version can be found (here).

API Changes

  • Make pointer ids universally unique. (I42cde)
  • Semantics node merging (aosp/1138236)
  • Improvements to the API surface of Constraints (I0fd15)
  • Refactored the PathParser and PathNode/PathCommand (I715ae)
  • Update API surface of DpConstraints (I712a0)
  • Added support for modifiers that implement multiple interfaces. (I22c16)
  • Implemented cancel for the remainder of the gesture detectors. (I349f4)
  • Added Color.compositeOver() to Color (I5379d)
  • Remove a few unneeded classes for androidx.ui:ui-core: ImageByteFormat, ImageRepeat, Matrix2. (I45e6b)
  • Enabled incremental Kotlin compilation in Compose projects (b/144304390)
  • Concatenate Modifiers with + (Ic33d3)
  • Added LayoutTag modifier (I69fe4)
  • Add ParagraphStyle attributes to TextStyle (If0d40)
  • Added DrawModifier, a modifier type that is allowed to draw on the surface of the modified layout. (I5fa56)
  • Change storage for the modifier position to be relative. (I5977f)
  • Added testing API to perform swipes on elements (I9125a)
  • Added Box component for combining layout and drawing common functionality. (I6e2a7)
  • Scrollers now exhibit native Android fling motion behavior. (b/147493715)
  • Replaced DrawBorder in favor of Border Modifier (Id335a)
  • Improved Scroller gesture detection. (I87d36)
  • Adds contentColor metadata to foundation (Icd074)
  • Scaffold material component has been added. Scaffold implements the basic material design visual layout structure. (I7731b)
  • Use new Surface's param contentColor in Buttons (b/146210556)
  • Removed textStyle.withOpacity() (I8cc9a)
  • Adds Emphasis subsystem (Ife95c)
  • FloatingActionButtonKt FAB properties are now private (I9c121)
  • Implemented the first iterations of a Snackbar (If1c08)
  • Added initial support for dark theme (I6323a)
  • Added size, center, and localToGlobal to GestureScope (I1ea37)
  • Add API for injection of double click gesture (I44902)
  • Added sendLongClick methods to GestureScope (Ic7db9)
  • Convert (x, y) to PxPosition in gesture injection (Ifefa4)
  • Added desired velocity to injected gesture (I3b9df)
  • Added bitmap capturing into Compose test API (androidx.ui:ui-test). (I4e36c)
  • Moved doClick to GestureScope (I56211)
  • Added findBySubstring and corresponding filters to FindersKt. (Ief0b9)
  • Refactored Text Selection Bounding To 1 Char. (Iff757)
  • Removed TextSpan (Iebece)
  • Remove Composition classes in favor of Composer base class (Ieadbf)
  • Changed Vector defaultWidth/defaultHeight to use Dp (Iad267)
  • Correctly generate groups around inline composable calls (Ibf739)
  • Enabled flag prototyping in Gesture Detectors. (I4b7b0)
  • Change maxLines and ellipsis argument from nullable to non-null (I46dac)
  • AnnotatedString now uses SpanStyle (Ib6d3e)
  • Added modifiers support for WithConstraints (b/145399789)
  • Pass paragraph style to TextDelegate (Id2d4a)
  • Added SpanStyle class (Ifdb4f)
  • Use default value instead of nullable Float in TextGeometricTransform. (I1bf00)
  • Added PreviewActivity to androidx.ui:ui-tooling (Ic8988)
  • ModelObserver is now single-threaded. (b/146144712)
  • Added benchmark for ModelObserver (Ia176b)
  • Call cancel callbacks when the PointerInputNode is removed from the tree. (I7112a)
  • Removed the LayoutInflexible modifier for Row and Column (I0d820)
  • Inherit layout modifiers from ParentDataModifier (I49b6a)
  • Added Wrapped modifier (I6f8df)
  • Added Aligned modifiers (Ifc581)
  • Added Constraint Layout to Compose (I175ad)

Refactors

  • Moved graphics from androidx.ui:ui-core to androidx.ui:ui-graphics. (Ic17b0)
  • Changed module and package of Dp, IntPx, etc to androidx.ui:ui-unit and androidx.ui:ui-util. (I45fe4)
  • Refactor effects to @Composable (Ie2686)