now allowing blank for description
squash! now allowing blank for description
This commit is contained in:
parent
61bcd253f8
commit
bcd9dd1bb5
@ -76,7 +76,7 @@ public class NameDescriptionPanel extends FrameLayout
|
|||||||
tvName.setTextColor(PaletteUtils.getColor(getContext(), color));
|
tvName.setTextColor(PaletteUtils.getColor(getContext(), color));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@NonNull
|
||||||
public String getDescription()
|
public String getDescription()
|
||||||
{
|
{
|
||||||
return tvDescription.getRealText().trim();
|
return tvDescription.getRealText().trim();
|
||||||
@ -105,10 +105,7 @@ public class NameDescriptionPanel extends FrameLayout
|
|||||||
setColor(habit.getColor());
|
setColor(habit.getColor());
|
||||||
tvName.setText(habit.getName());
|
tvName.setText(habit.getName());
|
||||||
tvQuestion.setRealText(habit.getQuestion());
|
tvQuestion.setRealText(habit.getQuestion());
|
||||||
final String description = habit.getDescription();
|
tvDescription.setRealText(habit.getDescription());
|
||||||
if(description != null) {
|
|
||||||
tvDescription.setRealText(description);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean validate()
|
public boolean validate()
|
||||||
|
|||||||
@ -142,7 +142,7 @@ public class Habit
|
|||||||
data.color = color;
|
data.color = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@NonNull
|
||||||
public synchronized String getDescription()
|
public synchronized String getDescription()
|
||||||
{
|
{
|
||||||
return data.description;
|
return data.description;
|
||||||
@ -368,7 +368,7 @@ public class Habit
|
|||||||
@NonNull
|
@NonNull
|
||||||
public String name;
|
public String name;
|
||||||
|
|
||||||
@Nullable
|
@NonNull
|
||||||
public String description;
|
public String description;
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@ -402,7 +402,7 @@ public class Habit
|
|||||||
this.frequency = new Frequency(3, 7);
|
this.frequency = new Frequency(3, 7);
|
||||||
this.type = YES_NO_HABIT;
|
this.type = YES_NO_HABIT;
|
||||||
this.name = "";
|
this.name = "";
|
||||||
this.description = null;
|
this.description = "";
|
||||||
this.question = "";
|
this.question = "";
|
||||||
this.targetType = AT_LEAST;
|
this.targetType = AT_LEAST;
|
||||||
this.targetValue = 100;
|
this.targetValue = 100;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user