Skip to content

Commit

Permalink
fix (ibu): intermittent delivery status of Ibu
Browse files Browse the repository at this point in the history
Previously, the code was always to setText.

Now, I change the code to save the string to a variable first.
Then it will setText at the end.

#32
  • Loading branch information
rizkisunaryo committed Feb 12, 2019
1 parent 3b3e003 commit e0fc00f
Showing 1 changed file with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ public void getView(SmartRegisterClient smartRegisterClient, View convertView) {
TextView children_age_right = (TextView) convertView.findViewById(R.id.txt_children_age_right);
TextView children_age_bottom = (TextView) convertView.findViewById(R.id.txt_children_age_bottom);

edd_due.setText("");
// edd_due.setText("");
String eddDueStr = "";
anc_status_layout.setText("");
date_status.setText("");
visit_status.setText("");
Expand All @@ -140,10 +141,12 @@ public void getView(SmartRegisterClient smartRegisterClient, View convertView) {
_dueEdd = mContext.getString(R.string.edd_passed);
}

edd_due.setText(_dueEdd);
// edd_due.setText(_dueEdd);
eddDueStr = _dueEdd;

} else {
edd_due.setText("");
// edd_due.setText("");
eddDueStr = "";
}

if (ibuparent != null) {
Expand Down Expand Up @@ -173,16 +176,19 @@ public void getView(SmartRegisterClient smartRegisterClient, View convertView) {
/* checkMonth("delivered",edd_due);*/
edd_due.setTextColor(mContext.getResources().getColor(R.color.alert_complete_green));
String deliver = mContext.getString(R.string.delivered);
edd_due.setText(deliver);
// edd_due.setText(deliver);
eddDueStr = deliver;
checkLastVisit(pc.getDetails().get("PNCDate"), mContext.getString(R.string.pnc_ke) + " " + pc.getDetails().get("hariKeKF"), mContext.getString(R.string.service_pnc),
anc_status_layout, date_status, visit_status);
}else{
((TextView) convertView.findViewById(R.id.txt_edd)).setText("");
edd_due.setText("");
// edd_due.setText("");
eddDueStr = "";
}
}else{
((TextView) convertView.findViewById(R.id.txt_edd)).setText("");
edd_due.setText("");
// edd_due.setText("");
eddDueStr = "";
}

}
Expand All @@ -193,6 +199,7 @@ public void getView(SmartRegisterClient smartRegisterClient, View convertView) {
mContext.getString(R.string.fp_methods) + ": " + pc.getDetails().get("jenisKontrasepsi"),
mContext.getString(R.string.service_fp), anc_status_layout, date_status, visit_status);
}
edd_due.setText(eddDueStr);

//anak
for (int i = 0; i < allchild.size(); i++) {
Expand Down

0 comments on commit e0fc00f

Please sign in to comment.