use of com.moez.QKSMS.ui.delivery.DeliveryReportHelper in project qksms by moezbhatti.
the class MessageListFragment method showDeliveryReport.
private void showDeliveryReport(long messageId, String type) {
DeliveryReportHelper deliveryReportHelper = new DeliveryReportHelper(mContext, messageId, type);
List<DeliveryReportItem> deliveryReportItems = deliveryReportHelper.getListItems();
String[] items = new String[deliveryReportItems.size() * 3];
for (int i = 0; i < deliveryReportItems.size() * 3; i++) {
switch(i % 3) {
case 0:
items[i] = deliveryReportItems.get(i - (i / 3)).recipient;
break;
case 1:
items[i] = deliveryReportItems.get(i - 1 - ((i - 1) / 3)).status;
break;
case 2:
items[i] = deliveryReportItems.get(i - 2 - ((i - 2) / 3)).deliveryDate;
break;
}
}
new QKDialog().setContext(mContext).setTitle(R.string.delivery_header_title).setItems(items, null).setPositiveButton(R.string.okay, null).show();
}
Aggregations