From c192974805566dbb4e5b02a72415e0967e9f563c Mon Sep 17 00:00:00 2001 From: tlaabs Date: Mon, 19 Aug 2019 16:08:08 +0900 Subject: [PATCH] fixed index out of range error on setHeaderHighlight --- .idea/runConfigurations.xml | 12 ++++++++++++ app/build.gradle | 4 ++-- .../github/tlaabs/timetableview/TimetableView.java | 1 + 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 .idea/runConfigurations.xml diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml new file mode 100644 index 0000000..7f68460 --- /dev/null +++ b/.idea/runConfigurations.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index ade9fb4..39d1c5c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,8 +6,8 @@ android { applicationId "com.github.tlaabs.timetableviewdemo" minSdkVersion 19 targetSdkVersion 28 - versionCode 3 - versionName "1.0.3" + versionCode 4 + versionName "1.0.3-fx1" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { diff --git a/timetableview/src/main/java/com/github/tlaabs/timetableview/TimetableView.java b/timetableview/src/main/java/com/github/tlaabs/timetableview/TimetableView.java index f4ede8a..8f1644f 100644 --- a/timetableview/src/main/java/com/github/tlaabs/timetableview/TimetableView.java +++ b/timetableview/src/main/java/com/github/tlaabs/timetableview/TimetableView.java @@ -221,6 +221,7 @@ public void remove(int idx) { } public void setHeaderHighlight(int idx) { + if(idx < 0)return; TableRow row = (TableRow) tableHeader.getChildAt(0); View element = row.getChildAt(idx); if(highlightMode == HighlightMode.COLOR) {