项目作者: yangsanning
项目描述 :
适配器模式的TableView (仅需设置adapter即可用)
高级语言: Java
项目地址: git://github.com/yangsanning/TableView.git
TableView


效果预览
主要文件
1. 基本用法
1.1 布局中添加
<ysn.com.view.TableView
android:id="@+id/main_activity_table_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:tv_head_layout_res_id="@layout/layout_table_head"
app:tv_left_top_head_layout_res_id="@layout/layout_table_left_top_head" ></ysn.com.view.TableView>
1.2 adapter设置
tableView.setFirstColumnAdapter(firstColumnAdapter).setContentAdapter(contentAdapter);
name |
format |
description |
tv_left_top_head_layout_res_id |
reference |
左上角布局 |
tv_head_layout_res_id |
reference |
头布局 |
3.添加方法
3.1 添加仓库
在项目的 build.gradle
文件中配置仓库地址。
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
3.2 添加项目依赖
在需要添加依赖的 Module 下添加以下信息,使用方式和普通的远程仓库一样。
implementation 'com.github.yangsanning:TableView:1.0.0'