Git Product home page Git Product logo

flowviewgroup's Introduction

FlowViewGroup

Download

流式布局,自动换行

使用方法:

1、依赖配置

在项目最外面的build.gradle文件中,allprojects节点下的repositories中添加:

maven {  url  "https://dl.bintray.com/teadoglibrary/flowViewGroup" }

再在app的build.gradle文件中,dependencies节点下添加:

compile 'com.teaanddogdog:flowviewgroup:1.0.6'

版本建议根据最新版本修改

2、代码中使用

在布局xml文件中,把AutoNewLineViewGroup当做父布局,任何它包含的子布局,都会根据宽度自动换行

<com.teaanddogdog.flowviewgroup.AutoNewLineViewGroup
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <Button
                android:layout_width="100dp"
                android:layout_height="wrap_content"
                android:layout_marginLeft="20dp"
                android:layout_marginRight="30dp"
                android:text="Button"
                />

            <EditText
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="20dp"
                android:layout_marginRight="30dp"
                android:text="EditText"
                />

            <ProgressBar
                android:id="@+id/textView"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="20dp"
                android:layout_marginRight="30dp"
                android:text="Hello World!3"
                android:textSize="30sp"/>

            <RatingBar
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="20dp"
                android:layout_marginRight="30dp"
                android:text="Hello World!5"
                android:textSize="30sp"
                />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignLeft="@+id/textView"
                android:layout_alignStart="@+id/textView"
                android:layout_below="@+id/textView"
                android:layout_marginLeft="20dp"
                android:padding="10dp"
                android:text="TextView"
                android:textSize="30sp"/>


            <RadioButton
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="20dp"
                android:layout_marginRight="30dp"
                android:text="RadioButton"
                android:textSize="30sp"
                />

        </com.teaanddogdog.flowviewgroup.AutoNewLineViewGroup>

3、效果

图片

flowviewgroup's People

Contributors

huzipiaopiao avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.