{"id":15031397,"url":"https://github.com/apmem/android-flowlayout","last_synced_at":"2025-05-15T05:08:09.168Z","repository":{"id":1637278,"uuid":"2361775","full_name":"ApmeM/android-flowlayout","owner":"ApmeM","description":"Linear layout, that wrap its content to the next line if there is no space in the current line.","archived":false,"fork":false,"pushed_at":"2022-05-23T16:42:31.000Z","size":965,"stargazers_count":2028,"open_issues_count":27,"forks_count":371,"subscribers_count":72,"default_branch":"master","last_synced_at":"2025-05-15T05:07:57.949Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ApmeM.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-09-10T17:30:54.000Z","updated_at":"2025-03-26T07:17:27.000Z","dependencies_parsed_at":"2022-08-24T17:51:16.541Z","dependency_job_id":null,"html_url":"https://github.com/ApmeM/android-flowlayout","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApmeM%2Fandroid-flowlayout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApmeM%2Fandroid-flowlayout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApmeM%2Fandroid-flowlayout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApmeM%2Fandroid-flowlayout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ApmeM","download_url":"https://codeload.github.com/ApmeM/android-flowlayout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254276447,"owners_count":22043867,"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","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-09-24T20:15:35.060Z","updated_at":"2025-05-15T05:08:04.161Z","avatar_url":"https://github.com/ApmeM.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Android flow layout\n\n## Introduction\n\nExtended linear layout that wrap its content when there is no place in the current line.\n\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apmem.tools/layouts/badge.svg?style=flat)](https://maven-badges.herokuapp.com/maven-central/org.apmem.tools/layouts/)\n[![Travis-CI](https://travis-ci.org/ApmeM/android-flowlayout.svg?branch=master)] (https://travis-ci.org/ApmeM/android-flowlayout)\n\n## Demonstration\n\nOrientation: HORIZONTAL, Gravity: FILL, LayoutDirection: LTR\n\n![](https://github.com/ApmeM/android-flowlayout/raw/master/img/LANDSCAPE_LTR_FILL_HORIZONTAL_DEBUG.png)\n![](https://github.com/ApmeM/android-flowlayout/raw/master/img/PORTRAIT_LTR_FILL_HORIZONTAL_DEBUG.png)\n\nOrientation: HORIZONTAL, Gravity: RIGHT \u0026 BOTTOM, LayoutDirection: RTL\n\n![](https://github.com/ApmeM/android-flowlayout/raw/master/img/LANDSCAPE_RTL_RIGHTBOTTOM_HORIZONTAL_DEBUG.png)\n![](https://github.com/ApmeM/android-flowlayout/raw/master/img/PORTRAIT_RTL_RIGHTBOTTOM_HORIZONTAL_DEBUG.png)\n\nOrientation: VERTICAL, Gravity: CENTER, LayoutDirection: LTR\n\n![](https://github.com/ApmeM/android-flowlayout/raw/master/img/LANDSCAPE_LTR_CENTER_VERTICAL_DEBUG.png)\n![](https://github.com/ApmeM/android-flowlayout/raw/master/img/PORTRAIT_LTR_CENTER_VERTICAL_DEBUG.png)\n\nDebug is switched off:\n\n![](https://github.com/ApmeM/android-flowlayout/raw/master/img/LANDSCAPE_LTR_FILL_HORIZONTAL_NODEBUG.png)\n![](https://github.com/ApmeM/android-flowlayout/raw/master/img/PORTRAIT_LTR_FILL_HORIZONTAL_NODEBUG.png)\n\n## Installation and usage\n\nTake from maven repository (\u003chttp://search.maven.org/#search%7Cga%7C1%7Corg.apmem.tools\u003e, \u003chttp://mvnrepository.com/search.html?query=org.apmem.tools\u003e) or add FlowLayout and other components to your solution\n\nAdd it as dependency in Gradle as:\n\n\tcompile 'org.apmem.tools:layouts:1.10@aar'\n\nOr maven\n\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.apmem.tools\u003c/groupId\u003e\n            \u003cartifactId\u003elayouts\u003c/artifactId\u003e\n            \u003cversion\u003e1.10\u003c/version\u003e\n            \u003cscope\u003eprovided\u003c/scope\u003e\n        \u003c/dependency\u003e\n\nAdd the following xml code into your layout/something.xml:\n\n\t\u003corg.apmem.tools.layouts.FlowLayout\n\t\txmlns:android=\"http://schemas.android.com/apk/res/android\"\n\t\tandroid:layout_width=\"fill_parent\"\n\t\tandroid:layout_height=\"wrap_content\"\n\t\u003e\n\t\u003c/org.apmem.tools.layouts.FlowLayout\u003e\n\nTo change default direction use the following code\n\n\tandroid:orientation=\"vertical\"\n\nTo change layout direction use the following code\n\n\txmlns:f=\"http://schemas.android.com/apk/res/your.namespace\"\n\tf:layoutDirection=\"rtl\"\n\t\nAndroid gravity now supported (in combination with elements weight):\n\n        f:weightDefault=\"1.0\"\n        android:gravity=\"fill\"\n\nTo override default spacing between elements use default android margins in the child View element:\n\n\tandroid:layout_marginTop=\"32dip\"\n\tandroid:layout_marginRight=\"32dip\"\n\nAlso if you need to break line before some object even if there is enough space for it in the previous line - use the following LayoutParameter in the child view element:\n\n\tf:layout_newLine=\"true\"\n\n## Detailed parameters\n\nLayout parameters:\n\n\t* android:orientation - line direction. Use one of the following values:\n\n\t\t* horizontal - line will be in horizontal direction, linebreak will create new line\n\n\t\t* vertical - line will be in vertical direction, linebreak will create new column\n\n        * android:gravity - standard android gravity supported\n\n\t* debugDraw - draw debug information\n\n        * weightDefault - default weight value for child elements. Used to fill line in case of Gravity.FILL_HORIZONTAL | Gravity.FILL_VERTICAL\n\n        * layoutDirection - direction of inner child elements:\n\n                *  ltr - left to right direction\n\n                *  rtl - right to left direction\n\nChild layout parameters:\n\n\t* android:layout_margin* - override default spacings\n\n\t* android:layout_gravity - standard android gravity supported\n\n        * layout_weight - weight of the element. If not specified \"layout.defaultWight\" is used.\n\n\t* layout_newLine - break line before current element even if there is enough place in the current line.\n\n## Copyrights\n\n   Copyright 2011, Artem Votincev (apmem.org)\n \n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapmem%2Fandroid-flowlayout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapmem%2Fandroid-flowlayout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapmem%2Fandroid-flowlayout/lists"}