UI polish on hold list
authordrizea <danielrizea27@gmail.com>
Wed, 25 Jul 2012 17:03:40 +0000 (20:03 +0300)
committerdrizea <danielrizea27@gmail.com>
Wed, 25 Jul 2012 17:03:40 +0000 (20:03 +0300)
Open-ILS/src/Android/res/layout/dialog_configure_application.xml
Open-ILS/src/Android/res/layout/holds_list_item.xml
Open-ILS/src/Android/res/layout/search_result_list.xml
Open-ILS/src/Android/res/values/strings.xml
Open-ILS/src/Android/src/org/evergreen/android/accountAccess/AccountAccess.java
Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/ImageDownloader.java
Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/SampleUnderlinesNoFade.java
Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/SearchCatalogListView.java
Open-ILS/src/Android/src/org/evergreen/android/views/splashscreen/SplashActivity.java

index 95434a1..827f0e4 100644 (file)
@@ -8,7 +8,7 @@
         android:id="@+id/credentials"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
-        
+        android:layout_marginLeft="5dip"
         >
         
         <TableRow 
         </TableRow>
     </TableLayout> 
     
-    <Button
+    <LinearLayout
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:layout_below="@id/credentials"
+        android:layout_centerHorizontal="true"
+        >
+        <Button
         android:id="@+id/cancel_button"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:text="@string/cancel"
-        android:layout_below="@id/credentials"
         />
-    <Button 
+       <Button 
         android:id="@+id/connect_button"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:text="@string/connect_button"
-        android:layout_below="@id/credentials"
-        android:layout_toRightOf="@id/cancel_button"
-        />
+        /> 
+        
+    </LinearLayout>
+
     
 </RelativeLayout>
\ No newline at end of file
index 32302cf..70af455 100644 (file)
@@ -7,6 +7,7 @@
      android:layout_width="wrap_content"   
      android:layout_height="wrap_content"
      android:id="@+id/hold_title"   
+     style="@style/TitleSearchStyleList"
         />
     
      <TextView 
@@ -14,6 +15,7 @@
      android:layout_height="wrap_content"
      android:id="@+id/hold_author"
      android:layout_below="@+id/hold_title"   
+     style="@style/AuthorSearchStyleList"
         />
         
      <TextView 
@@ -21,6 +23,7 @@
      android:layout_height="wrap_content"
      android:id="@+id/hold_status"
      android:layout_below="@+id/hold_author"   
+     android:textColor="@color/blue"
         />   
     
 </RelativeLayout>
\ No newline at end of file
index 41929f6..7f283f0 100644 (file)
          android:layout_below="@id/search_preference_options"
          >
          <TextView 
-             android:layout_width="wrap_content"
-             android:layout_height="wrap_content"
-             android:text="@string/search_result_text"
-             />
-         
-         <TextView 
              android:id="@+id/search_result_number"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
index a6b3bd0..fefb9c2 100644 (file)
@@ -6,6 +6,7 @@
     <string name="my_account_button_text">My Account</string>
     <string name="options_button_text">Options</string>
     
+    <string name="search_details_title">search details</string>
     <string name="checkout_items_title">checkout items</string>
     <string name="hold_items_title">holds</string>
     <string name="hold_place_title">place hold</string>
index c41639d..de90121 100644 (file)
@@ -1010,10 +1010,12 @@ public class AccountAccess {
                List<OSRFObject> bookbags = (List<OSRFObject>)response;
                
                ArrayList<BookBag> bookBagObj = new ArrayList<BookBag>();
-               
                //in order to refresh bookbags
                this.bookBags = bookBagObj;
                
+               if(bookbags == null)
+                       return bookBagObj;
+               
                for(int i=0;i<bookbags.size();i++){
                        
                        BookBag bag = new BookBag(bookbags.get(i));     
index 48b4f1e..5451405 100644 (file)
@@ -269,7 +269,7 @@ public class ImageDownloader {
                 // Change bitmap only if this process is still associated with it
                 // Or if we don't use any bitmap to task association (NO_DOWNLOADED_DRAWABLE mode)
                 if ((this == bitmapDownloaderTask) || (mode != Mode.CORRECT)) {
-                    imageView.setImageBitmap(bitmap);
+                       imageView.setImageBitmap(bitmap);
                 }   
 
                 if(bitmap == null){
index 7a72928..13b1ac4 100644 (file)
@@ -17,6 +17,7 @@ import android.support.v4.view.ViewPager;
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.widget.Button;
+import android.widget.TextView;
 
 public class SampleUnderlinesNoFade extends BaseSampleActivity {
 
@@ -26,6 +27,8 @@ public class SampleUnderlinesNoFade extends BaseSampleActivity {
        
        private Button homeButton;
        
+       private TextView headerTitle;
+       
        @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
@@ -36,6 +39,8 @@ public class SampleUnderlinesNoFade extends BaseSampleActivity {
         //header portion actions
         homeButton = (Button) findViewById(R.id.library_logo);
         myAccountButton = (Button) findViewById(R.id.my_acount_button);
+        headerTitle = (TextView) findViewById(R.id.header_title);
+        headerTitle.setText(R.string.search_details_title);
         
         myAccountButton.setOnClickListener(new OnClickListener() {
                        @Override
index a518e4d..d7cc5b9 100644 (file)
@@ -286,13 +286,13 @@ public class SearchCatalogListView extends Activity{
                                                //add extra record to display more option button
                                                if(search.visible > recordList.size()){
                                                        recordList.add(new RecordInfo());
-                                                       searchResultsNumber.setText(recordList.size()-1 +" out of "+search.visible);
+                                                       searchResultsNumber.setText( + recordList.size()-1 +" out of "+search.visible);
                                                        }
                                                else
-                                                       searchResultsNumber.setText(recordList.size() +" out of "+search.visible);
+                                                       searchResultsNumber.setText( + recordList.size() +" out of "+search.visible);
                                                }
                                                else
-                                                       searchResultsNumber.setText(recordList.size() +" out of "+search.visible);
+                                                       searchResultsNumber.setText( + recordList.size() +" out of "+search.visible);
                                                
                                                adapter.notifyDataSetChanged();
                                                progressDialog.dismiss();
@@ -667,7 +667,7 @@ public class SearchCatalogListView extends Activity{
                // Get reference to ImageView 
                recordImage = (ImageView) row.findViewById(R.id.search_record_img);
                //TODO fix bugs + features
-               String imageHref= GlobalConfigs.httpAddress + "/opac/extras/ac/jacket/small/"+record.isbn;
+               String imageHref = GlobalConfigs.httpAddress + "/opac/extras/ac/jacket/small/"+record.isbn;
                //start async download of image 
                imageDownloader.download(imageHref, recordImage);
                // Get reference to TextView - title
index 5580150..a09793a 100644 (file)
@@ -6,6 +6,7 @@ import org.evergreen.android.globals.GlobalConfigs;
 import org.evergreen.android.globals.NoAccessToServer;
 import org.evergreen.android.globals.NoNetworkAccessException;
 import org.evergreen.android.globals.Utils;
+import org.evergreen.android.searchCatalog.SearchCatalogListView;
 import org.evergreen.android.views.MainScreenDashboard;
 import org.evergreen.android.views.splashscreen.LoadingTask.LoadingTaskFinishedListener;
 
@@ -226,7 +227,7 @@ public class SplashActivity extends Activity implements
 
        private void startApp() {
                Intent intent = new Intent(SplashActivity.this,
-                               MainScreenDashboard.class);
+                               SearchCatalogListView.class);
                startActivity(intent);
        }
 }
\ No newline at end of file