@@ -4,7 +4,7 @@ An Android library providing a TableView and a SortableTableView.
4
4
5
5
![ SortableTableView Example] ( https://raw.githubusercontent.com/ISchwarz23/SortableTableView/develop/README/SortableTableView-Example.gif )
6
6
7
- ** Minimum SDK-Version:** 11 | ** Compile SDK-Version:** 23 | ** Latest Library Version:** 1.1.1
7
+ ** Minimum SDK-Version:** 11 | ** Compile SDK-Version:** 23 | ** Latest Library Version:** 2.0.0
8
8
9
9
## Repository Content
10
10
** tableview** - contains the android library sources and resources
@@ -17,7 +17,7 @@ To use the this library in your project simply add the following dependency to y
17
17
```
18
18
dependencies {
19
19
...
20
- compile 'de.codecrafters.tableview:tableview:1.1.1 '
20
+ compile 'de.codecrafters.tableview:tableview:2.0.0 '
21
21
...
22
22
}
23
23
```
@@ -32,7 +32,7 @@ The provided TableView is very easy to adapt to your needs. To set the column co
32
32
android : id =" @+id/tableView"
33
33
android : layout_width =" match_parent"
34
34
android : layout_height =" match_parent"
35
- table : columnCount =" 4" />
35
+ table : tableView_columnCount =" 4" />
36
36
```
37
37
A second possibility to define the column count of your TableView is to set it directly in the code.
38
38
``` java
@@ -183,7 +183,7 @@ The table view provides several possibilities to style its header. One possibili
183
183
android : id =" @+id/tableView"
184
184
android : layout_width =" match_parent"
185
185
android : layout_height =" match_parent"
186
- table : headerColor =" @color/primary" />
186
+ table : tableView_headerColor =" @color/primary" />
187
187
```
188
188
``` java
189
189
tableView. setHeaderBackgroundColor(getResources(). getColor(R . color. primary));
@@ -199,7 +199,7 @@ In addition you can set an **elevation** of the table header. To achieve this yo
199
199
android : id =" @+id/tableView"
200
200
android : layout_width =" match_parent"
201
201
android : layout_height =" match_parent"
202
- table : headerElevation =" 10" />
202
+ table : tableView_headerElevation =" 10" />
203
203
```
204
204
``` java
205
205
tableView. setHeaderElevation(10 );
@@ -213,7 +213,7 @@ For SortableTableViews it is also possible to replace the default **sortable ind
213
213
super . onCreate(savedInstanceState);
214
214
setContentView(R . layout. activity_main);
215
215
// ...
216
- sortbaleTableView . setHeaderSortStateViewProvider(new MySortStateViewProvider ());
216
+ sortableTableView . setHeaderSortStateViewProvider(new MySortStateViewProvider ());
217
217
}
218
218
219
219
private static class MySortStateViewProvider implements SortStateViewProvider {
@@ -248,7 +248,7 @@ This Factory contains for example an alternating-table-data-row colorizer that w
248
248
// ...
249
249
int colorEvenRows = getResources(). getColor(R . color. white);
250
250
int colorOddRows = getResources(). getColor(R . color. gray);
251
- tableView. setDataRowColoriser (TableDataRowColorizers . alternatingRows(colorEvenRows, colorOddRows));
251
+ tableView. setDataRowColorizer (TableDataRowColorizers . alternatingRows(colorEvenRows, colorOddRows));
252
252
}
253
253
```
254
254
If the implementations of ` TableDataRowColorizer ` contained in the ` TableDataRowColorizers ` factory don't fulfil you needs you can create your own implementation of ` TableDataRowColorizer ` . Here is a small example of how to do so.
@@ -258,7 +258,7 @@ If the implementations of `TableDataRowColorizer` contained in the `TableDataRow
258
258
super . onCreate(savedInstanceState);
259
259
setContentView(R . layout. activity_main);
260
260
// ...
261
- tableView. setDataRowColoriser (new CarPriceRowColorizer ());
261
+ tableView. setDataRowColorizer (new CarPriceRowColorizer ());
262
262
}
263
263
264
264
private static class CarPriceRowColorizer implements TableDataRowColorizer<Car > {
0 commit comments