use of com.bluestacks.bugzy.data.model.CaseEvent in project bugzy by cpunq.
the class CaseEventsAdapter method onBindViewHolder.
@Override
public void onBindViewHolder(EventHolder holder, int position) {
CaseEvent bug = mCaseEvents.get(position);
holder.bindData(bug, mLayoutManagerSavedStates.get(bug.getBugEvent()));
}
use of com.bluestacks.bugzy.data.model.CaseEvent in project bugzy by cpunq.
the class CaseEventsAdapter method saveInstanceState.
public void saveInstanceState(EventHolder holder) {
if (holder.getAdapterPosition() == RecyclerView.NO_POSITION) {
return;
}
CaseEvent event = mCaseEvents.get(holder.getAdapterPosition());
Parcelable p = holder.onSaveLayoutManagerState();
if (p != null) {
mLayoutManagerSavedStates.put(event.getBugEvent(), p);
}
}
use of com.bluestacks.bugzy.data.model.CaseEvent in project bugzy by cpunq.
the class CaseDetailsFragment method showCaseDetails.
@UiThread
protected void showCaseDetails(Case aCase) {
mCase = aCase;
showContent();
showActionButtons(mCase);
List<CaseEvent> evs = mCase.getCaseevents();
if (evs != null) {
mAdapter.setData(evs);
mAdapter.notifyDataSetChanged();
}
mBugId.setText(String.valueOf(mCase.getIxBug()));
mBugTitle.setText(String.valueOf(mCase.getTitle()));
mAssignedTo.setText(String.valueOf(mCase.getPersonAssignedTo()));
mRequiredMerge.setText(mCase.getRequiredMergeIn());
if (!TextUtils.isEmpty(mCase.getFixFor())) {
mMileStone.setText(String.valueOf(mCase.getFixFor()));
}
mActiveStatus.setText(String.valueOf(mCase.getStatus()));
Case bug = mCase;
if (bug.getPriority() <= 3) {
mPriorityIndicator.setBackgroundColor(Color.parseColor("#e74c3c"));
} else if (bug.getPriority() == 4) {
mPriorityIndicator.setBackgroundColor(Color.parseColor("#95a5a6"));
} else if (bug.getPriority() == 5) {
mPriorityIndicator.setBackgroundColor(Color.parseColor("#ddb65b"));
} else if (bug.getPriority() <= 7) {
mPriorityIndicator.setBackgroundColor(Color.parseColor("#bdc3c7"));
} else {
mPriorityIndicator.setBackgroundColor(Color.parseColor("#ecf0f1"));
}
}
use of com.bluestacks.bugzy.data.model.CaseEvent in project bugzy by cpunq.
the class BugzyTypeConverters method caseEventListFromString.
@TypeConverter
public static List<CaseEvent> caseEventListFromString(String value) {
Type listType = new TypeToken<List<CaseEvent>>() {
}.getType();
List<CaseEvent> events = sGson.fromJson(value, listType);
if (events != null) {
Collections.sort(events, ((caseEvent, t1) -> Long.compare(t1.getDate().getTime(), caseEvent.getDate().getTime())));
}
return events;
}
Aggregations