项目作者: yangsanning

项目描述 :
适配器模式的TableView (仅需设置adapter即可用)
高级语言: Java
项目地址: git://github.com/yangsanning/TableView.git
创建时间: 2019-11-12T01:26:56Z
项目社区:https://github.com/yangsanning/TableView

开源协议:

下载


TableView


API

效果预览

TableView

主要文件

名字 摘要
TableView 表格View

1. 基本用法

1.1 布局中添加

  1. <ysn.com.view.TableView
  2. android:id="@+id/main_activity_table_view"
  3. android:layout_width="match_parent"
  4. android:layout_height="match_parent"
  5. app:tv_head_layout_res_id="@layout/layout_table_head"
  6. app:tv_left_top_head_layout_res_id="@layout/layout_table_left_top_head" ></ysn.com.view.TableView>

1.2 adapter设置

  1. tableView.setFirstColumnAdapter(firstColumnAdapter).setContentAdapter(contentAdapter);

2. 配置属性(Attributes)

name format description
tv_left_top_head_layout_res_id reference 左上角布局
tv_head_layout_res_id reference 头布局

3.添加方法

3.1 添加仓库

在项目的 build.gradle 文件中配置仓库地址。

  1. allprojects {
  2. repositories {
  3. ...
  4. maven { url 'https://jitpack.io' }
  5. }
  6. }

3.2 添加项目依赖

在需要添加依赖的 Module 下添加以下信息,使用方式和普通的远程仓库一样。

  1. implementation 'com.github.yangsanning:TableView:1.0.0'