Merge 5e97486ce1e8a26f97d95253dd5cbea9fc572e54 into 2ea148c30a07f91ffa37c0aa36af1cf2670441af
This commit is contained in:
commit
71fe073c83
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -47,6 +47,9 @@ public class TableTheme {
|
||||
// by default paint.color * TABLE_ODD_ROW_DEF_ALPHA
|
||||
protected final int tableOddRowBackgroundColor;
|
||||
|
||||
// by default TABLE_ODD_ROW_DEF_ALPHA
|
||||
protected int tableOddRowBackgroundColorAlpha;
|
||||
|
||||
// @since 1.1.1
|
||||
// by default no background
|
||||
protected final int tableEvenRowBackgroundColor;
|
||||
@ -62,6 +65,12 @@ public class TableTheme {
|
||||
this.tableOddRowBackgroundColor = builder.tableOddRowBackgroundColor;
|
||||
this.tableEvenRowBackgroundColor = builder.tableEvenRowBackgroundColor;
|
||||
this.tableHeaderRowBackgroundColor = builder.tableHeaderRowBackgroundColor;
|
||||
|
||||
if(builder.tableOddRowBackgroundColorAlpha == -1) {
|
||||
this.tableOddRowBackgroundColorAlpha = TABLE_ODD_ROW_DEF_ALPHA;
|
||||
} else {
|
||||
this.tableOddRowBackgroundColorAlpha = builder.tableOddRowBackgroundColorAlpha;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -109,7 +118,8 @@ public class TableTheme {
|
||||
public void applyTableOddRowStyle(@NonNull Paint paint) {
|
||||
final int color;
|
||||
if (tableOddRowBackgroundColor == 0) {
|
||||
color = ColorUtils.applyAlpha(paint.getColor(), TABLE_ODD_ROW_DEF_ALPHA);
|
||||
|
||||
color = ColorUtils.applyAlpha(paint.getColor(), tableOddRowBackgroundColorAlpha);
|
||||
} else {
|
||||
color = tableOddRowBackgroundColor;
|
||||
}
|
||||
@ -140,6 +150,7 @@ public class TableTheme {
|
||||
private int tableBorderColor;
|
||||
private int tableBorderWidth = -1;
|
||||
private int tableOddRowBackgroundColor;
|
||||
private int tableOddRowBackgroundColorAlpha = -1;
|
||||
private int tableEvenRowBackgroundColor; // @since 1.1.1
|
||||
private int tableHeaderRowBackgroundColor; // @since 1.1.1
|
||||
|
||||
@ -167,6 +178,12 @@ public class TableTheme {
|
||||
return this;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public Builder tableOddRowBackgroundColorAlpha(int tableOddRowBackgroundColorAlpha) {
|
||||
this.tableOddRowBackgroundColorAlpha = tableOddRowBackgroundColorAlpha;
|
||||
return this;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public Builder tableEvenRowBackgroundColor(@ColorInt int tableEvenRowBackgroundColor) {
|
||||
this.tableEvenRowBackgroundColor = tableEvenRowBackgroundColor;
|
||||
|
@ -52,7 +52,7 @@ public class TableEntryTheme extends TableTheme {
|
||||
@ColorInt
|
||||
public int tableOddRowBackgroundColor(@NonNull Paint paint) {
|
||||
return tableOddRowBackgroundColor == 0
|
||||
? ColorUtils.applyAlpha(paint.getColor(), TABLE_ODD_ROW_DEF_ALPHA)
|
||||
? ColorUtils.applyAlpha(paint.getColor(), tableOddRowBackgroundColorAlpha)
|
||||
: tableOddRowBackgroundColor;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user