From: kenstir Date: Mon, 19 Oct 2015 01:17:45 +0000 (-0400) Subject: Checked Out activity: mark overdue items with "overdue" in red. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=022a7a0cf94be5287030a55c711c922a70ea8920;p=working%2FEvergreen.git Checked Out activity: mark overdue items with "overdue" in red. --- diff --git a/Open-ILS/src/Android/.gitignore b/Open-ILS/src/Android/.gitignore index 13be41a207..03a5d3328a 100644 --- a/Open-ILS/src/Android/.gitignore +++ b/Open-ILS/src/Android/.gitignore @@ -5,6 +5,7 @@ .settings bin/ gen/ -local.properties +kc/ out/ +local.properties proguard-project.txt diff --git a/Open-ILS/src/Android/core/res/layout/checkout_list_item.xml b/Open-ILS/src/Android/core/res/layout/checkout_list_item.xml index 8c5bc89da2..516957d1cb 100644 --- a/Open-ILS/src/Android/core/res/layout/checkout_list_item.xml +++ b/Open-ILS/src/Android/core/res/layout/checkout_list_item.xml @@ -27,12 +27,25 @@ android:layout_width="fill_parent" android:layout_height="wrap_content"/> - + android:layout_height="wrap_content" + android:orientation="horizontal" + android:layout_weight="1"> + + + + diff --git a/Open-ILS/src/Android/core/res/values/strings.xml b/Open-ILS/src/Android/core/res/values/strings.xml index 526072b3ec..7ac9682529 100644 --- a/Open-ILS/src/Android/core/res/values/strings.xml +++ b/Open-ILS/src/Android/core/res/values/strings.xml @@ -93,6 +93,7 @@ Total items checked out: Overdue: due + overdue Total Owned diff --git a/Open-ILS/src/Android/core/res/values/styles.xml b/Open-ILS/src/Android/core/res/values/styles.xml index b9d2d54e3b..565bc4a9bc 100644 --- a/Open-ILS/src/Android/core/res/values/styles.xml +++ b/Open-ILS/src/Android/core/res/values/styles.xml @@ -17,7 +17,7 @@ wrap_content - diff --git a/Open-ILS/src/Android/core/src/org/evergreen_ils/accountAccess/checkout/ItemsCheckOutListView.java b/Open-ILS/src/Android/core/src/org/evergreen_ils/accountAccess/checkout/ItemsCheckOutListView.java index 0f276563c9..0ebc04c7a7 100644 --- a/Open-ILS/src/Android/core/src/org/evergreen_ils/accountAccess/checkout/ItemsCheckOutListView.java +++ b/Open-ILS/src/Android/core/src/org/evergreen_ils/accountAccess/checkout/ItemsCheckOutListView.java @@ -23,7 +23,6 @@ import java.util.ArrayList; import java.util.Date; import java.util.List; -import android.opengl.Visibility; import android.support.v7.app.ActionBar; import android.support.v7.app.ActionBarActivity; import org.evergreen_ils.R; @@ -33,21 +32,15 @@ import org.evergreen_ils.accountAccess.ServerErrorMessage; import org.evergreen_ils.accountAccess.SessionNotFoundException; import org.evergreen_ils.views.splashscreen.SplashActivity; -import android.app.Activity; import android.app.ProgressDialog; import android.content.Context; -import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; -import android.view.Menu; -import android.view.MenuInflater; -import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.ArrayAdapter; -import android.widget.Button; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; @@ -165,6 +158,7 @@ public class ItemsCheckOutListView extends ActionBarActivity { private TextView recordTitle; private TextView recordAuthor; private TextView recordDueDate; + private TextView recordIsOverdue; private TextView renewButton; private List records = new ArrayList(); @@ -194,19 +188,14 @@ public class ItemsCheckOutListView extends ActionBarActivity { LayoutInflater inflater = (LayoutInflater) this .getContext().getSystemService( Context.LAYOUT_INFLATER_SERVICE); - row = inflater.inflate(R.layout.checkout_list_item, parent, - false); + row = inflater.inflate(R.layout.checkout_list_item, parent, false); } - // Get reference to TextView - title + // Get references to views recordTitle = (TextView) row.findViewById(R.id.checkout_record_title); - - // Get reference to TextView - author recordAuthor = (TextView) row.findViewById(R.id.checkout_record_author); - - // Get reference to TextView - record Publisher date+publisher - recordDueDate = (TextView) row.findViewById(R.id.checkout_due_date); - + recordDueDate = (TextView) row.findViewById(R.id.checkout_record_due_date); + recordIsOverdue = (TextView) row.findViewById(R.id.checkout_record_overdue); renewButton = (TextView) row.findViewById(R.id.renew_button); final boolean renewable = record.getRenewals() > 0; renewButton.setVisibility(renewable ? View.VISIBLE : View.GONE); @@ -309,14 +298,11 @@ public class ItemsCheckOutListView extends ActionBarActivity { // set text recordTitle.setText(record.getTitle()); recordAuthor.setText(record.getAuthor()); - recordDueDate.setText(getString(R.string.due) + ": " + record.getDueDate()); - if (record.isOverdue()) { - recordDueDate.setTextAppearance(getApplicationContext(), R.style.alert); - } - Log.d(TAG, "title: " + record.getTitle()); - Log.d(TAG, "author: " + record.getAuthor()); - Log.d(TAG, "due: " + record.getDueDate()); - Log.d(TAG, "renew: " + record.getRenewals()); + recordDueDate.setText(getString(R.string.due) + " " + record.getDueDate()); + recordIsOverdue.setText(record.isOverdue() ? getString(R.string.overdue) : ""); + Log.d(TAG, "title: \"" + record.getTitle() + "\"" + + "due: " + record.getDueDate() + + "renewals: " + record.getRenewals()); return row; } diff --git a/Open-ILS/src/Android/core/src/org/evergreen_ils/accountAccess/holds/HoldsListView.java b/Open-ILS/src/Android/core/src/org/evergreen_ils/accountAccess/holds/HoldsListView.java index e82bea6eba..5352c55f73 100644 --- a/Open-ILS/src/Android/core/src/org/evergreen_ils/accountAccess/holds/HoldsListView.java +++ b/Open-ILS/src/Android/core/src/org/evergreen_ils/accountAccess/holds/HoldsListView.java @@ -220,13 +220,9 @@ public class HoldsListView extends ActionBarActivity { final HoldRecord record = getItem(position); if (row == null) { - - Log.d(tag, "Starting XML view more infaltion ... "); LayoutInflater inflater = (LayoutInflater) this.getContext() .getSystemService(Context.LAYOUT_INFLATER_SERVICE); row = inflater.inflate(R.layout.holds_list_item, parent, false); - Log.d(tag, "Successfully completed XML view more Inflation!"); - } hold_icon = (ImageView) row.findViewById(R.id.hold_resource_icon); diff --git a/Open-ILS/src/Android/cwmars_app/AndroidManifest.xml b/Open-ILS/src/Android/cwmars_app/AndroidManifest.xml index b679509e00..27b82dd035 100644 --- a/Open-ILS/src/Android/cwmars_app/AndroidManifest.xml +++ b/Open-ILS/src/Android/cwmars_app/AndroidManifest.xml @@ -3,7 +3,7 @@ package="org.cwmars" android:installLocation="auto" android:versionCode="9" - android:versionName="1.3"> + android:versionName="1.4">