自动换行的标签。
2016-02-19 17:43
423 查看
23
Star353
Fork
98
Code Issues 4 Pull
requests 0 Wiki Pulse Graphs
支持 SingleLine 模式的标签云效果 http://kingideayou.github.io/TagCloudView/
47 commits
2 branches
0 releases
1 contributor
Java 100.0%
Java
New file
Upload filesFind
file
HTTPS
Download ZIP
Branch: master
New pull request
Latest commit 6c47b27 on
Dec 18, 2015
kingideayou Merge
branch 'master' of https://github.com/kingideayou/TagCloudView
支持 SingleLine 模式的标签云效果,轻松实现知乎问题话题列表
标签云效果,可以设置为 SingleLine 模式,丰富的自定义样式选择。
只需要一行代码即可设置 SingleLine 模式:app:tcvSingleLine="true" true 为 SingleLine 模式,false 为默认标签云模式
扫码或点我下载
版本号1.0.2:fix #4 添加切换单行多行方法 TagCloudView.singleLine(true)
Gradle
使用 JCenter 在项目的 build.gradle 中添加如下代码
首先下载 tagView,将 tagView 文件夹拷贝到项目的目录下面,然后在setting.gradle文件中增加文件夹名称
然后在我们需要依赖这个模块的module中的build.gradle文件中加入如下代码:
导入成功后,只需要在 XML 文件中添加如下视图
在 Activity 中调用如下方法即可
Star353
Fork
98
kingideayou/TagCloudView
Code Issues 4 Pullrequests 0 Wiki Pulse Graphs
支持 SingleLine 模式的标签云效果 http://kingideayou.github.io/TagCloudView/
47 commits
2 branches
0 releases
1 contributor
Java 100.0%
Java
New file
Upload filesFind
file
HTTPS
Download ZIP
Branch: master
New pull request
Latest commit 6c47b27 on
Dec 18, 2015
kingideayou Merge
branch 'master' of https://github.com/kingideayou/TagCloudView
.idea | 修改设置字号方法 | 2 months ago | |
apk | 添加 Demo apk 文件 | 7 months ago | |
app | 修改设置字号方法 | 2 months ago | |
gradle/wrapper | 效果实现 | 7 months ago | |
imgs | 添加二维码 | 6 months ago | |
tagcloudview | 修改设置字号方法 | 2 months ago | |
.gitignore | 修改设置字号方法 | 2 months ago | |
README.md | Update README.md | 5 months ago | |
TagCloudView.iml | 修改设置字号方法 | 2 months ago | |
build.gradle | 修改 发送到 JCenter 配置 | 7 months ago | |
gradle.properties | prepare for release to jcenter | 7 months ago | |
gradlew | prepare for release to jcenter | 7 months ago | |
gradlew.bat | 效果实现 | 7 months ago | |
settings.gradle | 修改 发送到 JCenter 配置 | 7 months ago |
README.md
TagCloudView
支持 SingleLine 模式的标签云效果,轻松实现知乎问题话题列表标签云效果,可以设置为 SingleLine 模式,丰富的自定义样式选择。
只需要一行代码即可设置 SingleLine 模式:app:tcvSingleLine="true" true 为 SingleLine 模式,false 为默认标签云模式
Demo
apk 下载:
扫码或点我下载
Update
更新
版本号1.0.2:fix #4 添加切换单行多行方法 TagCloudView.singleLine(true)
How
to use 如何使用
Gradle使用 JCenter 在项目的 build.gradle 中添加如下代码
compile 'com.github.kingideayou:tagcloudview:1.0.2'
Import
首先下载 tagView,将 tagView 文件夹拷贝到项目的目录下面,然后在setting.gradle文件中增加文件夹名称include ":tagview"
然后在我们需要依赖这个模块的module中的build.gradle文件中加入如下代码:
compile project(':tagview')
导入成功后,只需要在 XML 文件中添加如下视图
<me.next.tagview.TagCloudView android:id="@+id/tag_cloud_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/background_tagcloudview_black_selector" app:tcvItemBorderHorizontal="8dp" app:tcvItemBorderVertical="6dp" app:tcvBorder="8dp" app:tcvTextColor="#123455" app:tcvSingleLine="true" app:tcvCanTagClick="true" />
在 Activity 中调用如下方法即可
List<String> tags = new ArrayList<>(); for (int i = 0; i < 20; i++) { tags.add("标签" + i); } TagCloudView tagCloudView1 = (TagCloudView) findViewById(R.id.tag_cloud_view_1); tagCloudView1.setTags(tags); tagCloudView1.setOnTagClickListener(this); tagCloudView1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Toast.makeText(getApplicationContext(), "TagView onClick", Toast.LENGTH_SHORT).show(); } }); @Override public void onTagClick(int position) { if (position == -1) { Toast.makeText(getApplicationContext(), "点击末尾文字", Toast.LENGTH_SHORT).show(); } else { Toast.makeText(getApplicationContext(), "点击 position : " + position, Toast.LENGTH_SHORT).show(); } }
效果图
动图展示:
License
Copyright 2015 NeXT 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.
相关文章推荐
- springmvc+quartz定时任务的实现
- Centos系统下Lamp环境的快速搭建
- Xcode菜单功能中文翻译
- 进程间通信方式
- lamp or lnmp or lnamp有什么区别?安装哪个好?
- Spring ContextLoaderListener And DispatcherServlet Concepts
- Linux设备驱动安装的基本过程
- golang走起(一)对象与指针
- 数据库代理
- Spring实现AOP的4种方式
- js获取设备信息
- Oralce创建用户
- MySQL 存储过程和函数
- iOS微信小视频优化心得
- AspectJ基础学习之三HelloWorld(转载)
- LeetCode - 28. Implement strStr()
- ios布局-与xib结合
- ios自定义归档解档
- android Animation 动画效果收集
- 关于eclipse中recycleview/cardview的引入(环境搭建)