Skip to content

Commit

Permalink
增加1.3版本说明
Browse files Browse the repository at this point in the history
  • Loading branch information
huangyanbin committed Nov 15, 2017
1 parent 7245697 commit 2321c14
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 2 deletions.
25 changes: 24 additions & 1 deletion README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,29 @@
![Base function](/img/table.gif)

![zoom function](/img/zoom.gif)

**- Version 1.3**

Setting a single grid background

In the online reference ```html``` > ```table```, find the pattern pretty much, according to this idea, SmartTable added support for different backgrounds on single grid support, there are 5 ```IBackgroundFormat``` style in ```TableConfig```, according to ```boolean isDraw (T T) to determine whether ` ` ` return data to draw the background of ```drawBackground```, the default of drawing the whole background. Of course, you can define your own ```IBackgroundFormat``` using other shapes.

Setting a single grid font

Due to a single grid support > background support, font color is also need to adjust according to the background, so it supports a single lattice font settings, ```int getTextColor ```IBackgroundFormat``` (T T) ', you only need to rewrite it, according to the needs of different color settings.

Paging

"Too much data on the client experience is not good, so the development of paging mode, without using the annotation case, only need to use the ```PageTableData``` page table data instead of tabular data before the ```TableData``` class, the ```setPageSize``` method uses the ```PageTableData``` settings page number. Paging is done.
If you use annotations, add the ```pageSize``` attribute to the ```@SmartTable``` annotation element, and the setData will return to the ```PageTableData``` object, and you can use it to complete the rest of the settings.

- others

> SmartTable adds the notifyDataChanged method for re parsing the layout of the calculations;
> provide the back method fling to the origin;
> increase the network request picture display example.
> How Use
- Quote
Expand All @@ -41,7 +64,7 @@ allprojects {
```gradle
dependencies {
compile 'com.github.huangyanbin:SmartTable:1.1'
compile 'com.github.huangyanbin:SmartTable:1.3'
}
```

Expand Down
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,34 @@
![基本功能](/img/table.gif)

![缩放功能](/img/zoom.gif)


**- 1.3版本**

- 设置单个格子背景

> 在网上参考了```html``````table```,发现样式好看多了,按到这个思路,SmartTable增加了支持对单个格子的不同背景支持,在```TableConfig```里面有5个```IBackgroundFormat```样式,可以根据```boolean isDraw(T t)```返回数据做出判断是否绘制背景```drawBackground```,默认绘制整个背景,当然你可以自己定义```IBackgroundFormat```使用其他形状。
- 设置单个格子字体

> 由于支持到单个格子背景的支持,字体颜色也需要根据背景还进行调整,所以又支持单个格子的字体设置,```IBackgroundFormat```中有 ```int getTextColor(T t)```,你只需重写它,根据需求设置不同颜色。
- 分页

> 在客户端太多数据体验不好,所以开发分页模式,在未使用注解情况下,只需要使用```PageTableData```分页表格数据类 代替之前```TableData```表格数据类即可,使用```PageTableData``````setPageSize```方法设置每页数量。分页就完成了。
如果你使用注解,请在```@SmartTable```注解元素添加```pageSize```属性即可,setData会返回```PageTableData```对象,你可以使用它完成后面其他的设置。

- 其他

> SmartTable 增加notifyDataChanged方法用于重新解析计算布局;
> 提供back方法fling到原点;
> 增加网络请求图片显示例子。


---
> 如何使用
- 引用
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ public boolean isDraw(CellInfo cellInfo) {
IBackgroundFormat<Integer> backgroundFormat2 = new BaseBackgroundFormat<Integer>() {
@Override
public int getBackGroundColor() {
return ContextCompat.getColor(ParseModeActivity.this,R.color.cal_buckle_text_color);
return ContextCompat.getColor(ParseModeActivity.this,R.color.arc1);
}
@Override
public boolean isDraw(Integer integer) {
Expand Down
Binary file modified img/bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2321c14

Please sign in to comment.