public void run() {
circRecords = accountAccess.getItemsCheckedOut();
-
- for(int i=0;i<circRecords.size();i++)
- listAdapter.add(circRecords.get(i));
-
-
- listAdapter.notifyDataSetChanged();
-
+
runOnUiThread(new Runnable() {
@Override
public void run() {
+ for(int i=0;i<circRecords.size();i++)
+ listAdapter.add(circRecords.get(i));
+
+
progressDialog.dismiss();
+
+ if(circRecords.size() == 0)
+ Toast.makeText(context, "No circ records", Toast.LENGTH_LONG);
+
+ listAdapter.notifyDataSetChanged();
}
});
}
if(accountAccess.isAuthenticated()){
progressDialog = new ProgressDialog(context);
progressDialog.setMessage("Please wait while retrieving circ data");
+ progressDialog.show();
getCirc.start();
}
if(key.equals("library_url")){
GlobalConfigs.httpAddress = sharedPreferences.getString("library_url", "");
- if(GlobalConfigs.loadedIDL == false){
+
progressDialog = new ProgressDialog(context);
progressDialog.setMessage("Please wait while downloading FM IDL file and OrgTree");
-
+ progressDialog.show();
+
Thread loadIDLThread = new Thread(new Runnable() {
@Override
progressDialog.dismiss();
}
- }
+
//test connection