Removed some more unused code and resources. Fixed the big UI problem with using...
authorkenstir <kenstir@gmail.com>
Sun, 5 Jan 2014 20:04:05 +0000 (15:04 -0500)
committerkenstir <kenstir@gmail.com>
Sun, 5 Jan 2014 20:04:05 +0000 (15:04 -0500)
33 files changed:
Open-ILS/src/Android/core/core.iml
Open-ILS/src/Android/core/res/layout-land/dashbord_account.xml [deleted file]
Open-ILS/src/Android/core/res/layout-land/search_result_list.xml
Open-ILS/src/Android/core/res/layout/bookbag_list.xml
Open-ILS/src/Android/core/res/layout/bookbagitem_list.xml
Open-ILS/src/Android/core/res/layout/dashbord_account.xml [deleted file]
Open-ILS/src/Android/core/res/layout/hold_details.xml
Open-ILS/src/Android/core/res/layout/place_hold.xml
Open-ILS/src/Android/core/res/layout/record_details_basic_fragment.xml
Open-ILS/src/Android/core/res/layout/search_result_list.xml
Open-ILS/src/Android/core/res/layout/simple_actionbar.xml [deleted file]
Open-ILS/src/Android/core/res/layout/spinner_gb_layout.xml [new file with mode: 0644]
Open-ILS/src/Android/core/res/layout/spinner_layout.xml
Open-ILS/src/Android/core/res/values/styles.xml
Open-ILS/src/Android/core/src/org/evergreen_ils/accountAccess/bookbags/BookBagDetails.java
Open-ILS/src/Android/core/src/org/evergreen_ils/accountAccess/bookbags/BookbagsListView.java
Open-ILS/src/Android/core/src/org/evergreen_ils/accountAccess/checkout/ItemsCheckOutListView.java
Open-ILS/src/Android/core/src/org/evergreen_ils/accountAccess/fines/FinesActivity.java
Open-ILS/src/Android/core/src/org/evergreen_ils/accountAccess/holds/HoldDetails.java
Open-ILS/src/Android/core/src/org/evergreen_ils/accountAccess/holds/HoldsListView.java
Open-ILS/src/Android/core/src/org/evergreen_ils/accountAccess/holds/PlaceHold.java
Open-ILS/src/Android/core/src/org/evergreen_ils/globals/ShowSessionNotAvailableRunnable.java [deleted file]
Open-ILS/src/Android/core/src/org/evergreen_ils/globals/Utils.java
Open-ILS/src/Android/core/src/org/evergreen_ils/searchCatalog/AdvancedSearchActivity.java
Open-ILS/src/Android/core/src/org/evergreen_ils/searchCatalog/MoreCopyInformation.java
Open-ILS/src/Android/core/src/org/evergreen_ils/searchCatalog/SampleUnderlinesNoFade.java
Open-ILS/src/Android/core/src/org/evergreen_ils/searchCatalog/SearchCatalogListView.java
Open-ILS/src/Android/core/src/org/evergreen_ils/utils/ui/CompatSpinnerAdapter.java [new file with mode: 0644]
Open-ILS/src/Android/core/src/org/evergreen_ils/views/AccountScreenDashboard.java [deleted file]
Open-ILS/src/Android/core/src/org/evergreen_ils/views/MainActivity.java
Open-ILS/src/Android/cwmars_app/AndroidManifest.xml
Open-ILS/src/Android/cwmars_app/cwmars_app.iml
Open-ILS/src/Android/cwmars_app/project.properties

index 6ec5390..666c9b1 100644 (file)
@@ -16,7 +16,7 @@
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="library" exported="" name="libs" level="project" />
-    <orderEntry type="module" module-name="appcompat" />
+    <orderEntry type="module" module-name="appcompat" exported="" />
   </component>
 </module>
 
diff --git a/Open-ILS/src/Android/core/res/layout-land/dashbord_account.xml b/Open-ILS/src/Android/core/res/layout-land/dashbord_account.xml
deleted file mode 100644 (file)
index c96eabc..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="fill_parent"
-    android:layout_height="match_parent"
-    android:background="@drawable/background_grey_image"
-    android:orientation="vertical" >
-
-    <RelativeLayout
-        android:id="@+id/header"
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:background="@drawable/header_rounded_corners"
-        android:orientation="horizontal"
-        android:paddingBottom="2dip"
-        android:paddingTop="3dip" >
-
-        <Button
-            android:id="@+id/action_bar_home_button"
-            style="@style/LibraryLogoText"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_alignParentLeft="true"
-            android:layout_marginLeft="5dip"
-            android:drawableLeft="@drawable/evergreen_launcher_icon_48"
-            android:paddingLeft="5dip"
-            android:text="@string/ou_app_label"
-            android:textColor="@color/white"
-            android:textSize="16sp"
-            />
-
-    </RelativeLayout>
-
-    <ScrollView
-        android:layout_width="fill_parent"
-        android:layout_height="fill_parent" 
-        android:layout_gravity="center"
-        >
-
-        <LinearLayout
-            android:layout_width="fill_parent"
-            android:layout_height="match_parent"
-            android:gravity="center"
-            android:orientation="horizontal" >
-
-            <Button
-                android:id="@+id/account_btn_check_out"
-                style="@style/HomeButton"
-                android:layout_weight="1"
-                android:drawableTop="@drawable/check_out"
-                android:onClick="onButtonClick"
-                android:text="@string/title_check_out" />
-
-            <Button
-                android:id="@+id/account_btn_holds"
-                style="@style/HomeButton"
-                android:layout_weight="1"
-                android:drawableTop="@drawable/holds"
-                android:onClick="onButtonClick"
-                android:text="@string/title_holds" />
-
-            <Button
-                android:id="@+id/account_btn_fines"
-                style="@style/HomeButton"
-                android:layout_weight="1"
-                android:drawableTop="@drawable/fines"
-                android:onClick="onButtonClick"
-                android:text="@string/title_fines" />
-
-            <Button
-                android:id="@+id/account_btn_book_bags"
-                style="@style/HomeButton"
-                android:layout_weight="1"
-                android:drawableTop="@drawable/book_bag"
-                android:onClick="onButtonClick"
-                android:text="@string/title_book_bags" />
-        </LinearLayout>
-
-    </ScrollView>
-
-</LinearLayout>
\ No newline at end of file
index 736ab75..9ae05b0 100644 (file)
@@ -8,12 +8,11 @@
     <LinearLayout
             android:id="@+id/search_text_container"
             android:orientation="horizontal"
-            android:layout_width="fill_parent"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:padding="4dp"
             android:focusable="true"
-            android:focusableInTouchMode="true"
-            android:layout_below="@id/action_bar_home_button">
+            android:focusableInTouchMode="true">
 
         <EditText
                 android:id="@+id/searchText"
                 android:layout_width="fill_parent"
                 android:layout_height="wrap_content"
                 android:layout_gravity="center_horizontal"
-                android:layout_weight="1"/>
+                android:layout_weight="1"
+                android:spinnerMode="dialog"/>
 
         <ImageButton
                 android:id="@+id/searchButton"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:src="@drawable/ic_action_search"
+                android:src="@drawable/abc_ic_search"
                 android:paddingLeft="10dp"
                 android:paddingRight="10dp"
                 android:paddingTop="5dp"
index 02ff45e..2635b80 100644 (file)
@@ -5,9 +5,7 @@
     android:orientation="vertical"
     android:background="@color/background"
      >
-   
-    <include android:id="@+id/header_actionbar" layout="@layout/simple_actionbar"/>
-    
+
     <LinearLayout 
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
index e4d1ca0..88da7c3 100644 (file)
@@ -5,9 +5,7 @@
     android:orientation="vertical" 
     android:background="@drawable/background_grey_image"
     >
-    
-    <include android:id="@+id/header_actionbar" layout="@layout/simple_actionbar"/>
-    
+
     <LinearLayout 
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
diff --git a/Open-ILS/src/Android/core/res/layout/dashbord_account.xml b/Open-ILS/src/Android/core/res/layout/dashbord_account.xml
deleted file mode 100644 (file)
index a3d977a..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent"
-    android:orientation="vertical"
-    android:background="@drawable/background_grey_image"
-     >
-    
-    <RelativeLayout
-        android:id="@+id/header"
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:background="@drawable/header_rounded_corners"
-        android:orientation="horizontal"
-        android:paddingTop="3dip"
-        android:paddingBottom="2dip"
-         >
-
-        <Button
-            android:id="@+id/action_bar_home_button"
-            style="@style/LibraryLogoText"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_alignParentLeft="true"
-            android:layout_marginLeft="5dip"
-            android:drawableLeft="@drawable/evergreen_launcher_icon_48"
-            android:text="@string/ou_app_label"
-            android:textColor="@color/white"
-            android:textSize="16sp"
-            android:paddingLeft="5dip"
-            />
-
-    </RelativeLayout>
-    
-       <LinearLayout
-        android:orientation="horizontal"
-        android:layout_width="fill_parent"
-        android:layout_height="fill_parent"
-        android:layout_weight="1"
-        android:gravity="center"
-        >
-        <Button android:id="@+id/account_btn_check_out"
-            style="@style/HomeButton"
-            android:onClick="onButtonClick"
-            android:text="@string/title_check_out"
-            android:drawableTop="@drawable/check_out"/>
-        <Button android:id="@+id/account_btn_holds"
-            style="@style/HomeButton"
-            android:onClick="onButtonClick"
-            android:text="@string/title_holds"
-            android:drawableTop="@drawable/holds"/>
-    </LinearLayout>
-
-    <LinearLayout
-        android:orientation="horizontal"
-        android:layout_width="fill_parent"
-        android:layout_height="fill_parent"
-        android:gravity="center"
-        android:layout_weight="1">
-        <Button android:id="@+id/account_btn_fines"
-            style="@style/HomeButton"
-            android:onClick="onButtonClick"
-            android:text="@string/title_fines"
-            android:drawableTop="@drawable/fines"/>
-        <Button android:id="@+id/account_btn_book_bags"
-            style="@style/HomeButton"
-            android:onClick="onButtonClick"
-            android:text="@string/title_book_bags"
-            android:drawableTop="@drawable/book_bag"/>
-    </LinearLayout>
-
-</LinearLayout>
\ No newline at end of file
index 7caae12..0dbd086 100644 (file)
@@ -5,52 +5,13 @@
     android:background="@drawable/background_grey_image"
      >
 
-       <LinearLayout
-           android:id="@+id/action_bar"
-               android:layout_width="wrap_content" 
-               android:layout_height="wrap_content"
-               android:orientation="horizontal"
-               android:gravity="center_horizontal"
-               android:layout_alignParentBottom="true"
-               android:layout_centerInParent="true"
-               android:paddingBottom="3dip"
-               >
-               <Button
-                   android:id="@+id/back_button"
-                   android:layout_width="100dip"
-                   android:layout_height="wrap_content"
-                   android:text="@string/back"
-                   style="@style/ApplicationButton"
-                   android:layout_margin="5dip"
-                   />
-               
-               <Button 
-                   android:id="@+id/cancel_hold_button"
-                   android:layout_width="100dip"
-                   android:layout_height="wrap_content"
-                   android:text="@string/cancel_hold"
-                   style="@style/ApplicationButton"
-                   android:layout_margin="5dip"
-                   />   
-                   
-                <Button 
-                   android:id="@+id/update_hold_button"
-                   android:layout_width="100dip"
-                   android:layout_height="wrap_content"
-                   android:text="@string/update_hold"
-                   style="@style/ApplicationButton"
-                   android:layout_margin="5dip"
-                   />  
-           </LinearLayout>
-    
-    <ScrollView 
+    <ScrollView
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:fillViewport="true"
         android:layout_above="@id/action_bar"
-        android:layout_below="@id/header_actionbar"
         android:padding="5dp"
-        >
+        android:layout_alignParentTop="true">
        <LinearLayout 
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
                            android:layout_weight="2"
                            android:text="@string/author"
                            />
-                       
-                       <TextView 
+
+                       <TextView
                            android:id="@+id/hold_author"
                            android:layout_width="0dip"
                            android:layout_height="wrap_content"
                            android:gravity="center"
                            />    
            </LinearLayout>
-                       <LinearLayout 
+                       <LinearLayout
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                >
-                       <TextView 
+                       <TextView
                            android:layout_width="0dip"
                            android:layout_height="wrap_content"
                            android:layout_weight="2"
                            android:text="@string/physical_description"
                            />
-                       
-                       <TextView 
+
+                       <TextView
                            android:id="@+id/hold_physical_description"
                            android:layout_width="0dip"
                            android:layout_height="wrap_content"
                            android:layout_weight="4"
                            android:gravity="center"
-                           />    
+                           />
            </LinearLayout>
-                       <LinearLayout 
+                       <LinearLayout
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                            android:layout_height="wrap_content"
                            android:layout_weight="4"
                            android:gravity="center"
+                    android:spinnerMode="dialog"
                            />    
            </LinearLayout>
                        <LinearLayout 
     
     </ScrollView>
 
+    <LinearLayout
+            android:id="@+id/action_bar"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal"
+            android:gravity="center_horizontal"
+            android:layout_alignParentBottom="true"
+            android:layout_centerInParent="true"
+            android:paddingBottom="3dip"
+            >
+        <Button
+                android:id="@+id/back_button"
+                android:layout_width="100dip"
+                android:layout_height="wrap_content"
+                android:text="@string/back"
+                style="@style/ApplicationButton"
+                android:layout_margin="5dip"
+                />
+
+        <Button
+                android:id="@+id/cancel_hold_button"
+                android:layout_width="100dip"
+                android:layout_height="wrap_content"
+                android:text="@string/cancel_hold"
+                style="@style/ApplicationButton"
+                android:layout_margin="5dip"
+                />
+
+        <Button
+                android:id="@+id/update_hold_button"
+                android:layout_width="100dip"
+                android:layout_height="wrap_content"
+                android:text="@string/update_hold"
+                style="@style/ApplicationButton"
+                android:layout_margin="5dip"
+                />
+    </LinearLayout>
+
+
 
 </RelativeLayout>
\ No newline at end of file
index 9ba1d4a..08c7000 100644 (file)
                            android:layout_height="wrap_content"
                            android:layout_weight="4"
                            android:gravity="center"
+                    android:spinnerMode="dialog"
                            />    
            </LinearLayout>
                        <LinearLayout 
index aff3a10..12d59ad 100644 (file)
                 android:id="@+id/record_details_simple_copy_count"
                 android:textStyle="bold"
                 android:layout_height="wrap_content"
-                android:layout_width="match_parent"/>
-            <!-- style="@style/SeparatorInformation" -->
+                android:layout_width="match_parent"
+                />
 
                        <LinearLayout
                            android:id="@+id/record_details_copy_information"
index 2f9cac8..b27f074 100644 (file)
@@ -13,7 +13,6 @@
             android:focusableInTouchMode="true"
             android:orientation="vertical"
             android:padding="4dp"
-            android:background="@drawable/grey_rounded_corners"
             android:layout_marginTop="4dip"
             >
 
@@ -47,7 +46,7 @@
                     android:paddingLeft="10dp"
                     android:paddingRight="10dp"
                     android:paddingTop="5dp"
-                    android:src="@drawable/ic_action_search"/>
+                    android:src="@drawable/abc_ic_search"/>
         </LinearLayout>
     </LinearLayout>
 
diff --git a/Open-ILS/src/Android/core/res/layout/simple_actionbar.xml b/Open-ILS/src/Android/core/res/layout/simple_actionbar.xml
deleted file mode 100644 (file)
index d25829b..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?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
-        android:id="@+id/header"
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:background="@drawable/header_rounded_corners"
-        android:orientation="horizontal"
-        android:paddingTop="3dip"
-        android:paddingBottom="2dip"
-         >
-
-        <Button
-            android:id="@+id/action_bar_home_button"
-            style="@style/LibraryLogoText"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_alignParentLeft="true"
-            android:layout_marginLeft="5dip"
-            android:drawableLeft="@drawable/evergreen_launcher_icon_48"
-            android:text="@string/ou_app_label"
-            android:textColor="@color/white"
-            android:textSize="16sp"
-            android:paddingLeft="5dip"
-            />
-        
-        <Button
-            android:id="@+id/my_account_button"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:padding="10dip"
-            android:text="@string/my_account_button_text"
-            style="@style/HeaderButton"
-            android:layout_centerVertical="true" android:layout_alignParentRight="true"/>
-    </RelativeLayout>
-
-</RelativeLayout>
\ No newline at end of file
diff --git a/Open-ILS/src/Android/core/res/layout/spinner_gb_layout.xml b/Open-ILS/src/Android/core/res/layout/spinner_gb_layout.xml
new file mode 100644 (file)
index 0000000..f1e6e02
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+          android:id="@+id/junkTextView"
+          android:layout_width="match_parent"
+          android:layout_height="match_parent"
+          android:layout_gravity="center"
+          android:textColor="@color/dark"
+          android:padding="5dp"
+          android:gravity="center"
+          android:singleLine="true"
+        />
index c2b90a1..d914dec 100644 (file)
@@ -4,7 +4,7 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:layout_gravity="center"
-    android:textColor="@color/dark"
+    android:textColor="?android:textColorPrimary"
     android:padding="5dp"
     android:gravity="center"
     android:singleLine="true"
index e5a9d0b..92f353e 100644 (file)
@@ -1,18 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources xmlns:android="http://schemas.android.com/apk/res/android">
 
-    <style name="sectionHeader" parent="android:attr/listSeparatorTextViewStyle">
-        <item name="android:layout_width">fill_parent</item>
-        <item name="android:layout_height">wrap_content</item>
-        <item name="android:paddingTop">2dip</item>
-        <item name="android:paddingBottom">2dip</item>
-        <item name="android:paddingLeft">8dip</item>
-        <item name="android:textSize">16sp</item>
-        <item name="android:textStyle">bold</item>
-        <item name="android:background">@color/background3</item>
-        <item name="android:textColor">@color/foreground1</item>
-    </style>
-
     <style name="textSmall">
         <item name="android:textSize">14sp</item>
         <item name="android:paddingLeft">15dip</item>
         <item name="android:layout_height">14dip</item>
     </style>
 
-    <style name="HomeButton">
-        <item name="android:layout_gravity">center_vertical</item>
-        <item name="android:layout_width">130dip</item>
-        <item name="android:layout_height">130dip</item>
-        <item name="android:layout_margin">5dip</item>
-        <item name="android:gravity">center_horizontal</item>
-        <item name="android:textSize">@dimen/text_size_medium</item>
-        <item name="android:textStyle">normal</item>
-        <item name="android:textColor">@color/dark</item>
-        <item name="android:background">@drawable/menu_background_button</item>
-    </style>
-
     <style name="BigActionButton">
         <item name="android:layout_marginRight">24dp</item>
         <item name="android:layout_marginLeft">24dp</item>
         <item name="android:textSize">14sp</item>
         <item name="android:gravity">left</item>
         <item name="android:textStyle">normal</item>
-        <!--
-        <item name="android:singleLine">italic</item>
-        -->
         <item name="android:ellipsize">end</item>
     </style>
 
     <style name="PubSearchStyleList">
         <item name="android:textSize">12sp</item>
         <item name="android:gravity">right</item>
-        <!--
-        <item name="android:textStyle">italic</item>
-        -->
         <item name="android:singleLine">true</item>
         <item name="android:ellipsize">end</item>
     </style>
 
     <!-- Tabs -->
 
-    <style name="StyledIndicators" parent="@android:style/Theme.Light">
+    <style name="StyledIndicators" parent="@style/Theme.AppCompat">
         <item name="vpiCirclePageIndicatorStyle">@style/CustomCirclePageIndicator</item>
         <item name="vpiLinePageIndicatorStyle">@style/CustomLinePageIndicator</item>
         <item name="vpiTitlePageIndicatorStyle">@style/CustomTitlePageIndicator</item>
         <item name="android:textColor">@color/dark</item>
     </style>
 
-    <style name="SeparatorInformation">
-        <item name="android:layout_width">fill_parent</item>
-        <item name="android:layout_height">wrap_content</item>
-        <item name="android:background">@drawable/shadow_rect</item>
-        <item name="android:padding">5dip</item>
-        <item name="android:layout_marginTop">10dip</item>
-        <item name="android:textColor">@color/dark</item>
-        <item name="android:gravity">center</item>
-        <item name="android:textStyle">bold</item>
-    </style>
-
     <style name="SearchDetailsActionButton">
         <item name="android:background">@drawable/details_button</item>
         <item name="android:textColor">@drawable/dark_text_color</item>
index 071c877..fdc047a 100644 (file)
@@ -22,13 +22,14 @@ package org.evergreen_ils.accountAccess.bookbags;
 import java.util.ArrayList;
 import java.util.List;
 
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.ActionBarActivity;
 import org.evergreen_ils.R;
 import org.evergreen_ils.accountAccess.AccountAccess;
 import org.evergreen_ils.accountAccess.SessionNotFoundException;
 import org.evergreen_ils.searchCatalog.RecordInfo;
 import org.evergreen_ils.searchCatalog.SearchCatalog;
 import org.evergreen_ils.searchCatalog.SearchCatalogListView;
-import org.evergreen_ils.views.AccountScreenDashboard;
 import org.evergreen_ils.views.splashscreen.SplashActivity;
 
 import android.app.Activity;
@@ -54,7 +55,7 @@ import android.widget.ListView;
 import android.widget.TextView;
 import android.widget.Toast;
 
-public class BookBagDetails extends Activity {
+public class BookBagDetails extends ActionBarActivity {
 
     private final String TAG = BookBagDetails.class.getName();
 
@@ -80,12 +81,6 @@ public class BookBagDetails extends Activity {
 
     private Button delete_bookbag_button;
 
-    private Button homeButton;
-
-    private Button myAccountButton;
-
-    private TextView headerTitle;
-
     private Runnable getBookBagsItemsRunnable;
 
     @Override
@@ -97,29 +92,11 @@ public class BookBagDetails extends Activity {
         }
 
         setContentView(R.layout.bookbagitem_list);
-        // header portion actions
-        homeButton = (Button) findViewById(R.id.action_bar_home_button);
-        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.setText(R.string.bookbag_details_title);
-        homeButton.setOnClickListener(new OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                Intent intent = new Intent(getApplicationContext(),
-                        SearchCatalogListView.class);
-                startActivity(intent);
-            }
-        });
-        // end header portion actions
+        // set up action bar
+        ActionBar actionBar = getSupportActionBar();
+        actionBar.setSubtitle(AccountAccess.userName);
+        actionBar.setDisplayHomeAsUpEnabled(true);
 
         accountAccess = AccountAccess.getAccountAccess();
         bookBag = (BookBag) getIntent().getSerializableExtra("bookBag");
index 16b0b42..8425c84 100644 (file)
@@ -22,11 +22,12 @@ package org.evergreen_ils.accountAccess.bookbags;
 import java.util.ArrayList;
 import java.util.List;
 
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.ActionBarActivity;
 import org.evergreen_ils.R;
 import org.evergreen_ils.accountAccess.AccountAccess;
 import org.evergreen_ils.accountAccess.SessionNotFoundException;
 import org.evergreen_ils.searchCatalog.SearchCatalogListView;
-import org.evergreen_ils.views.AccountScreenDashboard;
 import org.evergreen_ils.views.splashscreen.SplashActivity;
 
 import android.app.Activity;
@@ -49,7 +50,7 @@ import android.widget.ListView;
 import android.widget.TextView;
 import android.widget.Toast;
 
-public class BookbagsListView extends Activity {
+public class BookbagsListView extends ActionBarActivity {
 
     private final String TAG = BookbagsListView.class.getName();
 
@@ -71,12 +72,6 @@ public class BookbagsListView extends Activity {
 
     private Runnable getBookbagsRunnable;
 
-    private Button homeButton;
-
-    private Button myAccountButton;
-
-    private TextView headerTitle;
-
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
@@ -87,28 +82,10 @@ public class BookbagsListView extends Activity {
 
         setContentView(R.layout.bookbag_list);
 
-        // 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.bookbag_items_title);
-        homeButton.setOnClickListener(new OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                Intent intent = new Intent(getApplicationContext(),
-                        SearchCatalogListView.class);
-                startActivity(intent);
-            }
-        });
-        // end header portion actions
+        // set up action bar
+        ActionBar actionBar = getSupportActionBar();
+        actionBar.setSubtitle(AccountAccess.userName);
+        actionBar.setDisplayHomeAsUpEnabled(true);
 
         context = this;
         accountAccess = AccountAccess.getAccountAccess();
index c0f6a71..90a48b4 100644 (file)
@@ -31,8 +31,6 @@ import org.evergreen_ils.accountAccess.AccountAccess;
 import org.evergreen_ils.accountAccess.MaxRenewalsException;
 import org.evergreen_ils.accountAccess.ServerErrorMessage;
 import org.evergreen_ils.accountAccess.SessionNotFoundException;
-import org.evergreen_ils.searchCatalog.SearchCatalogListView;
-import org.evergreen_ils.views.AccountScreenDashboard;
 import org.evergreen_ils.views.splashscreen.SplashActivity;
 
 import android.app.Activity;
index 2fdba22..74307b9 100644 (file)
@@ -28,8 +28,6 @@ import android.support.v7.app.ActionBarActivity;
 import org.evergreen_ils.R;
 import org.evergreen_ils.accountAccess.AccountAccess;
 import org.evergreen_ils.accountAccess.SessionNotFoundException;
-import org.evergreen_ils.searchCatalog.SearchCatalogListView;
-import org.evergreen_ils.views.AccountScreenDashboard;
 import org.evergreen_ils.views.splashscreen.SplashActivity;
 
 import android.app.Activity;
index c615ba6..b53389c 100644 (file)
@@ -31,8 +31,7 @@ import org.evergreen_ils.R;
 import org.evergreen_ils.accountAccess.AccountAccess;
 import org.evergreen_ils.accountAccess.SessionNotFoundException;
 import org.evergreen_ils.globals.GlobalConfigs;
-import org.evergreen_ils.searchCatalog.SearchCatalogListView;
-import org.evergreen_ils.views.AccountScreenDashboard;
+import org.evergreen_ils.utils.ui.CompatSpinnerAdapter;
 import org.evergreen_ils.views.splashscreen.SplashActivity;
 
 import android.app.Activity;
@@ -377,10 +376,8 @@ public class HoldDetails extends ActionBarActivity {
             if (globalConfigs.organisations.get(i).id == record.pickup_lib)
                 selectedOrgPos = i;
         }
-        ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
-                R.layout.spinner_layout, list);
+        ArrayAdapter<String> adapter = CompatSpinnerAdapter.CreateCompatSpinnerAdapter(this, list);
         orgSelector.setAdapter(adapter);
-
         orgSelector.setSelection(selectedOrgPos);
 
         orgSelector.setOnItemSelectedListener(new OnItemSelectedListener() {
index 39aef16..e82bea6 100644 (file)
@@ -29,8 +29,6 @@ import org.evergreen_ils.accountAccess.AccountAccess;
 import org.evergreen_ils.accountAccess.SessionNotFoundException;
 import org.evergreen_ils.globals.GlobalConfigs;
 import org.evergreen_ils.searchCatalog.ImageDownloader;
-import org.evergreen_ils.searchCatalog.SearchCatalogListView;
-import org.evergreen_ils.views.AccountScreenDashboard;
 import org.evergreen_ils.views.splashscreen.SplashActivity;
 
 import android.app.Activity;
index dcd931c..84303ed 100644 (file)
@@ -33,8 +33,7 @@ import org.evergreen_ils.accountAccess.SessionNotFoundException;
 import org.evergreen_ils.globals.GlobalConfigs;
 import org.evergreen_ils.searchCatalog.Organisation;
 import org.evergreen_ils.searchCatalog.RecordInfo;
-import org.evergreen_ils.searchCatalog.SearchCatalogListView;
-import org.evergreen_ils.views.AccountScreenDashboard;
+import org.evergreen_ils.utils.ui.CompatSpinnerAdapter;
 import org.evergreen_ils.views.splashscreen.SplashActivity;
 
 import android.app.Activity;
@@ -348,8 +347,7 @@ public class PlaceHold extends ActionBarActivity {
                 selectedOrgPos = i;
             }
         }
-        ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
-                R.layout.spinner_layout, list);
+        ArrayAdapter<String> adapter = CompatSpinnerAdapter.CreateCompatSpinnerAdapter(this, list);
         orgSelector.setAdapter(adapter);
         orgSelector.setSelection(selectedOrgPos);
         orgSelector.setOnItemSelectedListener(new OnItemSelectedListener() {
diff --git a/Open-ILS/src/Android/core/src/org/evergreen_ils/globals/ShowSessionNotAvailableRunnable.java b/Open-ILS/src/Android/core/src/org/evergreen_ils/globals/ShowSessionNotAvailableRunnable.java
deleted file mode 100644 (file)
index 11f6cd2..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2012 Evergreen Open-ILS
- * @author Daniel-Octavian Rizea
- * 
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * or the License, or (at your option) any later version.
- * 
- * This program is distributed in the hope that it will be usefull,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software 
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- * 
- */
-package org.evergreen_ils.globals;
-
-import android.app.AlertDialog;
-import android.content.Context;
-import android.content.DialogInterface;
-
-class ShowSessionNotAvailableRunnable implements Runnable {
-
-    public Context context;
-
-    public ShowSessionNotAvailableRunnable(Context context) {
-        this.context = context;
-    }
-
-    @Override
-    public void run() {
-        AlertDialog alertDialog = new AlertDialog.Builder(context).create();
-        alertDialog.setTitle("Error");
-        alertDialog.setMessage("No session");
-        alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
-
-            @Override
-            public void onClick(DialogInterface dialog, int id) {
-                dialog.dismiss();
-            }
-        });
-
-        alertDialog.show();
-    }
-
-}
\ No newline at end of file
index e73fc66..ebdc57f 100644 (file)
@@ -303,10 +303,4 @@ public class Utils {
         return null;
     }
 
-    public static ShowSessionNotAvailableRunnable showSessionNotAvailableDialog(
-            Context context) {
-
-        return new ShowSessionNotAvailableRunnable(context);
-    }
-
 }
index c8ce1e9..36b768a 100644 (file)
@@ -25,7 +25,6 @@ import android.support.v7.app.ActionBar;
 import android.support.v7.app.ActionBarActivity;
 import org.evergreen_ils.R;
 import org.evergreen_ils.accountAccess.AccountAccess;
-import org.evergreen_ils.views.AccountScreenDashboard;
 import org.evergreen_ils.views.splashscreen.SplashActivity;
 
 import android.app.Activity;
index 0a39c0b..4af4822 100644 (file)
@@ -29,7 +29,6 @@ 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;
 
 import android.app.Activity;
index c89f7f9..09978e9 100644 (file)
@@ -27,7 +27,6 @@ import android.view.MenuItem;
 import org.evergreen_ils.R;
 import org.evergreen_ils.accountAccess.AccountAccess;
 import org.evergreen_ils.utils.ui.*;
-import org.evergreen_ils.views.AccountScreenDashboard;
 import org.evergreen_ils.views.splashscreen.SplashActivity;
 
 import android.app.ProgressDialog;
index fc1fe10..12ed74c 100644 (file)
@@ -26,18 +26,15 @@ import android.support.v7.app.ActionBar;
 import android.support.v7.app.ActionBarActivity;
 import android.view.*;
 import org.evergreen_ils.R;
-import org.evergreen_ils.R.layout;
 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.barcodescan.CaptureActivity;
 import org.evergreen_ils.globals.GlobalConfigs;
-import org.evergreen_ils.views.AccountScreenDashboard;
-import org.evergreen_ils.views.ApplicationPreferences;
+import org.evergreen_ils.utils.ui.CompatSpinnerAdapter;
 import org.evergreen_ils.views.splashscreen.SplashActivity;
 
-import android.app.Activity;
 import android.app.AlertDialog;
 import android.app.ProgressDialog;
 import android.content.Context;
@@ -434,8 +431,7 @@ public class SearchCatalogListView extends ActionBarActivity {
                 selectedOrgPos = i;
             }
         }
-        ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
-                layout.spinner_layout, list);
+        ArrayAdapter<String> adapter = CompatSpinnerAdapter.CreateCompatSpinnerAdapter(this, list);
         choseOrganisation = (Spinner) findViewById(R.id.chose_organisation);
         choseOrganisation.setAdapter(adapter);
         choseOrganisation.setSelection(selectedOrgPos);
diff --git a/Open-ILS/src/Android/core/src/org/evergreen_ils/utils/ui/CompatSpinnerAdapter.java b/Open-ILS/src/Android/core/src/org/evergreen_ils/utils/ui/CompatSpinnerAdapter.java
new file mode 100644 (file)
index 0000000..90fa9c8
--- /dev/null
@@ -0,0 +1,27 @@
+package org.evergreen_ils.utils.ui;
+
+import android.content.Context;
+import android.os.Build;
+import android.widget.ArrayAdapter;
+import org.evergreen_ils.R;
+
+import java.util.ArrayList;
+
+/**
+ * Created by kenstir on 1/5/14.
+ */
+public class CompatSpinnerAdapter {
+    /** Create an ArrayAdapter for use in a spinner.
+     * This solves the problem running under theme Theme.AppCompat: under Gingerbread, the spinner dialog
+     * has a white background, even though the theme is dark, and the text is white-on-white.
+     * The fix is to use two different spinner layouts, one for GB with textColor="@color/dark"
+     * and one for newer versions with textColor="?android:textColorPrimary".
+     */
+    public static ArrayAdapter<String> CreateCompatSpinnerAdapter(Context context, ArrayList<String> list) {
+        int spinner_layout = (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB)
+                ? R.layout.spinner_gb_layout :
+                R.layout.spinner_layout;
+        ArrayAdapter<String> adapter  = new ArrayAdapter<String>(context, spinner_layout, list);
+        return adapter;
+    }
+}
diff --git a/Open-ILS/src/Android/core/src/org/evergreen_ils/views/AccountScreenDashboard.java b/Open-ILS/src/Android/core/src/org/evergreen_ils/views/AccountScreenDashboard.java
deleted file mode 100644 (file)
index db86206..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright (C) 2012 Evergreen Open-ILS
- * @author Daniel-Octavian Rizea
- * 
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * or the License, or (at your option) any later version.
- * 
- * This program is distributed in the hope that it will be usefull,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software 
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- * 
- */
-package org.evergreen_ils.views;
-
-import org.evergreen_ils.R;
-import org.evergreen_ils.accountAccess.bookbags.BookbagsListView;
-import org.evergreen_ils.accountAccess.checkout.ItemsCheckOutListView;
-import org.evergreen_ils.accountAccess.fines.FinesActivity;
-import org.evergreen_ils.accountAccess.holds.HoldsListView;
-import org.evergreen_ils.searchCatalog.SearchCatalogListView;
-import org.evergreen_ils.views.splashscreen.SplashActivity;
-
-import android.app.Activity;
-import android.content.Intent;
-import android.os.Bundle;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.widget.Button;
-
-public class AccountScreenDashboard extends Activity {
-
-    /**
-     * onCreate - called when the activity is first created.
-     * 
-     * Called when the activity is first created. This is where you should do
-     * all of your normal static set up: create views, bind data to lists, etc.
-     * This method also provides you with a Bundle containing the activity's
-     * previously frozen state, if there was one.
-     * 
-     * Always followed by onStart().
-     * 
-     */
-
-    private Button homeButton = null;
-
-    private Button myAccountButton = null;
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        if (!SplashActivity.isAppInitialized()) {
-            SplashActivity.restartApp(this);
-            return;
-        }
-
-        setContentView(R.layout.dashbord_account);
-
-//        myAccountButton = (Button) findViewById(R.id.my_account_button);
-//        myAccountButton.setEnabled(false);
-//        myAccountButton.setOnClickListener(new OnClickListener() {
-//            @Override
-//            public void onClick(View v) {
-//            }
-//        });
-
-        homeButton = (Button) findViewById(R.id.action_bar_home_button);
-        homeButton.setText(R.string.my_account_button_text);
-        homeButton.setOnClickListener(new OnClickListener() {
-            @Override
-            public void onClick(View v) {
-
-                Intent intent = new Intent(getApplicationContext(),
-                        SearchCatalogListView.class);
-                startActivity(intent);
-            }
-        });
-    }
-
-    /**
-     * onDestroy The final call you receive before your activity is destroyed.
-     * This can happen either because the activity is finishing (someone called
-     * finish() on it, or because the system is temporarily destroying this
-     * instance of the activity to save space. You can distinguish between these
-     * two scenarios with the isFinishing() method.
-     * 
-     */
-
-    protected void onDestroy() {
-        super.onDestroy();
-    }
-
-    /**
-     * onPause Called when the system is about to start resuming a previous
-     * activity. This is typically used to commit unsaved changes to persistent
-     * data, stop animations and other things that may be consuming CPU, etc.
-     * Implementations of this method must be very quick because the next
-     * activity will not be resumed until this method returns. Followed by
-     * either onResume() if the activity returns back to the front, or onStop()
-     * if it becomes invisible to the user.
-     * 
-     */
-
-    protected void onPause() {
-        super.onPause();
-    }
-
-    /**
-     * onRestart Called after your activity has been stopped, prior to it being
-     * started again. Always followed by onStart().
-     * 
-     */
-
-    protected void onRestart() {
-        super.onRestart();
-    }
-
-    /**
-     * onResume Called when the activity will start interacting with the user.
-     * At this point your activity is at the top of the activity stack, with
-     * user input going to it. Always followed by onPause().
-     * 
-     */
-
-    protected void onResume() {
-        super.onResume();
-    }
-
-    /**
-     * onStart Called when the activity is becoming visible to the user.
-     * Followed by onResume() if the activity comes to the foreground, or
-     * onStop() if it becomes hidden.
-     * 
-     */
-
-    protected void onStart() {
-        super.onStart();
-    }
-
-    /**
-     * onStop Called when the activity is no longer visible to the user because
-     * another activity has been resumed and is covering this one. This may
-     * happen either because a new activity is being started, an existing one is
-     * being brought in front of this one, or this one is being destroyed.
-     * 
-     * Followed by either onRestart() if this activity is coming back to
-     * interact with the user, or onDestroy() if this activity is going away.
-     */
-
-    protected void onStop() {
-        super.onStop();
-    }
-
-    public void onButtonClick(View v) {
-        int id = v.getId();
-        if (id == R.id.account_btn_check_out) {
-            startActivity(new Intent(getApplicationContext(),
-                    ItemsCheckOutListView.class));
-
-        } else if (id == R.id.account_btn_holds) {
-            startActivity(new Intent(getApplicationContext(),
-                    HoldsListView.class));
-
-        } else if (id == R.id.account_btn_fines) {
-            startActivity(new Intent(getApplicationContext(),
-                    FinesActivity.class));
-
-        } else if (id == R.id.account_btn_book_bags) {
-            startActivity(new Intent(getApplicationContext(),
-                    BookbagsListView.class));
-
-        }
-
-    }
-
-}
index c010491..3d98e88 100644 (file)
@@ -72,8 +72,10 @@ public class MainActivity extends ActionBarActivity {
         } else if (id == R.id.account_btn_fines) {
             startActivity(new Intent(getApplicationContext(), FinesActivity.class));
 
+            /*
         } 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 c093484..77620db 100644 (file)
         <activity
             android:name="org.evergreen_ils.auth.AuthenticatorActivity"
             android:label="@string/ou_account_label">
-            <!-- android:theme="@android:style/Theme" -->
         </activity>
 
         <activity android:name="org.evergreen_ils.views.MainActivity">
index 012e36e..b366ef5 100644 (file)
@@ -16,7 +16,6 @@
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="module" module-name="core" />
-    <orderEntry type="module" module-name="appcompat" />
   </component>
 </module>
 
index a6de5e1..99b4254 100644 (file)
@@ -13,4 +13,3 @@
 # Project target.
 target=android-19
 android.library.reference.1=../core
-android.library.reference.2=../support/v7/appcompat