/>
</LinearLayout>
- <ImageView
+ <com.android.volley.toolbox.NetworkImageView
android:id="@+id/record_details_simple_image"
android:layout_width="140dip"
android:layout_height="180dip"
- android:src="@drawable/no_image"
android:padding="5dip"
android:layout_margin="10dip"
/>
android:background="@color/background"
>
- <ImageView
+ <com.android.volley.toolbox.NetworkImageView
android:id="@+id/search_record_img"
android:layout_width="64dip"
android:layout_height="96dip"
android:layout_marginRight="6dip"
- android:src="@drawable/address_book"
android:padding="4dip"
/>
import android.util.Log;
import org.evergreen_ils.R;
import org.evergreen_ils.auth.Const;
-import org.evergreen_ils.searchCatalog.Library;
-import org.w3c.dom.Text;
+import org.evergreen_ils.globals.Library;
import java.io.IOException;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
-import org.evergreen_ils.searchCatalog.Library;
-import org.w3c.dom.Text;
public class AccountAuthenticator extends AbstractAccountAuthenticator {
package org.evergreen_ils.auth;
-import android.app.DownloadManager;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.location.Location;
import android.widget.TextView;
import org.evergreen_ils.accountAccess.AccountUtils;
import org.evergreen_ils.globals.AppPrefs;
-import org.evergreen_ils.globals.Utils;
import org.evergreen_ils.net.VolleyWrangler;
-import org.evergreen_ils.searchCatalog.Library;
+import org.evergreen_ils.globals.Library;
import org.opensrf.util.JSONException;
import org.opensrf.util.JSONReader;
}
},
null);
+ Log.d(TAG, "volley queuing request");
q.add(stringRequest);
}
+++ /dev/null
-package org.evergreen_ils.searchCatalog;
-
-import android.location.Location;
-import android.text.TextUtils;
-
-/** value class
- * Created by kenstir on 11/5/2015.
- */
-public class Library {
- public String url; // e.g. "https://catalog.cwmars.org"
- public String name; // e.g. "C/W MARS"
- public String directory_name; // e.g. "Massachusetts, US (C/W MARS)"
- public Location location;
- public Library(String url, String name, String directory_name, Location location) {
- this.url = url;
- this.name = name;
- this.directory_name = directory_name;
- this.location = location;
- }
- public Library(String url, String name) {
- this(url, name, null, null);
- }
-}
import android.support.v7.app.ActionBarActivity;
import android.view.*;
+import com.android.volley.toolbox.ImageLoader;
+import com.android.volley.toolbox.NetworkImageView;
import org.evergreen_ils.R;
import org.evergreen_ils.accountAccess.AccountAccess;
import org.evergreen_ils.accountAccess.SessionNotFoundException;
import org.evergreen_ils.accountAccess.holds.PlaceHold;
import org.evergreen_ils.barcodescan.CaptureActivity;
import org.evergreen_ils.globals.GlobalConfigs;
+import org.evergreen_ils.net.VolleyWrangler;
import org.evergreen_ils.utils.ui.ActionBarUtils;
import org.evergreen_ils.views.splashscreen.SplashActivity;
private static final String tag = "SearchArrayAdapter";
private Context context;
- private ImageView recordImage;
+ private NetworkImageView recordImage;
private TextView recordTitle;
private TextView recordAuthor;
private TextView recordFormat;
false);
}
- // Get reference to ImageView
- recordImage = (ImageView) row.findViewById(R.id.search_record_img);
- String imageHref = GlobalConfigs.getUrl("/opac/extras/ac/jacket/small/r/" + record.doc_id);
- //Log.d(TAG, "image url " + imageHref);
-
- // start async download of image
- imageDownloader.download(imageHref, recordImage);
+ // Start async image load
+ recordImage = (NetworkImageView) row.findViewById(R.id.search_record_img);
+ final String imageHref = GlobalConfigs.getUrl("/opac/extras/ac/jacket/small/r/" + record.doc_id);
+ ImageLoader imageLoader = VolleyWrangler.getInstance(context).getImageLoader();
+ recordImage.setImageUrl(imageHref, imageLoader);
recordTitle = (TextView) row.findViewById(R.id.search_record_title);
recordAuthor = (TextView) row.findViewById(R.id.search_record_author);
import java.util.Set;
import android.util.Log;
+import com.android.volley.toolbox.ImageLoader;
+import com.android.volley.toolbox.NetworkImageView;
import org.evergreen_ils.R;
import org.evergreen_ils.accountAccess.AccountAccess;
import org.evergreen_ils.accountAccess.SessionNotFoundException;
import org.evergreen_ils.accountAccess.bookbags.BookBag;
import org.evergreen_ils.accountAccess.holds.PlaceHold;
import org.evergreen_ils.globals.GlobalConfigs;
+import org.evergreen_ils.net.VolleyWrangler;
import org.evergreen_ils.searchCatalog.*;
import android.app.Dialog;
private final ImageDownloader imageDownloader = new ImageDownloader();
- private ImageView recordImage;
+ private NetworkImageView recordImage;
// max display info
private int list_size = 3;
synopsisTextView = (TextView) layout.findViewById(R.id.record_details_simple_synopsis);
isbnTextView = (TextView) layout.findViewById(R.id.record_details_simple_isbn);
- recordImage = (ImageView) layout.findViewById(R.id.record_details_simple_image);
+ recordImage = (NetworkImageView) layout.findViewById(R.id.record_details_simple_image);
placeHoldButton = (Button) layout.findViewById(R.id.simple_place_hold_button);
addToBookbagButton = (Button) layout.findViewById(R.id.simple_add_to_bookbag_button);
}
});
- //String imageHref = GlobalConfigs.getUrl("/opac/extras/ac/jacket/large/r/" + record.doc_id);
- String imageHref = GlobalConfigs.getUrl("/opac/extras/ac/jacket/medium/r/" + record.doc_id);
-
- // start async download of image
- imageDownloader.download(imageHref, recordImage);
+ // Start async image load
+ //final String imageHref = GlobalConfigs.getUrl("/opac/extras/ac/jacket/large/r/" + record.doc_id);
+ final String imageHref = GlobalConfigs.getUrl("/opac/extras/ac/jacket/medium/r/" + record.doc_id);
+ ImageLoader imageLoader = VolleyWrangler.getInstance(getActivity()).getImageLoader();
+ recordImage.setImageUrl(imageHref, imageLoader);
AccountAccess ac = AccountAccess.getAccountAccess();
-
bookBags = ac.getBookbags();
String array_spinner[] = new String[bookBags.size()];
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
-import org.evergreen_ils.searchCatalog.Library;
-import org.opensrf.util.OSRFObject;
-
-import java.util.Map;
+import org.evergreen_ils.globals.Library;
/** This is basically the same as an AsyncTask<String,String,String>, except that it uses
* a Thread. Starting with HONEYCOMB, tasks are executed on a single thread and the 2nd