From 48caa028cc3fbca1c6da7ae722964b74986e36d8 Mon Sep 17 00:00:00 2001 From: sonique6784 Date: Fri, 27 Apr 2018 11:12:26 +1000 Subject: [PATCH 1/2] added interfaces for vertical dividers --- .../src/main/java/com/evrencoskun/tableview/ITableView.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tableview/src/main/java/com/evrencoskun/tableview/ITableView.java b/tableview/src/main/java/com/evrencoskun/tableview/ITableView.java index d78d302b..6c8111af 100644 --- a/tableview/src/main/java/com/evrencoskun/tableview/ITableView.java +++ b/tableview/src/main/java/com/evrencoskun/tableview/ITableView.java @@ -48,6 +48,8 @@ public interface ITableView { boolean isIgnoreSelectionColors(); boolean isShowHorizontalSeparators(); + + boolean isShowVerticalSeparators(); boolean isSortable(); @@ -74,6 +76,8 @@ public interface ITableView { ColumnSortHandler getColumnSortHandler(); DividerItemDecoration getHorizontalItemDecoration(); + + DividerItemDecoration getVerticalItemDecoration(); SortState getSortingStatus(int column); From 2b007f771089ec98ed32d0953f6f2402bded1f73 Mon Sep 17 00:00:00 2001 From: sonique6784 Date: Fri, 27 Apr 2018 11:17:03 +1000 Subject: [PATCH 2/2] allow user to overwrite createItemDecoration in order to let him set the decoration separator he which. updated to match interface ITableView --- .../src/main/java/com/evrencoskun/tableview/TableView.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tableview/src/main/java/com/evrencoskun/tableview/TableView.java b/tableview/src/main/java/com/evrencoskun/tableview/TableView.java index 4e7db3f2..59774cd0 100644 --- a/tableview/src/main/java/com/evrencoskun/tableview/TableView.java +++ b/tableview/src/main/java/com/evrencoskun/tableview/TableView.java @@ -355,6 +355,7 @@ public void setShowHorizontalSeparators(boolean showSeparators) { this.mShowHorizontalSeparators = showSeparators; } + @Override public boolean isShowVerticalSeparators() { return mShowVerticalSeparators; } @@ -599,14 +600,15 @@ public DividerItemDecoration getHorizontalItemDecoration() { return mHorizontalItemDecoration; } - private DividerItemDecoration getVerticalItemDecoration() { + @Override + public DividerItemDecoration getVerticalItemDecoration() { if (mVerticalItemDecoration == null) { mVerticalItemDecoration = createItemDecoration(DividerItemDecoration.VERTICAL); } return mVerticalItemDecoration; } - private DividerItemDecoration createItemDecoration(int orientation) { + protected DividerItemDecoration createItemDecoration(int orientation) { Drawable divider = ContextCompat.getDrawable(getContext(), R.drawable.cell_line_divider); // That means; There is a custom separator color from user.