GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - androidxiao/CenterFlowLayout

BranchesTags
Open more actions menu

Latest commit

 

History

11 Commits
11 Commits

Folders and files

NameName
Last commit message
Last commit date
app
app
 
 
images
images
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
local.properties
local.properties
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

CenterFlowLayout

让你的子View居中显示,并且会在没有足够空间的时候,显示在下一行。

使用方法

 <com.zw.centerflowlayout.CenterFlowLayout
           android:id="@+id/id_custom_tag_group1"
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           >

           <android.support.v7.widget.AppCompatCheckBox
               android:layout_width="wrap_content"
               android:layout_width="wrap_content"
               android:layout_height="wrap_content"
               android:text="再别康桥"
               />

           <android.support.v7.widget.AppCompatCheckBox
               android:layout_width="wrap_content"
               android:layout_width="wrap_content"
               android:layout_height="wrap_content"
               android:text="你曾是少年"
               />
  </com.zw.centerflowlayout.CenterFlowLayout>
  
  或者
 
       for(int i=0;i< str.length;i++) {
           TextView tv= (TextView) LayoutInflater.from(this).inflate(R.layout.custom_checked_item_view, null,false);
           tv.setText(str[i]);
           tagGroup.addView(tv);
       }
       tagGroup.setChildSpacing(dp2px(this,10));
       tagGroup.setRowSpacing(dp2px(this,20));
  

这里我使用的是android.support.v7.widget.AppCompatCheckBox,你可以替换自己想要的控件(TextView、CheckBox等等)。

属性介绍

Attribute Format Description
center_flow_layout_childSpacing                   dimension                     子View之间的间距                                                       
center_flow_layout_rowSpacing           dimension             子View的marginTop值 

ps:具体使用方法请查看Demo

About

No description, website, or topics provided.

Resources

Readme
Activity

Stars

3 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.