這是一個自定義實現流式佈局的LayoutManager,配合RecyclerView使用,可實現標籤效果;目前的問題是沒有實現View的緩存,之後再補吧。java
Github源碼 https://github.com/changleibox/FlowLayoutManager。git
FlowLayoutManager manager = (FlowLayoutManager) recyclerView.getLayoutManager(); manager.setSpace(space, space); manager.setOrientation(FlowLayoutManager.HORIZONTAL);
下載.zip。github
項目由@常磊我的開發,若有問題,歡迎指出,郵箱changleibox@sina.com。express
Copyright © 2017 CHANGLEI. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.