mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-07 01:28:52 -06:00
Add view tests
This commit is contained in:
@@ -156,22 +156,24 @@ public class Habit
|
||||
* this color into an android.graphics.Color, use ColorHelper.getColor(context,
|
||||
* habit.color).
|
||||
*/
|
||||
@NonNull
|
||||
public Integer getColor()
|
||||
{
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setColor(Integer color)
|
||||
public void setColor(@NonNull Integer color)
|
||||
{
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public String getDescription()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description)
|
||||
public void setDescription(@NonNull String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class ShowHabitRootView extends BaseRootView
|
||||
@BindView(R.id.overviewCard)
|
||||
OverviewCard overviewCard;
|
||||
|
||||
@BindView(R.id.strengthCard)
|
||||
@BindView(R.id.scoreCard)
|
||||
ScoreCard scoreCard;
|
||||
|
||||
@BindView(R.id.historyCard)
|
||||
|
||||
@@ -42,12 +42,6 @@ public class SubtitleCard extends HabitCard
|
||||
@BindView(R.id.reminderLabel)
|
||||
TextView reminderLabel;
|
||||
|
||||
public SubtitleCard(Context context)
|
||||
{
|
||||
super(context);
|
||||
init();
|
||||
}
|
||||
|
||||
public SubtitleCard(Context context, AttributeSet attrs)
|
||||
{
|
||||
super(context, attrs);
|
||||
@@ -76,8 +70,7 @@ public class SubtitleCard extends HabitCard
|
||||
|
||||
private void init()
|
||||
{
|
||||
Context context = getContext();
|
||||
inflate(context, R.layout.show_habit_subtitle, this);
|
||||
inflate(getContext(), R.layout.show_habit_subtitle, this);
|
||||
ButterKnife.bind(this);
|
||||
|
||||
if (isInEditMode()) initEditMode();
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
android:paddingTop="12dp"/>
|
||||
|
||||
<org.isoron.uhabits.ui.habits.show.views.ScoreCard
|
||||
android:id="@+id/strengthCard"
|
||||
android:id="@+id/scoreCard"
|
||||
style="@style/Card"
|
||||
android:gravity="center"/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user