From 5e97486ce1e8a26f97d95253dd5cbea9fc572e54 Mon Sep 17 00:00:00 2001 From: nemanja_tomasevic Date: Fri, 16 Apr 2021 09:55:19 +0200 Subject: [PATCH] updating app version and renaming tableOddRowBackgroundColorOpacity --- CHANGELOG.md | 6 ++++++ app-sample/build.gradle | 8 ++++---- gradle.properties | 2 +- .../io/noties/markwon/ext/tables/TableTheme.java | 16 ++++++++-------- .../markwon/recycler/table/TableEntryTheme.java | 2 +- 5 files changed, 20 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f01d17f4..e4f80039 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +# 4.6.3 +#### Added +* `ext-tables` - `TableTheme.tableOddRowBackgroundColorAplha` which gives ability to change + alpha channel of table odd rows + + # 4.6.2 #### Added diff --git a/app-sample/build.gradle b/app-sample/build.gradle index bfd97997..660925ae 100644 --- a/app-sample/build.gradle +++ b/app-sample/build.gradle @@ -60,7 +60,7 @@ android { // do not sign in CI if (!project.hasProperty('CI')) { - signingConfigs { + /*signingConfigs { config { final def keystoreFile = project.file('keystore.jks') @@ -89,14 +89,14 @@ android { keyAlias project[keystoreAlias] keyPassword project[keystoreAliasPassword] } - } + }*/ buildTypes { debug { - signingConfig signingConfigs.config +// signingConfig signingConfigs.config } release { - signingConfig signingConfigs.config +// signingConfig signingConfigs.config } } } diff --git a/gradle.properties b/gradle.properties index f7ef5b5d..767d1d56 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ android.enableJetifier=true android.enableBuildCache=true android.buildCacheDir=build/pre-dex-cache -VERSION_NAME=4.6.2 +VERSION_NAME=4.6.3 GROUP=io.noties.markwon POM_DESCRIPTION=Markwon markdown for Android diff --git a/markwon-ext-tables/src/main/java/io/noties/markwon/ext/tables/TableTheme.java b/markwon-ext-tables/src/main/java/io/noties/markwon/ext/tables/TableTheme.java index c56878f5..52a204df 100644 --- a/markwon-ext-tables/src/main/java/io/noties/markwon/ext/tables/TableTheme.java +++ b/markwon-ext-tables/src/main/java/io/noties/markwon/ext/tables/TableTheme.java @@ -48,7 +48,7 @@ public class TableTheme { protected final int tableOddRowBackgroundColor; // by default TABLE_ODD_ROW_DEF_ALPHA - protected int tableOddRowBackgroundColorOpacity; + protected int tableOddRowBackgroundColorAlpha; // @since 1.1.1 // by default no background @@ -66,10 +66,10 @@ public class TableTheme { this.tableEvenRowBackgroundColor = builder.tableEvenRowBackgroundColor; this.tableHeaderRowBackgroundColor = builder.tableHeaderRowBackgroundColor; - if(builder.tableOddRowBackgroundColorOpacity == -1) { - this.tableOddRowBackgroundColorOpacity = TABLE_ODD_ROW_DEF_ALPHA; + if(builder.tableOddRowBackgroundColorAlpha == -1) { + this.tableOddRowBackgroundColorAlpha = TABLE_ODD_ROW_DEF_ALPHA; } else { - this.tableOddRowBackgroundColorOpacity = builder.tableOddRowBackgroundColorOpacity; + this.tableOddRowBackgroundColorAlpha = builder.tableOddRowBackgroundColorAlpha; } } @@ -119,7 +119,7 @@ public class TableTheme { final int color; if (tableOddRowBackgroundColor == 0) { - color = ColorUtils.applyAlpha(paint.getColor(), tableOddRowBackgroundColorOpacity); + color = ColorUtils.applyAlpha(paint.getColor(), tableOddRowBackgroundColorAlpha); } else { color = tableOddRowBackgroundColor; } @@ -150,7 +150,7 @@ public class TableTheme { private int tableBorderColor; private int tableBorderWidth = -1; private int tableOddRowBackgroundColor; - private int tableOddRowBackgroundColorOpacity = -1; + private int tableOddRowBackgroundColorAlpha = -1; private int tableEvenRowBackgroundColor; // @since 1.1.1 private int tableHeaderRowBackgroundColor; // @since 1.1.1 @@ -179,8 +179,8 @@ public class TableTheme { } @NonNull - public Builder tableOddRowBackgroundColorOpacity(int tableOddRowBackgroundColorOpacity) { - this.tableOddRowBackgroundColorOpacity = tableOddRowBackgroundColorOpacity; + public Builder tableOddRowBackgroundColorAlpha(int tableOddRowBackgroundColorAlpha) { + this.tableOddRowBackgroundColorAlpha = tableOddRowBackgroundColorAlpha; return this; } diff --git a/markwon-recycler-table/src/main/java/io/noties/markwon/recycler/table/TableEntryTheme.java b/markwon-recycler-table/src/main/java/io/noties/markwon/recycler/table/TableEntryTheme.java index 489c58b5..07830c88 100644 --- a/markwon-recycler-table/src/main/java/io/noties/markwon/recycler/table/TableEntryTheme.java +++ b/markwon-recycler-table/src/main/java/io/noties/markwon/recycler/table/TableEntryTheme.java @@ -52,7 +52,7 @@ public class TableEntryTheme extends TableTheme { @ColorInt public int tableOddRowBackgroundColor(@NonNull Paint paint) { return tableOddRowBackgroundColor == 0 - ? ColorUtils.applyAlpha(paint.getColor(), tableOddRowBackgroundColorOpacity) + ? ColorUtils.applyAlpha(paint.getColor(), tableOddRowBackgroundColorAlpha) : tableOddRowBackgroundColor; }