swipe bug fix
authordrizea <danielrizea27@gmail.com>
Mon, 30 Jul 2012 22:17:22 +0000 (01:17 +0300)
committerdrizea <danielrizea27@gmail.com>
Mon, 30 Jul 2012 22:17:22 +0000 (01:17 +0300)
Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/SampleUnderlinesNoFade.java
Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/SearchCatalog.java
Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/SearchCatalogListView.java

index c95f672..6fdb4f1 100644 (file)
@@ -37,6 +37,10 @@ public class SampleUnderlinesNoFade extends BaseSampleActivity {
    
         records = (List<RecordInfo>)getIntent().getSerializableExtra("recordList");
         
+        if(records.get(records.size()-1).dummy == true)
+               records.remove(records.size()-1);
+        
+        
         //header portion actions
         homeButton = (ImageButton) findViewById(R.id.library_logo);
         myAccountButton = (Button) findViewById(R.id.my_account_button);
index e692974..a3565ae 100644 (file)
@@ -202,12 +202,13 @@ public class SearchCatalog {
                        
                        //get copy count 
                        List<List<Object>> list= (List<List<Object>>)getLocationCount(Integer.parseInt(ids.get(i)), this.selectedOrganization.id, this.selectedOrganization.level-1);
-                       
-                       for(int j=0; j<list.size();j++){
-                               CopyInformation copyInfo = new CopyInformation(list.get(j));
+
+                       if(list != null)
+                               for(int j=0; j<list.size();j++){
+                                       CopyInformation copyInfo = new CopyInformation(list.get(j));
                                
-                               record.copyInformationList.add(copyInfo);
-                       }
+                                       record.copyInformationList.add(copyInfo);
+                               }
                        
                        System.out.println("Title " + record.title + " Author " + record.author + " Pub date" + record.pubdate +" Publisher" + record.publisher);
                }
index c2bd9c5..f2cb753 100644 (file)
@@ -381,10 +381,6 @@ public class SearchCatalogListView extends Activity{
                                intent.putExtra("orgID",search.selectedOrganization.id);
                                intent.putExtra("depth",(search.selectedOrganization.level-1));
                                
-                               if(recordList.get(recordList.size()-1).dummy == true){
-                                       recordList.remove(recordList.size()-1);
-                               }
-                               
                                intent.putExtra("recordList", recordList);
                                //TODO put total number
                                intent.putExtra("recordPosition", position);