Create new UNKNOWN checkmark state

This commit is contained in:
2020-11-26 15:08:49 -06:00
parent 9ca1c8e459
commit 2228dbf0f4
15 changed files with 49 additions and 34 deletions

View File

@@ -391,7 +391,7 @@ public class HistoryChart extends ScrollableChart
else
{
checkmark = checkmarks[checkmarkOffset];
if(checkmark == 0)
if(checkmark <= 0)
{
pSquareBg.setColor(colors[0]);
pSquareFg.setColor(textColors[1]);

View File

@@ -114,6 +114,7 @@ class CheckmarkButtonView(
val id = when (value) {
SKIP -> R.string.fa_skipped
NO -> R.string.fa_times
UNKNOWN -> R.string.fa_question
else -> R.string.fa_check
}
val label = resources.getString(id)

View File

@@ -62,7 +62,7 @@ class CheckmarkPanelView(
val timestamp = today.minus(index + dataOffset)
button.value = when {
index + dataOffset < values.size -> values[index + dataOffset]
else -> NO
else -> UNKNOWN
}
button.color = color
button.onToggle = { value -> onToggle(timestamp, value) }

View File

@@ -86,8 +86,8 @@ public class CheckmarkWidgetView extends HabitWidgetView {
case Checkmark.YES_AUTO:
case Checkmark.NO:
case Checkmark.UNKNOWN:
default:
getResources().getString(R.string.fa_times);
bgColor = res.getColor(R.attr.cardBgColor);
fgColor = res.getColor(R.attr.mediumContrastTextColor);
setShadowAlpha(0x00);
@@ -120,6 +120,8 @@ public class CheckmarkWidgetView extends HabitWidgetView {
return getResources().getString(R.string.fa_check);
case Checkmark.SKIP:
return getResources().getString(R.string.fa_skipped);
case Checkmark.UNKNOWN:
return getResources().getString(R.string.fa_question);
case Checkmark.NO:
default:
return getResources().getString(R.string.fa_times);

View File

@@ -26,6 +26,7 @@
<string translatable="false" name="fa_skipped">&#xf068;</string>
<string translatable="false" name="fa_bell_o">&#xf0a2;</string>
<string translatable="false" name="fa_calendar">&#xf073;</string>
<string translatable="false" name="fa_question">&#xf128;</string>
<!--<string translatable="false" name="fa_glass">&#xf000;</string>-->
<!--<string translatable="false" name="fa_music">&#xf001;</string>-->
@@ -281,7 +282,6 @@
<!--<string translatable="false" name="fa_crop">&#xf125;</string>-->
<!--<string translatable="false" name="fa_code_fork">&#xf126;</string>-->
<!--<string translatable="false" name="fa_chain_broken">&#xf127;</string>-->
<!--<string translatable="false" name="fa_question">&#xf128;</string>-->
<!--<string translatable="false" name="fa_info">&#xf129;</string>-->
<!--<string translatable="false" name="fa_exclamation">&#xf12a;</string>-->
<!--<string translatable="false" name="fa_superscript">&#xf12b;</string>-->