Markwon
Markwon copied to clipboard
Feature/configurable table odd row alpha
Odd rows of a table by default has set alpha channel (value is 22) but it should be configurable.
Hello @ntomasevic-vfy ,
First of all, I appreciate your effort. But let me just ask - why would you need a special setting for alpha when you can specify color via tableOddRowBackgroundColor
with alpha component directly?
Hi @noties ,
It is because your condition is not right, if you set tableOddRowBackgroundColor
as completely transparent (@andorid:color/transparent) it won't be, you will have black color with opacity of TABLE_ODD_ROW_DEF_ALPHA
if (tableOddRowBackgroundColor == 0) { color = ColorUtils.applyAlpha(paint.getColor(), TABLE_ODD_ROW_DEF_ALPHA); } else { color = tableOddRowBackgroundColor; }
It seems, @ntomasevic-vfy , that you describe a bug that should be fixed 😉 It is better to fix current implementation (to allow transparent color) then putting a temporary plaster of adding an alpha setting (why not adding alpha for other color values?). You intend to use tableOddRowBackgroundColorOpacity
with always 0
value, right?
Yes, I used it as zero but now I use a workaround (I set any color with opacity 0 but not Color.TRANSPARENT or @android:color/transparent). I was in a hurry and didn't fix the project as it should be. I assume that you should use different condition for checking weather you should use TABLE_ODD_ROW_DEF_ALPHA
or not.