Changed SearchCatalogListView to use the ActionBar with subtitle of account name.
authorkenstir <kenstir@gmail.com>
Sat, 28 Dec 2013 23:41:12 +0000 (18:41 -0500)
committerkenstir <kenstir@gmail.com>
Sat, 28 Dec 2013 23:41:12 +0000 (18:41 -0500)
Open-ILS/src/Android/core/AndroidManifest.xml
Open-ILS/src/Android/core/core.iml
Open-ILS/src/Android/core/res/layout/search_result_list.xml
Open-ILS/src/Android/core/res/values/styles.xml
Open-ILS/src/Android/core/src/org/evergreen_ils/searchCatalog/SearchCatalogListView.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 95a42e1..6fa134f 100644 (file)
@@ -32,8 +32,7 @@
     <application\r
         android:allowBackup="true"\r
         android:icon="@drawable/evergreen_launcher_icon"\r
-        android:label="@string/ou_app_label"\r
-        android:theme="@style/EvergreenTheme" >\r
+        android:label="@string/ou_app_label" >\r
 \r
         <!-- Notification receiver -->\r
         <receiver\r
index 333d1b4..6ec5390 100644 (file)
@@ -15,7 +15,7 @@
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" name="libs" level="project" />
+    <orderEntry type="library" exported="" name="libs" level="project" />
     <orderEntry type="module" module-name="appcompat" />
   </component>
 </module>
index 09b21b1..e7fb38a 100644 (file)
@@ -5,44 +5,10 @@
     android:background="@color/background"
      >
 
-    <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>
-
     <LinearLayout
         android:id="@+id/search_text_container"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
-        android:layout_below="@id/header"
         android:focusable="true"
         android:focusableInTouchMode="true"
         android:orientation="vertical"
index 19b81d1..8d9fe43 100644 (file)
         <item name="android:layout_height">14dip</item>
     </style>
 
-    <style name="EvergreenTheme" parent="android:Theme.Black.NoTitleBar">
-        <item name="android:windowNoTitle">true</item>
+    <!--
+    <style name="EvergreenTheme" parent="@style/Theme.AppCompat.Light.">
     </style>
+    -->
 
     <style name="HomeButton">
         <item name="android:layout_gravity">center_vertical</item>
index 776f3be..ebd0092 100644 (file)
@@ -22,6 +22,8 @@ package org.evergreen_ils.searchCatalog;
 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.R.layout;
 import org.evergreen_ils.accountAccess.AccountAccess;
@@ -69,7 +71,7 @@ import android.widget.Spinner;
 import android.widget.TextView;
 import android.widget.Toast;
 
-public class SearchCatalogListView extends Activity {
+public class SearchCatalogListView extends ActionBarActivity {
 
     private final String TAG = SearchCatalogListView.class.getName();
 
@@ -121,10 +123,6 @@ public class SearchCatalogListView extends Activity {
 
     private Button barcodeScanButton = null;
 
-    private Button homeButton = null;
-
-    private Button myAccountButton = null;
-
     private String advancedSearchString = null;
 
     // marks when the fetching record thread is started
@@ -138,30 +136,12 @@ public class SearchCatalogListView extends Activity {
             return;
         }
 
+        ActionBar actionBar = getSupportActionBar();
+        actionBar.setSubtitle(AccountAccess.userName);
+
         setContentView(R.layout.search_result_list);
         setTitle(R.string.browse_catalog);
 
-        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.browse_catalog);
-        homeButton.setOnClickListener(new OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                searchOptionsMenu.setVisibility(View.VISIBLE);
-                searchResultsNumber.setVisibility(View.INVISIBLE);
-            }
-        });
-        // end header portion actions
-        
         advancedSearchButton = (Button) findViewById(R.id.menu_advanced_search_button);
         advancedSearchButton.setOnClickListener(new OnClickListener() {
             @Override
index 549226e..c5dfa00 100644 (file)
@@ -28,7 +28,7 @@
         android:allowBackup="true"
         android:icon="@drawable/evergreen_launcher_icon"
         android:label="@string/ou_app_label"
-        android:theme="@style/EvergreenTheme" >
+        android:theme="@style/Theme.AppCompat.Light.DarkActionBar" >
 
         <!-- Notification receiver -->
         <receiver
index b366ef5..012e36e 100644 (file)
@@ -16,6 +16,7 @@
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="module" module-name="core" />
+    <orderEntry type="module" module-name="appcompat" />
   </component>
 </module>
 
index 99b4254..4022b4b 100644 (file)
@@ -13,3 +13,4 @@
 # Project target.
 target=android-19
 android.library.reference.1=../core
+android.library.reference.2=../../../../../../tools/adt-bundle-windows-x86_64-20130917/sdk/extras/android/support/v7/appcompat