now allowing blank for description

squash! now allowing blank for description
This commit is contained in:
Rechee
2020-01-07 20:32:41 -08:00
parent 61bcd253f8
commit bcd9dd1bb5
2 changed files with 5 additions and 8 deletions

View File

@@ -76,7 +76,7 @@ public class NameDescriptionPanel extends FrameLayout
tvName.setTextColor(PaletteUtils.getColor(getContext(), color));
}
@Nullable
@NonNull
public String getDescription()
{
return tvDescription.getRealText().trim();
@@ -105,10 +105,7 @@ public class NameDescriptionPanel extends FrameLayout
setColor(habit.getColor());
tvName.setText(habit.getName());
tvQuestion.setRealText(habit.getQuestion());
final String description = habit.getDescription();
if(description != null) {
tvDescription.setRealText(description);
}
tvDescription.setRealText(habit.getDescription());
}
public boolean validate()

View File

@@ -142,7 +142,7 @@ public class Habit
data.color = color;
}
@Nullable
@NonNull
public synchronized String getDescription()
{
return data.description;
@@ -368,7 +368,7 @@ public class Habit
@NonNull
public String name;
@Nullable
@NonNull
public String description;
@NonNull
@@ -402,7 +402,7 @@ public class Habit
this.frequency = new Frequency(3, 7);
this.type = YES_NO_HABIT;
this.name = "";
this.description = null;
this.description = "";
this.question = "";
this.targetType = AT_LEAST;
this.targetValue = 100;