<string name="preference_notifications_each_day">Each day notifications</string>
<string name="preference_notifications_each_day_summary">Give a notification in every day before the actual start notification period and due date</string>
+
+ <string name="preference_notifications_title">Notification settings</string>
+
</resources>
\ No newline at end of file
</PreferenceCategory>
+ <PreferenceCategory
+ android:title="@string/preference_notifications_title" >
+
<PreferenceScreen
android:key="NotificationsPrefScreen"
android:title="@string/preference_notification_preference_screen_title"
android:summary="@string/preference_notifications_each_day_summary"
/>
</PreferenceScreen>
+ </PreferenceCategory>
</PreferenceScreen>
\ No newline at end of file
Map<String, ?> map = (Map<String, ?>) Utils.doRequest(conn,
SERVICE_ACTOR, METHOD_FLESH_PUBLIC_CONTAINER, authToken, cm,
new Object[] { authToken, "biblio", bookbagID });
-
- List<OSRFObject> items = (List<OSRFObject>) map.get("items");
-
- for (int i = 0; i < items.size(); i++) {
-
- BookBagItem bookBagItem = new BookBagItem(items.get(i));
-
- bag.items.add(bookBagItem);
+
+ List<OSRFObject> items = new ArrayList<OSRFObject>();
+
+ try{
+ items = (List<OSRFObject>) map.get("items");
+
+ for (int i = 0; i < items.size(); i++) {
+
+ BookBagItem bookBagItem = new BookBagItem(items.get(i));
+
+ bag.items.add(bookBagItem);
}
+ }catch(Exception e){};
+
return items;
}
*/
package org.evergreen.android.accountAccess.fines;
+import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
private TextView headerTitle;
private Context context;
+
+ private DecimalFormat decimalFormater;
@Override
protected void onCreate(Bundle savedInstanceState) {
});
// end header portion actions
+ decimalFormater = new DecimalFormat("#0.00");
lv = (ListView) findViewById(R.id.fines_overdue_materials_list);
total_owned = (TextView) findViewById(R.id.fines_total_owned);
listAdapter.notifyDataSetChanged();
- total_owned.setText(fines[0] + "");
- total_paid.setText(fines[1] + "");
- balance_owed.setText(fines[2] + "");
+ total_owned.setText(decimalFormater.format(fines[0]));
+ total_paid.setText(decimalFormater.format(fines[1]));
+ balance_owed.setText(decimalFormater.format(fines[2]));
progressDialog.dismiss();
}
});
// set raw information
fineTitle.setText(record.title);
fineAuthor.setText(record.author);
- fineBalanceOwed.setText(record.balance_owed);
+ fineBalanceOwed.setText(decimalFormater.format(record.balance_owed));
// status.setText(record.getHoldStatus());
fineStatus.setText(record.getStatus());
public Date dateReturned;
- public String balance_owed;
+ public Double balance_owed;
private Date checkin_time;
}
- balance_owed = mbts_transaction.getString("total_owed");
-
+ try{
+ balance_owed =Double.parseDouble(mbts_transaction.getString("total_owed"));
+ }catch(Exception e){
+ System.err.println("Error in total owed string to double conversion " + e.getMessage());
+ }
}
// if returned or fines still acumulating