From 99a4b6649c16d2b34fb6a2ac14180f76f01b38f3 Mon Sep 17 00:00:00 2001 From: Takeshi Hagikura Date: Wed, 28 Jun 2017 15:23:01 +0900 Subject: [PATCH] Bump the version to 0.3.0. (#324) For a stable release including RecyclerView integration: - Bump the library version. - Update the README --- README.md | 89 +++++++++++++++++++++++++++++++--------- RecyclerView.md | 80 ------------------------------------ flexbox/constants.gradle | 2 +- 3 files changed, 70 insertions(+), 101 deletions(-) delete mode 100644 RecyclerView.md diff --git a/README.md b/README.md index bdfa073..c3cc456 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 bf5ff4b..31bb13f 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' } -- GitLab