color changes in menu buttons and header gradient
authordrizea <danielrizea27@gmail.com>
Thu, 2 Aug 2012 21:19:07 +0000 (00:19 +0300)
committerdrizea <danielrizea27@gmail.com>
Thu, 2 Aug 2012 21:19:07 +0000 (00:19 +0300)
Open-ILS/src/Android/res/drawable/menu_blue_button.xml [new file with mode: 0644]
Open-ILS/src/Android/res/drawable/menu_orange_button.xml [new file with mode: 0644]
Open-ILS/src/Android/res/drawable/menu_purple_button.xml [new file with mode: 0644]
Open-ILS/src/Android/res/drawable/menu_red_button.xml [new file with mode: 0644]
Open-ILS/src/Android/res/drawable/one_header_rounded_corner.xml
Open-ILS/src/Android/res/layout/search_result_list.xml
Open-ILS/src/Android/res/values/colors.xml
Open-ILS/src/Android/res/values/styles.xml
Open-ILS/src/Android/src/org/evergreen/android/globals/GlobalConfigs.java
Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/SearchCatalogListView.java

diff --git a/Open-ILS/src/Android/res/drawable/menu_blue_button.xml b/Open-ILS/src/Android/res/drawable/menu_blue_button.xml
new file mode 100644 (file)
index 0000000..401c6f2
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true" >
+        <shape>
+            <solid
+                android:color="#449def" />
+            <stroke
+                android:width="1dp"
+                android:color="#2f6699" />
+            <corners
+                android:radius="5dp" />
+            <padding
+                android:left="5dp"
+                android:top="5dp"
+                android:right="5dp"
+                android:bottom="5dp" />
+        </shape>
+    </item>
+    <item>
+        <shape>
+            <gradient
+                android:startColor="#449def"
+                android:endColor="#2f6699"
+                android:angle="270" />
+            <stroke
+                android:width="1dp"
+                android:color="#2f6699" />
+            <corners
+                android:radius="5dp" />
+            <padding
+                android:left="5dp"
+                android:top="5dp"
+                android:right="5dp"
+                android:bottom="5dp" />
+        </shape>
+    </item>
+</selector>
\ No newline at end of file
diff --git a/Open-ILS/src/Android/res/drawable/menu_orange_button.xml b/Open-ILS/src/Android/res/drawable/menu_orange_button.xml
new file mode 100644 (file)
index 0000000..31f5b35
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true" >
+        <shape>
+            <solid
+                android:color="#f3ae1b" />
+            <stroke
+                android:width="1dp"
+                android:color="#bb6008" />
+            <corners
+                android:radius="5dp" />
+            <padding
+                android:left="5dp"
+                android:top="5dp"
+                android:right="5dp"
+                android:bottom="5dp" />
+        </shape>
+    </item>
+    <item>
+        <shape>
+            <gradient
+                android:startColor="#f3ae1b"
+                android:endColor="#bb6008"
+                android:angle="270" />
+            <stroke
+                android:width="1dp"
+                android:color="#bb6008" />
+            <corners
+                android:radius="5dp" />
+            <padding
+                android:left="5dp"
+                android:top="5dp"
+                android:right="5dp"
+                android:bottom="5dp" />
+        </shape>
+    </item>
+</selector>
\ No newline at end of file
diff --git a/Open-ILS/src/Android/res/drawable/menu_purple_button.xml b/Open-ILS/src/Android/res/drawable/menu_purple_button.xml
new file mode 100644 (file)
index 0000000..4eecd8c
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true" >
+        <shape>
+            <solid
+                android:color="#a276eb" />
+            <stroke
+                android:width="1dp"
+                android:color="#6a3ab2" />
+            <corners
+                android:radius="5dp" />
+            <padding
+                android:left="5dp"
+                android:top="5dp"
+                android:right="5dp"
+                android:bottom="5dp" />
+        </shape>
+    </item>
+    <item>
+        <shape>
+            <gradient
+                android:startColor="#a276eb"
+                android:endColor="#6a3ab2"
+                android:angle="270" />
+            <stroke
+                android:width="1dp"
+                android:color="#6a3ab2" />
+            <corners
+                android:radius="5dp" />
+            <padding
+                android:left="5dp"
+                android:top="5dp"
+                android:right="5dp"
+                android:bottom="5dp" />
+        </shape>
+    </item>
+</selector>
\ No newline at end of file
diff --git a/Open-ILS/src/Android/res/drawable/menu_red_button.xml b/Open-ILS/src/Android/res/drawable/menu_red_button.xml
new file mode 100644 (file)
index 0000000..ee0a8e5
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true" >
+        <shape>
+            <solid
+                android:color="#ef4444" />
+            <stroke
+                android:width="1dp"
+                android:color="#992f2f" />
+            <corners
+                android:radius="5dp" />
+            <padding
+                android:left="5dp"
+                android:top="5dp"
+                android:right="5dp"
+                android:bottom="5dp" />
+        </shape>
+    </item>
+    <item>
+        <shape>
+            <gradient
+                android:startColor="#ef4444"
+                android:endColor="#992f2f"
+                android:angle="270" />
+            <stroke
+                android:width="1dp"
+                android:color="#992f2f" />
+            <corners
+                android:radius="5dp" />
+            <padding
+                android:left="5dp"
+                android:top="5dp"
+                android:right="5dp"
+                android:bottom="5dp" />
+        </shape>
+    </item>
+</selector>
\ No newline at end of file
index f4da0d5..f081f7b 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_stop" android:endColor="@color/header_gradient_stop" 
+     <gradient android:startColor="@color/header_gradient_start" android:endColor="@color/header_gradient_stop" 
             android:angle="270"/> 
 
     <corners android:bottomLeftRadius="8dp"/> 
index e541776..a444871 100644 (file)
@@ -98,7 +98,7 @@
 
             <Button
                 android:id="@+id/menu_advanced_search_button"
-                style="@style/MenuListButton"
+                style="@style/MenuListOrangeButton"
                 android:layout_width="150dip"
                 android:layout_height="wrap_content"
                 android:drawableTop="@drawable/settings_small"
 
             <Button
                 android:id="@+id/library_hours_button"
-                style="@style/MenuListButton"
+                style="@style/MenuListBlueButton"
                 android:layout_width="150dip"
                 android:layout_height="wrap_content"
                 android:drawableTop="@drawable/settings_small"
 
             <Button
                 android:id="@+id/preference_button"
-                style="@style/MenuListButton"
+                style="@style/MenuListPurpleButton"
                 android:layout_width="150dip"
                 android:layout_height="wrap_content"
                 android:drawableTop="@drawable/settings_small"
index 54123d7..f549a0b 100644 (file)
@@ -49,7 +49,7 @@
     <color name="norm2">#88E2DF</color>
     
        <!-- Header portion -->
-    <color name="header_gradient_start">#E0F6E0</color>
+    <color name="header_gradient_start">#238962</color>
     <color name="grey">#ECECEC</color>
     
     <color name="header_gradient_stop">#1E7152</color>
index d7f7430..ae7544e 100644 (file)
                <item name="android:layout_margin">5dip</item>
    </style>
     
+   <style name="MenuListRedButton">
+       <item name="android:background">@drawable/menu_red_button</item>
+               <item name="android:layout_margin">5dip</item>
+   </style>
+   
+   <style name="MenuListOrangeButton">
+       <item name="android:background">@drawable/menu_orange_button</item>
+               <item name="android:layout_margin">5dip</item>
+               <item name="android:textColor">@color/white</item>
+   </style>
+   
+   <style name="MenuListBlueButton">
+       <item name="android:background">@drawable/menu_blue_button</item>
+       <item name="android:layout_margin">5dip</item>
+       <item name="android:textColor">@color/white</item>
+   </style>
+   
+   <style name="MenuListPurpleButton">
+       <item name="android:background">@drawable/menu_purple_button</item>
+       <item name="android:layout_margin">5dip</item>
+       <item name="android:textColor">@color/white</item>
+   </style>
+   
+   
    <style name="DashboardButton">
         <item name="android:layout_gravity">center_vertical</item>
         <item name="android:layout_width">wrap_content</item>
index 9052655..7731b27 100644 (file)
@@ -283,9 +283,7 @@ public class GlobalConfigs {
                // logic can be found in the opac_utils.js file in web/opac/common/js
 
                for(int i=0; i<organisations.size();i++){
-                       
                        AccountAccess ac = AccountAccess.getAccountAccess();
-               
                        try{
                                Object obj = ac.fetchOrgSettings(organisations.get(i).id, "opac.org_unit_hiding.depth");
                        }catch(NoNetworkAccessException e){}
index a60c581..1389988 100644 (file)
@@ -128,7 +128,8 @@ public class SearchCatalogListView extends Activity{
         homeButton.setOnClickListener(new OnClickListener() {
                        @Override
                        public void onClick(View v) {
-                               searchOptionsMenu.setVisibility(View.VISIBLE);  
+                               searchOptionsMenu.setVisibility(View.VISIBLE);
+                               searchResultsNumber.setVisibility(View.INVISIBLE);
                        }
                });
         //end header portion actions
@@ -254,6 +255,8 @@ public class SearchCatalogListView extends Activity{
                                        public void run() {
                                                
                                                searchOptionsMenu.setVisibility(View.GONE);
+                                               searchResultsNumber.setVisibility(View.VISIBLE);
+                                               
                                                progressDialog = new ProgressDialog(context);
                                                
                                                progressDialog.setMessage("Fetching data");