<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
+ android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:orientation="horizontal"
+ android:orientation="vertical"
>
<TextView
android:id="@+id/copy_information_library"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- />
-
- <TextView
- android:id="@+id/copy_information_call_number"
- android:layout_width="wrap_content"
+ android:layout_width="fill_parent"
android:layout_height="wrap_content"
+ android:text="Athol Public Library"
/>
-
- <TextView
- android:id="@+id/copy_information_copy_location"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- />
-
-
+
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:paddingLeft="10dip">
+
+ <TextView
+ android:id="@+id/copy_information_call_number"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:text="j 793.01 Martin PBK"
+ android:layout_weight="1" android:singleLine="true"/>
+
+ <TextView
+ android:id="@+id/copy_information_copy_location"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:text="First Floor Juvenile"
+ android:layout_weight="1" android:singleLine="true"/>
+ </LinearLayout>
+
</LinearLayout>
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
- android:paddingLeft="30dip"
+ android:layout_marginLeft="10dip"
>
android:layout_weight="1"
android:orientation="vertical"
>
-
- <TextView
- android:id="@+id/record_details_simple_title"
- style="@style/textLarge"
- />
+
+ <TextView
+ android:id="@+id/record_details_simple_title"
+ style="@style/textLarge"
+ />
<TextView
android:id="@+id/record_details_format"
style="@style/textSmall"
- android:layout_marginTop="5dip"
+ android:layout_marginTop="3dip"
/>
<TextView
android:id="@+id/record_details_simple_author"
style="@style/textSmall"
- android:layout_marginTop="5dip"
+ android:layout_marginTop="3dip"
/>
- <TextView
- android:id="@+id/record_details_simple_publisher"
- style="@style/textSmall"
- android:layout_marginTop="3dip"
- />
+ <TextView
+ android:id="@+id/record_details_simple_publisher"
+ style="@style/textSmall"
+ android:layout_marginTop="3dip"
+ />
</LinearLayout>
<com.android.volley.toolbox.NetworkImageView
android:layout_alignParentLeft="true"
android:text="@string/button_place_hold"
/>
-
+
<Button
- android:id="@+id/simple_add_to_bookbag_button"
+ android:id="@+id/show_copy_information_button"
style="@style/SearchDetailsActionButton"
android:layout_height="wrap_content"
android:layout_width="150dip"
android:layout_alignParentRight="true"
- android:text="@string/button_add_to_bookbag"
+ android:text="@string/show_more_text"
/>
</RelativeLayout>
android:layout_height="wrap_content"
android:layout_width="match_parent"
/>
-
+ <!--
<LinearLayout
android:id="@+id/record_details_copy_information"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
- >
+ >
</LinearLayout>
-
- <LinearLayout
- android:id="@+id/record_details_show_more"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:orientation="horizontal"
- style="@style/SearchDetailsInfoSeparator"
- >
+ <LinearLayout
+ android:id="@+id/record_details_show_more"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:orientation="horizontal"
+ style="@style/SearchDetailsInfoSeparator"
+ >
+
+ <ImageView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/navigation_expand"
+ />
- <ImageView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/navigation_expand"
- />
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textColor="@color/blue"
- android:text="@string/show_more_text"
- android:textStyle="bold"
- android:textSize="@dimen/search_details_rect_text_size"
- />
-
- </LinearLayout>
-
- <TextView
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/show_more_text"
+ android:textSize="@dimen/search_details_rect_text_size"
+ />
+
+ </LinearLayout>
+ -->
+
+
+ <TextView
style="@style/textLarge"
- android:text="SUBJECT" />
+ android:text="Subject" />
<TextView
android:id="@+id/record_details_simple_subject"
<TextView
style="@style/textLarge"
- android:text="SERIES" />
+ android:text="Series" />
<TextView
android:id="@+id/record_details_simple_series"
<TextView
style="@style/textLarge"
- android:text="SYNOPSIS" />
+ android:text="Synopsis" />
<TextView
android:id="@+id/record_details_simple_synopsis"
<dimen name="text_size_medium">18sp</dimen>\r
<dimen name="text_size_large">22sp</dimen>\r
<dimen name="library_logo_text_size">16sp</dimen>\r
- <dimen name="search_details_rect_text_size">12dip</dimen>\r
+ <dimen name="search_details_rect_text_size">14dip</dimen>\r
<dimen name="activity_horizontal_margin">16dp</dimen>\r
<dimen name="activity_vertical_margin">16dp</dimen>\r
<dimen name="bigActionButton_marginVertical">18dp</dimen>\r
<string name="menu_button_advanced_search">Advanced search</string>
<string name="menu_button_library_hours">Library hours</string>
<string name="menu_button_application_preferences">Preferences</string>
- <string name="copy_information"> Availability of the book :</string>
+ <string name="copy_information">Availability:</string>
<string name="title_activity_startup">Welcome to Evergreen</string>
<string name="title_search">Search</string>
<string name="title_my_account">My Account</string>
<string name="item_renewed">Item renewed</string>
<string name="record_of">record %1$d of %2$d</string>
<string name="displaying_n_of_m_results">displaying %1$d of %2$d results</string>
- <string name="n_of_m_available">%1$d of %2$s available</string>
+ <string name="n_of_m_available">%1$d of %2$s available at %3$s</string>
<!-- Search Details View -->
- <string name="show_more_text">Show More</string>
+ <string name="show_more_text">Show Copies</string>
<!-- Place Hold Activity View -->
<!-- Search Details -->
<style name="SearchDetailsInfoSeparator">
<item name="android:background">@drawable/shadow_rect</item>
- <item name="android:padding">3dip</item>
- <item name="android:layout_marginTop">3dip</item>
- <item name="android:textColor">@color/dark</item>
+ <item name="android:textColor">@color/header_title</item>
+ <item name="android:padding">1dip</item>
+ <item name="android:layout_marginTop">1dip</item>
</style>
<style name="SearchDetailsActionButton">
public class BookBagDetails extends ActionBarActivity {
- private final String TAG = BookBagDetails.class.getName();
+ private final static String TAG = BookBagDetails.class.getName();
public static final int RESULT_CODE_UPDATE = 1;
@Override
public void onItemSelected(AdapterView<?> arg0, View arg1,
int arg2, long arg3) {
-
}
@Override
public void onNothingSelected(AdapterView<?> arg0) {
- // TODO Auto-generated method stub
-
}
});
public class BookbagsListView extends ActionBarActivity {
- private final String TAG = BookbagsListView.class.getName();
+ private final static String TAG = BookbagsListView.class.getName();
private AccountAccess accountAccess = null;
@Override
public void onNothingSelected(AdapterView<?> arg0) {
- // TODO Auto-generated method stub
-
}
});
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
- // TODO Auto-generated method stub
super.onActivityResult(requestCode, resultCode, data);
switch (resultCode) {
-
- case BookBagDetails.RESULT_CODE_UPDATE: {
+ case BookBagDetails.RESULT_CODE_UPDATE:
Thread getBookBags = new Thread(getBookbagsRunnable);
getBookBags.start();
- }
break;
-
}
}
public class ItemsCheckOutListView extends ActionBarActivity {
- private final String TAG = ItemsCheckOutListView.class.getSimpleName();
+ private final static String TAG = ItemsCheckOutListView.class.getName();
private AccountAccess accountAccess = null;
}
class CheckOutArrayAdapter extends ArrayAdapter<CircRecord> {
- private static final String tag = "CheckoutArrayAdapter";
-
private TextView recordTitle;
private TextView recordAuthor;
private TextView recordFormat;
public class HoldDetails extends ActionBarActivity {
- private final String TAG = HoldDetails.class.getSimpleName();
+ private final static String TAG = HoldDetails.class.getName();
public static final int RESULT_CODE_DELETE_HOLD = 5;
public class HoldsListView extends ActionBarActivity {
- private final String TAG = HoldsListView.class.getSimpleName();
+ private final static String TAG = HoldsListView.class.getName();
private AccountAccess accountAccess = null;
}
class HoldsArrayAdapter extends ArrayAdapter<HoldRecord> {
- private static final String tag = "CheckoutArrayAdapter";
+ private final String tag = HoldsArrayAdapter.class.getName();
private TextView holdTitle;
private TextView holdAuthor;
public class PlaceHold extends ActionBarActivity {
- private final String TAG = PlaceHold.class.getSimpleName();
+ private static final String TAG = PlaceHold.class.getName();
private TextView title;
public class AccountAuthenticator extends AbstractAccountAuthenticator {
- private final String TAG = AccountAuthenticator.class.getSimpleName();
+ private final static String TAG = AccountAuthenticator.class.getSimpleName();
private Context context;
public AccountAuthenticator(Context context) {
public class AuthenticatorActivity extends AccountAuthenticatorActivity {
- private final String TAG = AuthenticatorActivity.class.getSimpleName();
+ private final static String TAG = AuthenticatorActivity.class.getSimpleName();
public final static String ARG_ACCOUNT_TYPE = "ACCOUNT_TYPE";
public final static String ARG_AUTH_TYPE = "AUTH_TYPE";
private static final String STATE_DIALOG = "state_dialog";
private static final String STATE_INVALIDATE = "state_invalidate";
- private static final String TAG = TestAuthActivity.class.getSimpleName();
+ private static final String TAG = TestAuthActivity.class.getName();
private AccountManager mAccountManager;
private String mAccountType;
final class AutoFocusCallback implements Camera.AutoFocusCallback {
- private static final String TAG = AutoFocusCallback.class.getSimpleName();
+ private final static String TAG = AutoFocusCallback.class.getSimpleName();
private static final long AUTOFOCUS_INTERVAL_MS = 1500L;
import android.util.Log;
public class Utils {
- private static final String TAG = "osrf";
+ private static final String TAG = Utils.class.getName();
/**
* Gets the net page content.
public class AdvancedSearchActivity extends ActionBarActivity {
- private final String TAG = AdvancedSearchActivity.class.getName();
+ private final static String TAG = AdvancedSearchActivity.class.getName();
private ArrayList<String> searchTerms;
private String advancedSearchFormattedText;
public class CopyCountInformation implements Serializable {
- private final String TAG = CopyCountInformation.class.getName();
+ private final static String TAG = CopyCountInformation.class.getName();
private static final long serialVersionUID = 12343248767867L;
public Integer org_id;
public Integer count;
private static final long serialVersionUID = -7269334218707079463L;
- private final String TAG = CopyInformation.class.getName();
+ private final static String TAG = CopyInformation.class.getName();
public Integer org_id = -1;
public String call_number_sufix;
for (int i = 0; i < record.copyInformationList.size(); i++) {
- View copy_info_view = inflater.inflate(R.layout.copy_information,
- null);
+ View copy_info_view = inflater.inflate(R.layout.copy_information, null);
// fill in any details dynamically here
- TextView library = (TextView) copy_info_view
- .findViewById(R.id.copy_information_library);
- TextView call_number = (TextView) copy_info_view
- .findViewById(R.id.copy_information_call_number);
- TextView copy_location = (TextView) copy_info_view
- .findViewById(R.id.copy_information_copy_location);
-
- library.setText(globalConfigs.getOrganizationName(record.copyInformationList
- .get(i).org_id) + " ");
- call_number
- .setText(record.copyInformationList.get(i).call_number_sufix);
- copy_location
- .setText(record.copyInformationList.get(i).copy_location);
+ TextView library = (TextView) copy_info_view.findViewById(R.id.copy_information_library);
+ TextView call_number = (TextView) copy_info_view.findViewById(R.id.copy_information_call_number);
+ TextView copy_location = (TextView) copy_info_view.findViewById(R.id.copy_information_copy_location);
+
+ library.setText(globalConfigs.getOrganizationName(record.copyInformationList.get(i).org_id));
+ call_number.setText(record.copyInformationList.get(i).call_number_sufix);
+ copy_location.setText(record.copyInformationList.get(i).copy_location);
// insert into main view
insertPoint.addView(copy_info_view, new ViewGroup.LayoutParams(
LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT));
- LinearLayout copy_statuses = (LinearLayout) copy_info_view
- .findViewById(R.id.copy_information_statuses);
+ LinearLayout copy_statuses = (LinearLayout) copy_info_view.findViewById(R.id.copy_information_statuses);
CopyInformation info = record.copyInformationList.get(i);
-
Set<Entry<String, String>> set = info.statusInformation.entrySet();
-
Iterator<Entry<String, String>> it = set.iterator();
-
while (it.hasNext()) {
-
Entry<String, String> ent = it.next();
TextView statusName = new TextView(context);
- statusName.setText(ent.getKey() + " : " + ent.getValue());
-
+ statusName.setText(ent.getKey() + ": " + ent.getValue());
copy_statuses.addView(statusName, new LayoutParams(
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
-
}
-
}
-
}
}
private static final long serialVersionUID = 10123L;
- private static final String TAG = RecordInfo.class.getSimpleName();
+ private static final String TAG = RecordInfo.class.getName();
public String title = null;
public String author = null;
public class SearchCatalogListView extends ActionBarActivity {
- private final String TAG = SearchCatalogListView.class.getSimpleName();
+ private static final String TAG = SearchCatalogListView.class.getName();
private ArrayList<RecordInfo> recordList;
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
- // TODO Auto-generated method stub
-
}
@Override
@Override
public void onClick(View v) {
- // TODO Auto-generated method stub
Thread addtoBookbag = new Thread(new Runnable() {
@Override
public void run() {
ac.addRecordToBookBag(info.doc_id,
bookBags.get(bookbag_selected).id);
} catch (SessionNotFoundException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ Log.d(TAG, "session not found", e);
}
runOnUiThread(new Runnable() {
class SearchArrayAdapter extends ArrayAdapter<RecordInfo> {
- private static final String tag = "SearchArrayAdapter";
+ private final String tag = SearchArrayAdapter.class.getName();
private Context context;
private NetworkImageView recordImage;
private TextView recordTitle;
public class NotificationReceiver extends BroadcastReceiver {
- private final String TAG = NotificationReceiver.class.getName();
+ private static final String TAG = NotificationReceiver.class.getName();
public static final int NOTIFICATION_ID = 1;
@Override
public class BasicDetailsFragment extends Fragment {
- private final String TAG = BasicDetailsFragment.class.getName();
+ private final static String TAG = BasicDetailsFragment.class.getName();
private RecordInfo record;
private Integer orgId;
private TextView copyCountTextView;
private Button placeHoldButton;
- private Button addToBookbagButton;
-
- private LinearLayout showMore;
private GlobalConfigs globalConfigs;
+ /*
+ private Button addToBookbagButton;
private ProgressDialog progressDialog;
-
private Integer bookbag_selected;
-
private Dialog dialog;
-
private ArrayList<BookBag> bookBags;
-
- private final ImageDownloader imageDownloader = new ImageDownloader();
+ private int list_size = 3;
+ */
private NetworkImageView recordImage;
- // max display info
- private int list_size = 3;
public static BasicDetailsFragment newInstance(RecordInfo record,
Integer position, Integer total, Integer orgID) {
record_header = (TextView) layout.findViewById(R.id.record_header_text);
copyCountTextView = (TextView) layout.findViewById(R.id.record_details_simple_copy_count);
- showMore = (LinearLayout) layout.findViewById(R.id.record_details_show_more);
+// showMore = (LinearLayout) layout.findViewById(R.id.record_details_show_more);
titleTextView = (TextView) layout.findViewById(R.id.record_details_simple_title);
formatTextView = (TextView) layout.findViewById(R.id.record_details_format);
authorTextView = (TextView) layout.findViewById(R.id.record_details_simple_author);
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);
-
+// addToBookbagButton = (Button) layout.findViewById(R.id.simple_add_to_bookbag_button);
placeHoldButton.setOnClickListener(new OnClickListener() {
@Override
recordImage.setImageUrl(imageHref, imageLoader);
AccountAccess ac = AccountAccess.getAccountAccess();
+
+ /*
bookBags = ac.getBookbags();
String array_spinner[] = new String[bookBags.size()];
dialog.setContentView(R.layout.bookbag_spinner);
dialog.setTitle("Choose bookbag");
Spinner s = (Spinner) dialog.findViewById(R.id.bookbag_spinner);
-
Button add = (Button) dialog.findViewById(R.id.add_to_bookbag_button);
ArrayAdapter adapter = new ArrayAdapter(getActivity()
.getApplicationContext(), android.R.layout.simple_spinner_item,
}
});
s.setOnItemSelectedListener(new OnItemSelectedListener() {
-
@Override
- public void onItemSelected(AdapterView<?> arg0, View arg1,
- int position, long arg3) {
+ public void onItemSelected(AdapterView<?> arg0, View arg1, int position, long arg3) {
bookbag_selected = position;
}
});
}
});
+ */
record_header.setText(String.format(getString(R.string.record_of), position, total));
isbnTextView.setText(record.isbn);
- // todo this is not working because we are on the main thread
+ // todo loading copy count on demand is not working because we are on the main thread
//SearchCatalog.ensureCopyCount(record, orgId);
- Log.d(TAG, "Size " + record.copyCountListInfo.size());
+ Log.d(TAG, "xxx copyCountListInfo.size=" + record.copyCountListInfo.size() + " title:" + record.title);
+ int total = 0;
+ int available = 0;
for (int i = 0; i < record.copyCountListInfo.size(); i++) {
-// Log.d(TAG, orgId + " "
-// + record.copyCountListInfo.get(i).org_id + " "
-// + record.copyCountListInfo.get(i).count);
- if (record.copyCountListInfo.get(i).org_id == orgId) {
- int total = record.copyCountListInfo.get(i).count;
- int available = record.copyCountListInfo.get(i).available;
- String totalCopies = getResources().getQuantityString(R.plurals.number_of_copies, total, total);
- copyCountTextView.setText(String.format(getString(R.string.n_of_m_available), available, totalCopies));
+ Log.d(TAG, "xxx orgId=" + orgId
+ + " rec.org_id=" + record.copyCountListInfo.get(i).org_id
+ + " rec.count=" + record.copyCountListInfo.get(i).count);
+ if (record.copyCountListInfo.get(i).org_id.equals(orgId)) {
+ total = record.copyCountListInfo.get(i).count;
+ available = record.copyCountListInfo.get(i).available;
break;
}
}
+ String totalCopies = getResources().getQuantityString(R.plurals.number_of_copies, total, total);
+ copyCountTextView.setText(String.format(getString(R.string.n_of_m_available),
+ available, totalCopies, globalConfigs.getOrganizationName(orgId)));
- final LayoutInflater inf = inflater;
- final LinearLayout lay = layout;
-
- // add more details
- showMore.setOnClickListener(new OnClickListener() {
-
+ ((Button)layout.findViewById(R.id.show_copy_information_button)).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
- // show more details
Intent intent = new Intent(getActivity().getApplicationContext(), MoreCopyInformation.class);
intent.putExtra("recordInfo", record);
intent.putExtra("orgId", orgId);
}
});
- if (list_size > record.copyInformationList.size())
- list_size = record.copyInformationList.size();
-
- // insert into main view
- LinearLayout insertPoint = (LinearLayout) layout
- .findViewById(R.id.record_details_copy_information);
- addCopyInfo(0, list_size, inflater, insertPoint);
-
return layout;
}
outState.putInt("total", this.total);
super.onSaveInstanceState(outState);
}
-
- public void addCopyInfo(int start, int stop, LayoutInflater inflater,
- LinearLayout insertPoint) {
-
- for (int i = start; i < stop; i++) {
-
- View copy_info_view = inflater.inflate(R.layout.copy_information, null);
-
- // fill in any details dynamically here
- TextView library = (TextView) copy_info_view
- .findViewById(R.id.copy_information_library);
- TextView call_number = (TextView) copy_info_view
- .findViewById(R.id.copy_information_call_number);
- TextView copy_location = (TextView) copy_info_view
- .findViewById(R.id.copy_information_copy_location);
-
- CopyInformation info = record.copyInformationList.get(i);
- library.setText(globalConfigs.getOrganizationName(info.org_id));
- call_number.setText(info.call_number_sufix);
- copy_location.setText(info.copy_location);
-
- // insert into main view
- insertPoint.addView(copy_info_view, new ViewGroup.LayoutParams(
- LayoutParams.MATCH_PARENT,
- ViewGroup.LayoutParams.WRAP_CONTENT));
-
- LinearLayout copy_statuses = (LinearLayout) copy_info_view
- .findViewById(R.id.copy_information_statuses);
-
- Set<Entry<String, String>> set = info.statusInformation.entrySet();
-
- Iterator<Entry<String, String>> it = set.iterator();
-
- while (it.hasNext()) {
-
- Entry<String, String> ent = it.next();
- TextView statusName = new TextView(getActivity());
- statusName.setText(ent.getKey() + " : " + ent.getValue());
-
- copy_statuses.addView(statusName, new LayoutParams(
- LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
-
- }
-
- }
-
- }
}
*
*/
public class LoadingTask {
- private final String TAG = LoadingTask.class.getSimpleName();
+ private final static String TAG = LoadingTask.class.getName();
public static final String TASK_OK = "OK";