added header action bar to activities + bug fix on delete bookbag
authordrizea <danielrizea27@gmail.com>
Wed, 25 Jul 2012 09:06:11 +0000 (12:06 +0300)
committerdrizea <danielrizea27@gmail.com>
Wed, 25 Jul 2012 09:06:11 +0000 (12:06 +0300)
added action bar to activities and added title for good user navigation

21 files changed:
Open-ILS/src/Android/res/drawable/header_rounded_corners.xml
Open-ILS/src/Android/res/drawable/one_header_rounded_corner.xml [new file with mode: 0644]
Open-ILS/src/Android/res/layout/bookbag_list.xml
Open-ILS/src/Android/res/layout/bookbagitem_list.xml
Open-ILS/src/Android/res/layout/checkout_list.xml
Open-ILS/src/Android/res/layout/fines.xml
Open-ILS/src/Android/res/layout/hold_details.xml
Open-ILS/src/Android/res/layout/holds_list.xml
Open-ILS/src/Android/res/layout/search_result_list.xml
Open-ILS/src/Android/res/layout/simple_actionbar.xml
Open-ILS/src/Android/res/values/strings.xml
Open-ILS/src/Android/res/values/styles.xml
Open-ILS/src/Android/src/org/evergreen/android/accountAccess/bookbags/BookBagDetails.java
Open-ILS/src/Android/src/org/evergreen/android/accountAccess/bookbags/BookbagsListView.java
Open-ILS/src/Android/src/org/evergreen/android/accountAccess/checkout/ItemsCheckOutListView.java
Open-ILS/src/Android/src/org/evergreen/android/accountAccess/fines/FinesActivity.java
Open-ILS/src/Android/src/org/evergreen/android/accountAccess/holds/HoldDetails.java
Open-ILS/src/Android/src/org/evergreen/android/accountAccess/holds/HoldsListView.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/utils/ui/BasicDetailsFragment.java

index ff1ab2e..723a013 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?> 
 <shape xmlns:android="http://schemas.android.com/apk/res/android" 
      android:shape="rectangle"> 
-     <gradient android:startColor="@color/header_gradient_start" android:endColor="@color/header_gradient_stop" 
+     <gradient android:startColor="@color/header_gradient_stop" android:endColor="@color/header_gradient_stop" 
             android:angle="270"/> 
 
     <corners android:bottomRightRadius="8dp" android:bottomLeftRadius="8dp" /> 
diff --git a/Open-ILS/src/Android/res/drawable/one_header_rounded_corner.xml b/Open-ILS/src/Android/res/drawable/one_header_rounded_corner.xml
new file mode 100644 (file)
index 0000000..f081f7b
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?> 
+<shape xmlns:android="http://schemas.android.com/apk/res/android" 
+     android:shape="rectangle"> 
+     <gradient android:startColor="@color/header_gradient_start" android:endColor="@color/header_gradient_stop" 
+            android:angle="270"/> 
+
+    <corners android:bottomLeftRadius="8dp"/> 
+</shape> 
\ No newline at end of file
index 19e543f..8d96a54 100644 (file)
@@ -4,10 +4,13 @@
     android:layout_height="fill_parent"
     android:orientation="vertical" >
    
+    <include android:id="@+id/header_actionbar" layout="@layout/simple_actionbar"/>
+    
     <LinearLayout 
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:orientation="horizontal"
+        style="@style/Content"
         >
 
         <TextView 
index c433c1e..75ab737 100644 (file)
@@ -4,6 +4,7 @@
     android:layout_height="fill_parent"
     android:orientation="vertical" >
     
+    <include android:id="@+id/header_actionbar" layout="@layout/simple_actionbar"/>
     
     <LinearLayout 
         android:layout_width="fill_parent"
index 0f81f55..3e80402 100644 (file)
@@ -4,6 +4,9 @@
     android:layout_height="fill_parent"
     android:orientation="vertical" >
     
+    
+       <include android:id="@+id/header_actionbar" layout="@layout/simple_actionbar"/>
+    
     <LinearLayout android:layout_width="fill_parent"
          android:layout_height="wrap_content">
          <TextView 
index feb41cf..a6b5970 100644 (file)
@@ -4,6 +4,8 @@
     android:layout_height="fill_parent"
     android:orientation="vertical" >
 
+       <include android:id="@+id/header_actionbar" layout="@layout/simple_actionbar"/>
+    
          <TableLayout 
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
index 5871df6..4608f04 100644 (file)
@@ -3,27 +3,7 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent" >
   
-    
-    <LinearLayout
-               android:id="@+id/header"
-        android:layout_width="fill_parent"
-        android:layout_height="40dip"
-        android:background="@color/blue"
-        android:layout_alignParentTop="true"
-    >
-           <TextView
-               android:id="@+id/header_title"
-               android:layout_width="wrap_content"
-               android:layout_height="wrap_content"
-               android:paddingLeft="5dip"
-               android:paddingTop="5dip"
-               android:textColor="@color/white"
-               android:textStyle="bold"
-               android:textSize="16dip"
-               />
-
-        
-    </LinearLayout>
+       <include android:id="@+id/header_actionbar" layout="@layout/simple_actionbar"/>
         
        <LinearLayout
            android:id="@+id/action_bar"
@@ -61,7 +41,7 @@
         android:layout_height="wrap_content"
         android:fillViewport="true"
         android:layout_above="@id/action_bar"
-        android:layout_below="@id/header"
+        android:layout_below="@id/header_actionbar"
         >
        <LinearLayout 
            android:layout_width="fill_parent"
index b03267e..b7bb837 100644 (file)
@@ -3,6 +3,9 @@
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
     android:orientation="vertical" >
+    
+    <include android:id="@+id/header_actionbar" layout="@layout/simple_actionbar"/>
+    
      <LinearLayout android:layout_width="fill_parent"
          android:layout_height="wrap_content">
          <TextView 
index 22219e5..41929f6 100644 (file)
@@ -38,6 +38,8 @@
             android:layout_height="wrap_content"
             android:padding="4dp"
             android:id="@+id/search_text_container"
+            android:focusable="true" 
+               android:focusableInTouchMode="true"
             android:layout_below="@id/library_logo">
 
             <EditText
              />
          
             <Button 
+             android:id="@+id/library_hours_button"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:text="@string/menu_button_library_hours"
              />
                   
             
-            <Button 
+            <Button
+             android:id="@+id/preference_button" 
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:text="@string/menu_button_application_preferences"
index 4c9b5bb..18aa0fb 100644 (file)
@@ -1,11 +1,17 @@
 <?xml version="1.0" encoding="utf-8"?>
+
+<RelativeLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="fill_parent"
+    android:layout_height="wrap_content"
+    >
+
 <RelativeLayout
-       xmlns:android="http://schemas.android.com/apk/res/android"
         android:id="@+id/header"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:orientation="horizontal"
-        android:background="@drawable/header_rounded_corners"
+        android:background="@drawable/one_header_rounded_corner"
         android:paddingTop="3dip"
         android:paddingBottom="3dip"
         >
@@ -19,7 +25,7 @@
             android:layout_alignParentLeft="true"
             android:padding="10dip"
             />
-
+        
         <Button
             android:id="@+id/my_acount_button"
             android:layout_width="wrap_content"
             android:layout_alignParentRight="true"
             android:padding="10dip"
             />
-
-    </RelativeLayout>
\ No newline at end of file
+    </RelativeLayout>
+    
+        <TextView 
+            android:id="@+id/header_title"
+            android:layout_width="150dip"
+            android:layout_height="wrap_content"
+            android:singleLine="true"
+            android:layout_below="@id/header"
+            android:paddingLeft="5dip"
+            android:paddingTop="2dip"
+            android:paddingBottom="2dip"
+            android:textStyle="bold"
+            android:gravity="center"
+            android:layout_alignParentLeft="true"
+            android:background="@drawable/header_rounded_corners"
+            />
+        
+</RelativeLayout>
\ No newline at end of file
index 9ff7a61..1333c20 100644 (file)
@@ -6,6 +6,16 @@
     <string name="my_account_button_text">My Account</string>
     <string name="options_button_text">Options</string>
     
+    <string name="checkout_items_title">checkout items</string>
+    <string name="hold_items_title">holds</string>
+    <string name="hold_place_title">place hold</string>
+    <string name="hold_details_title">hold details</string>
+    <string name="bookbag_items_title">bookbags</string>
+    <string name="bookbag_details_title">bookbag details</string>
+    <string name="fines_title">fines</string>
+    
+    
+    
     <string name="search_hint">What are you looking for?</string>
     <string name="advanced_search_hint">Enter text here</string>
     <string name="advanced_search_add_filter_button">Add filter</string>
index 64a9758..232af06 100644 (file)
         <item name="android:textStyle">bold</item>
    </style>
    
+   
+   <style name="Content">
+       <item name="android:layout_marginTop">5dip</item>
+   </style>
     
     <!--  Menu List Buttons -->
    <style name="MenuListButton">
index 84066be..41d617d 100644 (file)
@@ -11,6 +11,8 @@ import org.evergreen.android.globals.NoNetworkAccessException;
 import org.evergreen.android.globals.Utils;
 import org.evergreen.android.searchCatalog.RecordInfo;
 import org.evergreen.android.searchCatalog.SearchCatalog;
+import org.evergreen.android.searchCatalog.SearchCatalogListView;
+import org.evergreen.android.views.AccountScreenDashboard;
 
 import android.app.Activity;
 import android.app.AlertDialog;
@@ -19,6 +21,7 @@ import android.app.Service;
 import android.app.AlertDialog.Builder;
 import android.content.Context;
 import android.content.DialogInterface;
+import android.content.Intent;
 import android.net.ConnectivityManager;
 import android.os.Bundle;
 import android.util.Log;
@@ -60,6 +63,11 @@ private String TAG = "BookBags";
        
        private Button delete_bookbag_button;
        
+       private Button homeButton;
+       
+       private Button myAccountButton;
+       
+       private TextView headerTitle;
        
        private Runnable getBookBagsItemsRunnable;
        @Override
@@ -68,6 +76,29 @@ private String TAG = "BookBags";
                super.onCreate(savedInstanceState);
                
                setContentView(R.layout.bookbagitem_list);
+                //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.bookbag_details_title);
+        
+        myAccountButton.setOnClickListener(new OnClickListener() {
+                       @Override
+                       public void onClick(View v) {
+                               Intent intent = new Intent(getApplicationContext(),AccountScreenDashboard.class);
+                               startActivity(intent);
+                       }
+               });
+        
+        homeButton.setOnClickListener(new OnClickListener() {
+                       @Override
+                       public void onClick(View v) {
+                               Intent intent = new Intent(getApplicationContext(),SearchCatalogListView.class);
+                               startActivity(intent);
+                       }
+               });
+        //end header portion actions
+               
                accountAccess = AccountAccess.getAccountAccess();
                bookBag = (BookBag) getIntent().getSerializableExtra("bookBag");
                
@@ -125,15 +156,6 @@ private String TAG = "BookBags";
 
                                                                progressDialog = ProgressDialog.show(context, "Please wait", "Deleting Bookbag");
                                                                deleteBookbag.start();
-                                                               
-                                                                               runOnUiThread(new Runnable() {
-                                                                                       @Override
-                                                                                       public void run() {
-                                                                                               progressDialog.dismiss();
-                                                                                               setResult(RESULT_CODE_UPDATE);
-                                                                                               finish();       
-                                                                                       }
-                                                                               });
                                                                        }
                                                                });
 
index e213cb8..7cc1226 100644 (file)
@@ -9,6 +9,8 @@ import org.evergreen.android.accountAccess.SessionNotFoundException;
 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.AccountScreenDashboard;
 
 import android.app.Activity;
 import android.app.ProgressDialog;
@@ -52,6 +54,12 @@ public class BookbagsListView extends Activity{
        
        private Runnable getBookbagsRunnable;
        
+       private Button homeButton;
+       
+       private Button myAccountButton;
+       
+       private TextView headerTitle;
+       
        @Override
        public void onCreate(Bundle savedInstanceState) {
                // TODO Auto-generated method stub
@@ -59,6 +67,29 @@ public class BookbagsListView extends Activity{
                
                setContentView(R.layout.bookbag_list);
                
+                //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.bookbag_items_title);
+        
+        myAccountButton.setOnClickListener(new OnClickListener() {
+                       @Override
+                       public void onClick(View v) {
+                               Intent intent = new Intent(getApplicationContext(),AccountScreenDashboard.class);
+                               startActivity(intent);
+                       }
+               });
+        
+        homeButton.setOnClickListener(new OnClickListener() {
+                       @Override
+                       public void onClick(View v) {
+                               Intent intent = new Intent(getApplicationContext(),SearchCatalogListView.class);
+                               startActivity(intent);
+                       }
+               });
+        //end header portion actions
+               
                context = this;
                accountAccess = AccountAccess.getAccountAccess();
                
index 42d5c71..54cb29e 100644 (file)
@@ -10,10 +10,13 @@ import org.evergreen.android.accountAccess.SessionNotFoundException;
 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.AccountScreenDashboard;
 
 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;
@@ -24,6 +27,7 @@ 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;
@@ -44,6 +48,12 @@ public class ItemsCheckOutListView extends Activity{
        
        private ProgressDialog progressDialog;
        
+       private Button homeButton;
+       
+       private Button myAccountButton;
+       
+       private TextView headerTitle;
+       
        @Override
        public void onCreate(Bundle savedInstanceState) {
                // TODO Auto-generated method stub
@@ -52,6 +62,29 @@ public class ItemsCheckOutListView extends Activity{
                setContentView(R.layout.checkout_list);
                setTitle("Checkout items");
                
+                //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.checkout_items_title);
+        
+        myAccountButton.setOnClickListener(new OnClickListener() {
+                       @Override
+                       public void onClick(View v) {
+                               Intent intent = new Intent(getApplicationContext(),AccountScreenDashboard.class);
+                               startActivity(intent);
+                       }
+               });
+        
+        homeButton.setOnClickListener(new OnClickListener() {
+                       @Override
+                       public void onClick(View v) {
+                               Intent intent = new Intent(getApplicationContext(),SearchCatalogListView.class);
+                               startActivity(intent);
+                       }
+               });
+        //end header portion actions
+               
                context = this;
                accountAccess = AccountAccess.getAccountAccess();
                lv = (ListView) findViewById(R.id.checkout_items_list);
index 1add524..1e46121 100644 (file)
@@ -9,17 +9,22 @@ import org.evergreen.android.accountAccess.SessionNotFoundException;
 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.AccountScreenDashboard;
 
 import android.app.Activity;
 import android.app.ProgressDialog;
 import android.content.Context;
+import android.content.Intent;
 import android.graphics.Color;
 import android.os.Bundle;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.View.OnClickListener;
 import android.widget.ArrayAdapter;
+import android.widget.Button;
 import android.widget.ListView;
 import android.widget.TextView;
 
@@ -42,6 +47,11 @@ public class FinesActivity extends Activity{
        
        private OverdueMaterialsArrayAdapter  listAdapter;
        
+       private Button homeButton;
+       
+       private Button myAccountButton;
+       
+       private TextView headerTitle;
        
        private Context context;
        @Override
@@ -49,6 +59,30 @@ public class FinesActivity extends Activity{
                super.onCreate(savedInstanceState);
                
                setContentView(R.layout.fines);
+               
+                //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.fines_title);
+        
+        myAccountButton.setOnClickListener(new OnClickListener() {
+                       @Override
+                       public void onClick(View v) {
+                               Intent intent = new Intent(getApplicationContext(),AccountScreenDashboard.class);
+                               startActivity(intent);
+                       }
+               });
+        
+        homeButton.setOnClickListener(new OnClickListener() {
+                       @Override
+                       public void onClick(View v) {
+                               Intent intent = new Intent(getApplicationContext(),SearchCatalogListView.class);
+                               startActivity(intent);
+                       }
+               });
+        //end header portion actions
+               
                lv = (ListView) findViewById(R.id.fines_overdue_materials_list);
                
                total_owned = (TextView) findViewById(R.id.fines_total_owned);
index 1cea6bf..52526af 100644 (file)
@@ -11,31 +11,33 @@ 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.AccountScreenDashboard;
 
 import android.app.Activity;
 import android.app.AlertDialog;
-import android.app.ProgressDialog;
 import android.app.AlertDialog.Builder;
 import android.app.DatePickerDialog;
+import android.app.ProgressDialog;
 import android.content.Context;
 import android.content.DialogInterface;
+import android.content.Intent;
 import android.graphics.Color;
 import android.os.Bundle;
 import android.text.format.DateFormat;
-import android.text.format.Time;
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemSelectedListener;
 import android.widget.ArrayAdapter;
 import android.widget.Button;
 import android.widget.CheckBox;
 import android.widget.CompoundButton;
+import android.widget.CompoundButton.OnCheckedChangeListener;
 import android.widget.DatePicker;
 import android.widget.EditText;
 import android.widget.Spinner;
 import android.widget.TextView;
-import android.widget.AdapterView.OnItemSelectedListener;
-import android.widget.CompoundButton.OnCheckedChangeListener;
 import android.widget.Toast;
 
 public class HoldDetails extends Activity {
@@ -96,6 +98,12 @@ public class HoldDetails extends Activity {
 
        private GlobalConfigs globalConfigs;
 
+       private Button homeButton;
+       
+       private Button myAccountButton;
+       
+       private TextView headerTitle;
+       
        @Override
        protected void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
@@ -103,6 +111,27 @@ public class HoldDetails extends Activity {
                setContentView(R.layout.hold_details);
                globalConfigs = GlobalConfigs.getGlobalConfigs(this);
 
+               
+               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.hold_details_title);
+               homeButton.setOnClickListener(new OnClickListener() {
+                       @Override
+                       public void onClick(View v) {
+                               Intent intent = new Intent(getApplicationContext(),SearchCatalogListView.class);
+                               startActivity(intent);
+                       }
+               });
+               myAccountButton.setOnClickListener(new OnClickListener() {
+                       @Override
+                       public void onClick(View v) {
+                               Intent intent = new Intent(getApplicationContext(), AccountScreenDashboard.class);
+                               startActivity(intent);
+                       }
+               });
+               
+               
                final HoldRecord record = (HoldRecord) getIntent()
                                .getSerializableExtra("holdRecord");
 
@@ -115,7 +144,6 @@ public class HoldDetails extends Activity {
                title = (TextView) findViewById(R.id.hold_title);
                author = (TextView) findViewById(R.id.hold_author);
                physical_description = (TextView) findViewById(R.id.hold_physical_description);
-               screen_title = (TextView) findViewById(R.id.header_title);
                cancelHold = (Button) findViewById(R.id.cancel_hold_button);
                updateHold = (Button) findViewById(R.id.update_hold_button);
                back = (Button) findViewById(R.id.back_button);
@@ -129,10 +157,6 @@ public class HoldDetails extends Activity {
                expiration_date = (EditText) findViewById(R.id.hold_expiration_date);
                thaw_date_edittext = (EditText) findViewById(R.id.hold_thaw_date);
 
-               screen_title.setText("Place Hold");
-
-
-
                recipient.setText(accountAccess.userName);
                title.setText(record.title);
                author.setText(record.author);
index bc64a57..36b6221 100644 (file)
@@ -9,6 +9,8 @@ import org.evergreen.android.accountAccess.SessionNotFoundException;
 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.AccountScreenDashboard;
 
 import android.app.Activity;
 import android.app.ProgressDialog;
@@ -18,10 +20,12 @@ import android.os.Bundle;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
+import android.view.View.OnClickListener;
 import android.view.ViewGroup;
 import android.widget.AdapterView;
 import android.widget.AdapterView.OnItemClickListener;
 import android.widget.ArrayAdapter;
+import android.widget.Button;
 import android.widget.ListView;
 import android.widget.TextView;
 import android.widget.Toast;
@@ -42,6 +46,12 @@ public class HoldsListView extends Activity{
        
        Runnable getHoldsRunnable= null;
        
+       private Button homeButton;
+       
+       private Button myAccountButton;
+       
+       private TextView headerTitle;
+
        private ProgressDialog progressDialog;
        @Override
        protected void onCreate(Bundle savedInstanceState) {
@@ -49,6 +59,28 @@ public class HoldsListView extends Activity{
                
                setContentView(R.layout.holds_list);
                
+                //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.hold_items_title);
+        
+        myAccountButton.setOnClickListener(new OnClickListener() {
+                       @Override
+                       public void onClick(View v) {
+                               Intent intent = new Intent(getApplicationContext(),AccountScreenDashboard.class);
+                               startActivity(intent);
+                       }
+               });
+        
+        homeButton.setOnClickListener(new OnClickListener() {
+                       @Override
+                       public void onClick(View v) {
+                               Intent intent = new Intent(getApplicationContext(),SearchCatalogListView.class);
+                               startActivity(intent);
+                       }
+               });
+        //end header portion actions
                
                lv = (ListView)findViewById(R.id.holds_item_list);
                context = this;
index e717763..7a72928 100644 (file)
@@ -7,17 +7,24 @@ import org.evergreen.android.utils.ui.BaseSampleActivity;
 import org.evergreen.android.utils.ui.BasicDetailsFragment;
 import org.evergreen.android.utils.ui.TestFragmentAdapter;
 import org.evergreen.android.utils.ui.UnderlinePageIndicator;
+import org.evergreen.android.views.AccountScreenDashboard;
 
+import android.content.Intent;
 import android.os.Bundle;
 import android.support.v4.app.Fragment;
 import android.support.v4.app.FragmentManager;
 import android.support.v4.view.ViewPager;
-import android.widget.ListView;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.Button;
 
 public class SampleUnderlinesNoFade extends BaseSampleActivity {
 
        private List<RecordInfo> records;
        
+       private Button myAccountButton;
+       
+       private Button homeButton;
        
        @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -25,7 +32,28 @@ public class SampleUnderlinesNoFade extends BaseSampleActivity {
         setContentView(R.layout.simple_underlines);
    
         records = (List<RecordInfo>)getIntent().getSerializableExtra("recordList");
-
+        
+        //header portion actions
+        homeButton = (Button) findViewById(R.id.library_logo);
+        myAccountButton = (Button) findViewById(R.id.my_acount_button);
+        
+        myAccountButton.setOnClickListener(new OnClickListener() {
+                       @Override
+                       public void onClick(View v) {
+                               Intent intent = new Intent(getApplicationContext(),AccountScreenDashboard.class);
+                               startActivity(intent);
+                       }
+               });
+        
+        homeButton.setOnClickListener(new OnClickListener() {
+                       @Override
+                       public void onClick(View v) {
+                               Intent intent = new Intent(getApplicationContext(),SearchCatalogListView.class);
+                               startActivity(intent);
+                       }
+               });
+        //end header portion actions
+        
         int record_position = getIntent().getIntExtra("recordPosition", 0);
         mAdapter = new SearchFragmentAdapter(getSupportFragmentManager());
 
@@ -39,6 +67,7 @@ public class SampleUnderlinesNoFade extends BaseSampleActivity {
         indicator.setViewPager(mPager);
         indicator.setFades(false);
         mIndicator = indicator;
+        
     }
     
     class SearchFragmentAdapter extends TestFragmentAdapter {
index 75ba139..a4ec2e5 100644 (file)
@@ -12,6 +12,8 @@ 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.views.AccountScreenDashboard;
+import org.evergreen.android.views.ApplicationPreferences;
 
 import android.app.Activity;
 import android.app.AlertDialog;
@@ -21,6 +23,7 @@ import android.content.Context;
 import android.content.Intent;
 import android.net.ConnectivityManager;
 import android.os.Bundle;
+import android.preference.PreferenceActivity;
 import android.util.Log;
 import android.view.ContextMenu;
 import android.view.ContextMenu.ContextMenuInfo;
@@ -94,8 +97,14 @@ public class SearchCatalogListView extends Activity{
        
        private Button advancedSearchButton = null;
        
+       private Button libraryHoursButton = null;
+       
+       private Button preferenceButton = null;
+       
        private Button homeButton = null;
        
+       private Button myAccountButton = null;
+       
        private String advancedSearchString = null;
        
     @Override
@@ -104,7 +113,16 @@ public class SearchCatalogListView extends Activity{
         setContentView(R.layout.search_result_list);
         setTitle("Browse catalog");
         
+        myAccountButton = (Button) findViewById(R.id.my_acount_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.library_logo);
         
         homeButton.setOnClickListener(new OnClickListener() {
@@ -113,7 +131,8 @@ public class SearchCatalogListView extends Activity{
                                searchOptionsMenu.setVisibility(View.VISIBLE);  
                        }
                });
-        
+        //end header portion actions
+
         advancedSearchButton = (Button) findViewById(R.id.menu_advanced_search_button);
         
         advancedSearchButton.setOnClickListener(new OnClickListener() {
@@ -152,15 +171,29 @@ public class SearchCatalogListView extends Activity{
                                        public void onClick(View v) {
                                                dialog.dismiss();
                                        }
-                               });
-                
-                
-                
+                               });   
                 dialog.setCancelable(true);
                 dialog.show();
                        }
                });
         
+        libraryHoursButton = (Button) findViewById(R.id.library_hours_button);
+        libraryHoursButton.setOnClickListener(new OnClickListener() {
+                       @Override
+                       public void onClick(View v) {
+                               // TODO Auto-generated method stub
+                       }
+               });
+        
+        preferenceButton = (Button) findViewById(R.id.preference_button);
+        preferenceButton.setOnClickListener(new OnClickListener() {
+                       @Override
+                       public void onClick(View v) {
+                               Intent intent = new Intent(getApplicationContext(), ApplicationPreferences.class);
+                               startActivity(intent);
+                       }
+               });
+        
         //singleton initialize necessary IDL and Org data
         globalConfigs = GlobalConfigs.getGlobalConfigs(this);
         
@@ -593,22 +626,17 @@ public class SearchCatalogListView extends Activity{
                                
 
                                alertDialog.show();
-                               
-                               
-                               
+       
                                s.setOnItemSelectedListener(new OnItemSelectedListener() {
 
                                                @Override
                                                public void onItemSelected(AdapterView<?> arg0, View arg1,
-                                                               int position, long arg3) {
-                                                       
+                                                               int position, long arg3) {      
                                                bookbag_selected = position;
                                                }
 
                                                @Override
                                                public void onNothingSelected(AdapterView<?> arg0) {
-                                                       // TODO Auto-generated method stub
-                                                       
                                                }
                                        
                                });
@@ -626,6 +654,7 @@ public class SearchCatalogListView extends Activity{
     }
     
     class SearchArrayAdapter extends ArrayAdapter<RecordInfo> {
+       
        private static final String tag = "SearchArrayAdapter";
        private Context context;
        private ImageView recordImage;
@@ -677,10 +706,8 @@ public class SearchCatalogListView extends Activity{
                                                row = inflater.inflate(R.layout.search_result_item, parent, false);
                                                Log.d(tag, "Successfully completed XML Row Inflation!");
        
-                               }
-               
-                   
-
+                   }
+                               
                Log.d(TAG, "reord image value " + recordImage);
                // Get reference to ImageView 
                recordImage = (ImageView) row.findViewById(R.id.search_record_img);
index 4a91e02..692f6da 100644 (file)
@@ -135,9 +135,7 @@ public class BasicDetailsFragment extends Fragment{
                                @Override
                                public void onClick(View v) {
                                        // TODO Auto-generated method stub
-                                       
-                               
-                                       
+
                                        System.out.println("Show more tabed");
                                        // insert into main view
                                        LinearLayout insertPoint = (LinearLayout) lay.findViewById(R.id.record_details_copy_information);