diff --git a/README.md b/README.md index bdfa073a9fb8aa3635cff7183bcd2646e3d42938..c3cc456c7a8bb15d7c5c473d12829c6c06d4f20e 100644 --- a/README.md +++ b/README.md @@ -5,29 +5,23 @@ FlexboxLayout is a library project which brings the similar capabilities of [CSS Flexible Box Layout Module](https://www.w3.org/TR/css-flexbox-1) to Android. -## Installation +# Installation Add the following dependency to your `build.gradle` file: -Stable ``` dependencies { - compile 'com.google.android:flexbox:0.2.7' + compile 'com.google.android:flexbox:0.3.0' } ``` -OR - -Alpha including RecyclerView integration -``` -dependencies { - compile 'com.google.android:flexbox:0.3.0-alpha4' -} -``` See the [RecyclerView integration](RecyclerView.md) page for more details about using Flexbox inside the `RecyclerView`. -## Usage -FlexboxLayout extends the ViewGroup like LinearLayout and RelativeLayout. +# Usage +There are two ways of using Flexbox in your layout. + +## FlexboxLayout +The first one is `FlexboxLayout` that extends the `ViewGroup` like `LinearLayout` and `RelativeLayout`. You can specify the attributes from a layout XML like: ```xml `FlexDirection.ROW` - * `FlexboxLayout.FLEX_WRAP_WRAP` -> `FlexWrap.WRAP` - * `FlexboxLayout.JUSTIFY_CONTENT_FLEX_START` -> `JustifyContent.FLEX_START` - * `FlexboxLayout.ALIGN_ITEMS_FLEX_START` -> `AlignItems.FLEX_START` - * `FlexboxLayout.ALIGN_CONTENT_FLEX_START` -> `AlignContent.FLEX_START` - - including other values (such as FLEX_END, STRETCH) are now moved to each individual class. - -## Sample code -The code for the new `FlexboxLayoutManager` hasn't merged to the master branch yet, since -it's not as stable as the existing `FlexboxLayout`. -But you can still reference some sample code using the `FlexboxLayoutManager` inside the -`RecyclerView` in the [dev_recyclerview](https://github.com/google/flexbox-layout/tree/dev_recyclerview) branch -such as: - - [Playground demo app](https://github.com/google/flexbox-layout/tree/dev_recyclerview/demo-playground) - - [Cat Gallery demo app](https://github.com/google/flexbox-layout/tree/dev_recyclerview/demo-cat-gallery) - diff --git a/flexbox/constants.gradle b/flexbox/constants.gradle index bf5ff4ba7fc9875f27bd5990eb4f71f903d3f72c..31bb13fa7d9c53241fd11683b306f8251d20362e 100644 --- a/flexbox/constants.gradle +++ b/flexbox/constants.gradle @@ -22,7 +22,7 @@ ext { mavenGroup = 'com.google.android' mavenArtifactId = 'flexbox' - mavenVersion = '0.3.0-alpha4' + mavenVersion = '0.3.0' bintrayOrg = 'google' }