[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-SortableTableView-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/2200) [![API](https://img.shields.io/badge/API-11%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=11) [![Build Status](https://travis-ci.org/ISchwarz23/SortableTableView.svg?branch=master)](https://travis-ci.org/ISchwarz23/SortableTableView)
# SortableTableView for Android
An Android library providing a TableView and a SortableTableView.
![SortableTableView Example](https://raw.githubusercontent.com/ISchwarz23/SortableTableView/develop/README/SortableTableView-Example.gif)
**Minimum SDK-Version:** 11 | **Compile SDK-Version:** 25 | **Latest Library Version:** 2.8.0
**New version available!** Check [version 3.1.0](http://www.sortabletableview.com) of the pro version.
## Repository Content
**tableview** - contains the android library sources and resources
**app** - contains an example application showing how to use the SortableTableView
[![Example App](http://www.clintonfitch.com/wp-content/uploads/2015/06/Google-Play-Button.jpg)](https://play.google.com/store/apps/details?id=de.codecrafters.tableviewexample)
## Setup
Add it in your root build.gradle at the end of repositories:
```
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```
Then add the dependency:
```
dependencies {
...
implementation 'com.github.ISchwarz23:SortableTableView:2.8.1'
...
}
```
## Pro Version
If you want to have the best TableView experience, we offer you the possibility to get the [pro version](http://www.sortabletableview.com)
of the SortableTableView. This is what the pro version offers you:
| | Open-Source Version | Pro Version |
| --- | --- | --- |
| render simple data | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/heavy-check-mark_2714.png" height="24"> | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/heavy-check-mark_2714.png" height="24"> |
| render custom data | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/heavy-check-mark_2714.png" height="24"> | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/heavy-check-mark_2714.png" height="24"> |
| header styling | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/heavy-check-mark_2714.png" height="24"> | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/heavy-check-mark_2714.png" height="24"> |
| data row styling | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/heavy-check-mark_2714.png" height="24"> | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/heavy-check-mark_2714.png" height="24"> |
| data sorting | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/heavy-check-mark_2714.png" height="24"> | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/heavy-check-mark_2714.png" height="24"> |
| data loading | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/heavy-check-mark_2714.png" height="24"> | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/heavy-check-mark_2714.png" height="24"> |
| searching | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/cross-mark_274c.png" height="24"> | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/heavy-check-mark_2714.png" height="24"> |
| paging | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/cross-mark_274c.png" height="24"> | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/heavy-check-mark_2714.png" height="24"> |
| selection | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/cross-mark_274c.png" height="24"> | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/heavy-check-mark_2714.png" height="24"> |
| view recycling | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/cross-mark_274c.png" height="24"> | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/heavy-check-mark_2714.png" height="24"> |
| support | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/cross-mark_274c.png" height="24"> | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/heavy-check-mark_2714.png" height="24"> |
| maintenance | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/cross-mark_274c.png" height="24"> | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/heavy-check-mark_2714.png" height="24"> |
| quick start guide | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/cross-mark_274c.png" height="24"> | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/heavy-check-mark_2714.png" height="24"> |
| full documentation | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/cross-mark_274c.png" height="24"> | <img src="https://emojipedia-us.s3.amazonaws.com/thumbs/120/microsoft/106/heavy-check-mark_2714.png" height="24"> |
To get more information visit the [SortableTableView-Page](http://www.sortabletableview.com).
<!---
## Support the open-source version
As the open-source version brings a lot of work to maintain, you can support me with a small donation in order
to keep the free version alive.
*"Thank's for creating this project, here's a coffee (or some beer) for you!"*
[Donate 5$](https://www.paypal.me/ISchwarz23/5USD) or [Donate 5€](https://www.paypal.me/ISchwarz23/5EUR)
*"Wow, I am stunned. Let me take you to the movies!"*
[Donate 10$](https://www.paypal.me/ISchwarz23/10USD) or [Donate 10€](https://www.paypal.me/ISchwarz23/10EUR)
*"I really appreciate your work, let's grab some lunch!"*
[Donate 15$](https://www.paypal.me/ISchwarz23/15USD) or [Donate 15€](https://www.paypal.me/ISchwarz23/15EUR)
*"That's some awesome stuff you did right there, dinner is on me!"*
[Donate 25$](https://www.paypal.me/ISchwarz23/25USD) or [Donate 25€](https://www.paypal.me/ISchwarz23/25EUR)
*"I really really want to support this project, great job!"*
[Donate 50$](https://www.paypal.me/ISchwarz23/50USD) or [Donate 50€](https://www.paypal.me/ISchwarz23/50EUR)
*"You are the man! This project saved me hours (if not days) of struggle and hard work, simply awesome!"*
[Donate 100$](https://www.paypal.me/ISchwarz23/100USD) or [Donate 100€](https://www.paypal.me/ISchwarz23/100EUR)
--->
## Features
### Layouting
#### Column Count
The provided TableView is very easy to adapt to your needs. To set the column count simple set the parameter inside your XML layout.
```xml
<de.codecrafters.tableview.TableView
xmlns:table="http://schemas.android.com/apk/res-auto"
android:id="@+id/tableView"
android:layout_width="match_parent"
android:layout_height="match_parent"
table:tableView_columnCount="4" />
```
A second possibility to define the column count of your TableView is to set it directly in the code.
```java
TableView tableView = (TableView) findViewById(R.id.tableView);
tableView.setColumnCount(4);
```
#### Column Width
To define the column widths you can set a `TableColumnModel` that defines the width for each column. You can use a
predefined `TableColumnModel` or implement your custom one.
**TableColumnWeightModel**
This model defines the column widths in a relative manner. You can define a weight for each column index.
The default column weight is 1.
```java
TableColumnWeightModel columnModel = new TableColumnWeightModel(4);
columnModel.setColumnWeight(1, 2);
columnModel.setColumnWeight(2, 2);
tableView.setColumnModel(columnModel);
```
**TableColumnDpWidthModel**
This model defines the column widths in a absolute manner. You can d
没有合适的资源?快使用搜索试试~ 我知道了~
SortableTableView:Android 表格视图库(0积分下载)
共85个文件
java:42个
xml:15个
png:10个
需积分: 0 1 下载量 70 浏览量
2024-09-09
23:52:59
上传
评论
收藏 2.67MB ZIP 举报
温馨提示
在 Android 应用开发中,提供用户交云和数据展示的功能是非常重要的。SortableTableView 是一个开源的 Android 库,它提供了一个简单的 TableView 组件以及一个更高级的可排序 TableView,允许开发者实现复杂的表格视图和数据排序功能。 SortableTableView 简介 SortableTableView 是由 ISchwarz23 开发的一个 Android 库,它旨在简化表格视图的创建和数据排序的过程。这个库提供了丰富的定制选项,使得开发者可以根据自己的需求定制表格的外观和行为。 功能特点 简单的 TableView:提供基础的表格视图,用于展示静态数据。 可排序的 TableView:支持触摸滑动进行数据排序,提供更流畅的用户体验。 高度可定制:允许开发者自定义表格的布局、样式和行为。 灵活的数据处理:支持各种数据源,易于与应用的数据模型集成。
资源推荐
资源详情
资源评论
收起资源包目录
SortableTableView-Android 表格视图库.zip (85个子文件)
SortableTableView-master
gradle.properties 874B
gradle
wrapper
gradle-wrapper.jar 49KB
gradle-wrapper.properties 240B
README
SortableTableView-Example.gif 1.93MB
.travis.yml 799B
LICENSE.txt 11KB
app
src
main
java
de
codecrafters
tableviewexample
SortableCarTableView.java 2KB
data
Chargable.java 186B
DataFactory.java 2KB
CarProducer.java 486B
Car.java 1KB
CarTableDataAdapter.java 5KB
CarComparators.java 2KB
MainActivity.java 3KB
res
mipmap-xxhdpi
bmw.png 69KB
audi.png 134KB
porsche.png 407KB
ic_launcher.png 63KB
values-v21
styles.xml 29B
values-w820dp
dimens.xml 358B
values
dimens.xml 253B
colors.xml 442B
strings.xml 629B
styles.xml 904B
layout
table_cell_image.xml 641B
activity_main.xml 1KB
table_cell_power.xml 2KB
AndroidManifest.xml 759B
proguard-rules.pro 687B
build.gradle 719B
.gitignore 8B
gradlew.bat 2KB
build.gradle 664B
settings.gradle 30B
gradlew 5KB
.gitignore 2KB
tableview
src
test
java
de
codecrafters
tableview
InternalHeaderClickListenerTest.java 1KB
main
java
de
codecrafters
tableview
SortableTableHeaderView.java 7KB
listeners
TableHeaderClickListener.java 460B
SortingStatusChangeListener.java 496B
OnScrollListener.java 3KB
TableDataClickListener.java 469B
SwipeToRefreshListener.java 1001B
TableDataLongClickListener.java 661B
SortingStatus.java 2KB
colorizers
TableDataRowColorizer.java 879B
toolkit
SortStateViewProviders.java 2KB
SimpleTableHeaderAdapter.java 5KB
TableHeaderCollapseOnScrollListener.java 3KB
EndlessOnScrollListener.java 3KB
SimpleTableDataAdapter.java 5KB
TableDataRowColorizers.java 3KB
LongPressAwareTableDataAdapter.java 3KB
TableDataRowBackgroundProviders.java 6KB
SortableTableView.java 15KB
TableDataAdapter.java 7KB
SortState.java 251B
TableView.java 28KB
providers
TableDataRowBackgroundProvider.java 791B
SortStateViewProvider.java 562B
model
TableColumnDpWidthModel.java 4KB
TableColumnModel.java 1008B
TableColumnWidthModel.java 2KB
TableColumnWeightModel.java 3KB
TableColumnPxWidthModel.java 2KB
TableDataRowBackgroundColorProvider.java 1KB
SortingOrder.java 101B
InternalHeaderClickListener.java 1KB
TableHeaderAdapter.java 5KB
TableHeaderView.java 2KB
res
mipmap-xxhdpi
ic_light_sorted_desc.png 20KB
ic_dark_sorted_desc.png 20KB
ic_light_sorted_asc.png 20KB
ic_light_sortable.png 19KB
ic_dark_sortable.png 19KB
ic_dark_sorted_asc.png 20KB
values
attributes.xml 328B
ids.xml 161B
strings.xml 277B
layout
sortable_header.xml 950B
AndroidManifest.xml 187B
proguard-rules.pro 687B
build.gradle 2KB
.gitignore 8B
README.md 26KB
共 85 条
- 1
资源评论
技术无疆
- 粉丝: 3578
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- #Simulink #汽车级锂电池模型 均值模糊控制 MATLAB-simulink主动均衡电路模型 动力锂电池模组(16节
- 基于Html与Python的杨金秋组小组自动化合作设计源码
- L C型逆变器仿真, 控制方式选择电流闭环控制,调制方式为 svpwm 系统分别在 dq 坐标系下,状态方程下,传递函数下进行表
- 基于Python3.7.8、Scrapy2.2.0、Scrapyd1.2.1的SpiderKeeper升级版设计源码
- 基于Ascend CANN的跨语言设计解析器源码
- 基于Java+Vue的Springboot反诈视频宣传系统设计源码
- 风光储并网仿真 风光储并网协同运行 送资料可帮助快速入门 simulink 单相并网 仿真包括永磁风机发电机、光伏板、储能系统
- 基于Python语言的薪资管理系统设计源码
- 基于Python的leticketscrapy电影票比价平台爬虫端设计源码
- 伺服驱动器原理及设计实践开发与控制性能优化
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功