added big search button because the action bar button was too hard to notice
authorkenstir <kenstir@gmail.com>
Fri, 3 Jan 2014 01:12:34 +0000 (20:12 -0500)
committerkenstir <kenstir@gmail.com>
Fri, 3 Jan 2014 01:12:34 +0000 (20:12 -0500)
Open-ILS/src/Android/core/res/drawable/kghostview.png [new file with mode: 0644]
Open-ILS/src/Android/core/res/layout/activity_main.xml
Open-ILS/src/Android/core/res/layout/copy_information_more.xml
Open-ILS/src/Android/core/res/layout/hold_details.xml
Open-ILS/src/Android/core/res/values/strings.xml
Open-ILS/src/Android/core/src/org/evergreen_ils/accountAccess/bookbags/BookBagDetails.java
Open-ILS/src/Android/core/src/org/evergreen_ils/accountAccess/holds/HoldDetails.java
Open-ILS/src/Android/core/src/org/evergreen_ils/searchCatalog/MoreCopyInformation.java
Open-ILS/src/Android/core/src/org/evergreen_ils/utils/ui/BasicDetailsFragment.java
Open-ILS/src/Android/core/src/org/evergreen_ils/views/MainActivity.java
Open-ILS/src/Android/cwmars_app/AndroidManifest.xml

diff --git a/Open-ILS/src/Android/core/res/drawable/kghostview.png b/Open-ILS/src/Android/core/res/drawable/kghostview.png
new file mode 100644 (file)
index 0000000..20294ee
Binary files /dev/null and b/Open-ILS/src/Android/core/res/drawable/kghostview.png differ
index d09c717..a080194 100644 (file)
             android:layout_width="match_parent"
             android:layout_height="56dp"
             style="@style/BigActionButton"
+            android:text="@string/title_search"
+            android:id="@+id/main_btn_search"
+            android:onClick="onButtonClick"
+            android:drawableLeft="@drawable/kghostview"/>
+
+    <Button
+            android:layout_width="match_parent"
+            android:layout_height="56dp"
+            style="@style/BigActionButton"
             android:text="@string/title_check_out"
             android:id="@+id/account_btn_check_out"
             android:onClick="onButtonClick"
index 6af946e..c9f580e 100644 (file)
@@ -8,8 +8,6 @@
     android:background="@drawable/background_grey_image"
     >
 
-       <include android:id="@+id/header_actionbar" layout="@layout/simple_actionbar"/>
-       
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
index 8432807..7caae12 100644 (file)
@@ -4,9 +4,7 @@
     android:layout_height="match_parent"
     android:background="@drawable/background_grey_image"
      >
-  
-       <include android:id="@+id/header_actionbar" layout="@layout/simple_actionbar"/>
-        
+
        <LinearLayout
            android:id="@+id/action_bar"
                android:layout_width="wrap_content" 
index 4438234..f9f95dd 100644 (file)
@@ -86,7 +86,7 @@
     <string name="thaw_date">Activate hold on</string>
     <string name="hold_phone_hint">Contact phone number</string>
     <string name="hold_expire_time_hint">Hold expire time</string>
-    <string name="hold_thaw_date_hint">Date when the hold is frozen</string>
+    <string name="hold_thaw_date_hint">Hold reactivate date</string>
     <string name="hold_items">Items on hold: </string>
 
     <!-- Checkout items -->
index c1d9459..071c877 100644 (file)
@@ -167,7 +167,6 @@ public class BookBagDetails extends Activity {
                             @Override
                             public void onClick(DialogInterface dialog,
                                     int which) {
-
                                 progressDialog = ProgressDialog.show(context,
                                         getResources().getText(R.string.dialog_please_wait),
                                         "Deleting Bookbag");
index 632ae69..c615ba6 100644 (file)
@@ -174,9 +174,11 @@ public class HoldDetails extends ActionBarActivity {
                     expire_date));
         }
 
-        // hide edit text
-        if (record.thaw_date == null)
+        if (suspendHold.isChecked()) {
+            enableView(thaw_date_edittext);
+        } else {
             disableView(thaw_date_edittext);
+        }
 
         Log.d(TAG, record.title + " " + record.author);
 
index d721cb3..0a39c0b 100644 (file)
@@ -23,7 +23,11 @@ import java.util.Iterator;
 import java.util.Set;
 import java.util.Map.Entry;
 
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.ActionBarActivity;
+import android.view.MenuItem;
 import org.evergreen_ils.R;
+import org.evergreen_ils.accountAccess.AccountAccess;
 import org.evergreen_ils.globals.GlobalConfigs;
 import org.evergreen_ils.views.AccountScreenDashboard;
 import org.evergreen_ils.views.splashscreen.SplashActivity;
@@ -41,13 +45,7 @@ import android.widget.Button;
 import android.widget.LinearLayout;
 import android.widget.TextView;
 
-public class MoreCopyInformation extends Activity {
-
-    private Button homeButton;
-
-    private Button myAccountButton;
-
-    private TextView headerTitle;
+public class MoreCopyInformation extends ActionBarActivity {
 
     private Context context;
 
@@ -64,33 +62,16 @@ public class MoreCopyInformation extends Activity {
         }
 
         setContentView(R.layout.copy_information_more);
+
+        // set up action bar
+        ActionBar actionBar = getSupportActionBar();
+        actionBar.setSubtitle(AccountAccess.userName);
+        actionBar.setDisplayHomeAsUpEnabled(true);
+
         gl = GlobalConfigs.getGlobalConfigs(context);
         context = this;
         record = (RecordInfo) getIntent().getSerializableExtra("recordInfo");
 
-        // header portion actions
-        myAccountButton = (Button) findViewById(R.id.my_account_button);
-        myAccountButton.setOnClickListener(new OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                Intent intent = new Intent(getApplicationContext(),
-                        AccountScreenDashboard.class);
-                startActivity(intent);
-            }
-        });
-
-        homeButton = (Button) findViewById(R.id.action_bar_home_button);
-        homeButton.setText(R.string.copy_information_title);
-        homeButton.setOnClickListener(new OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                Intent intent = new Intent(getApplicationContext(),
-                        SearchCatalogListView.class);
-                startActivity(intent);
-            }
-        });
-        // end header portion actions
-
         LayoutInflater inf = (LayoutInflater) context
                 .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
 
@@ -100,6 +81,17 @@ public class MoreCopyInformation extends Activity {
 
     }
 
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        int id = item.getItemId();
+        if (id == android.R.id.home) {
+            // make the action bar "up" caret work like "back"
+            onBackPressed();
+            return true;
+        }
+        return super.onOptionsItemSelected(item);
+    }
+
     public void addCopyInfo(LayoutInflater inflater, LinearLayout insertPoint) {
 
         for (int i = 0; i < record.copyInformationList.size(); i++) {
index d2c5160..d62b594 100644 (file)
@@ -345,8 +345,7 @@ public class BasicDetailsFragment extends Fragment {
 
         for (int i = start; i < stop; 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
@@ -358,10 +357,8 @@ public class BasicDetailsFragment extends Fragment {
 
             library.setText(gl.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);
+            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(
index 987135f..d17421f 100644 (file)
@@ -25,9 +25,6 @@ import org.evergreen_ils.views.splashscreen.SplashActivity;
  */
 public class MainActivity extends ActionBarActivity {
 
-    private Button checkedOutButton;
-    private Button holdsButton;
-    private Button finesButton;
     private GlobalConfigs globalConfigs;
 
     public void onCreate(Bundle savedInstanceState) {
@@ -77,6 +74,8 @@ public class MainActivity extends ActionBarActivity {
         } else if (id == R.id.account_btn_book_bags) {
             startActivity(new Intent(getApplicationContext(), BookbagsListView.class));
 
+        } else if (id == R.id.main_btn_search) {
+            startActivity(new Intent(getApplicationContext(), SearchCatalogListView.class));
         }
     }
 }
index 7b7f2fe..0228adb 100644 (file)
@@ -71,7 +71,9 @@
                 android:name="org.evergreen_ils.searchCatalog.SampleUnderlinesNoFade"
                 android:label="@string/search_details_title">
         </activity>
-        <activity android:name="org.evergreen_ils.searchCatalog.MoreCopyInformation" >
+        <activity
+                android:name="org.evergreen_ils.searchCatalog.MoreCopyInformation"
+                android:label="@string/copy_information_title">
         </activity>
         <activity
                 android:name="org.evergreen_ils.searchCatalog.SearchCatalogListView"