ui polish : button look changed
authordrizea <danielrizea27@gmail.com>
Tue, 14 Aug 2012 11:26:36 +0000 (14:26 +0300)
committerdrizea <danielrizea27@gmail.com>
Tue, 14 Aug 2012 11:26:36 +0000 (14:26 +0300)
24 files changed:
Open-ILS/src/Android/res/drawable/application_button.xml [new file with mode: 0644]
Open-ILS/src/Android/res/drawable/header_button.xml [new file with mode: 0644]
Open-ILS/src/Android/res/drawable/listview_background.xml [new file with mode: 0644]
Open-ILS/src/Android/res/layout/bookbag_list.xml
Open-ILS/src/Android/res/layout/bookbag_list_item.xml
Open-ILS/src/Android/res/layout/bookbagitem_list.xml
Open-ILS/src/Android/res/layout/bookbagitem_list_item.xml
Open-ILS/src/Android/res/layout/checkout_list.xml
Open-ILS/src/Android/res/layout/checkout_list_item.xml
Open-ILS/src/Android/res/layout/copy_information_more.xml
Open-ILS/src/Android/res/layout/dashbord_account.xml
Open-ILS/src/Android/res/layout/fines.xml
Open-ILS/src/Android/res/layout/fines_list_item.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/holds_list_item.xml
Open-ILS/src/Android/res/layout/place_hold.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/layout/spinner_layout.xml
Open-ILS/src/Android/res/values/colors.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/holds/HoldDetails.java

diff --git a/Open-ILS/src/Android/res/drawable/application_button.xml b/Open-ILS/src/Android/res/drawable/application_button.xml
new file mode 100644 (file)
index 0000000..a023f2d
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<layer-list>
+    <item>
+        <shape
+            xmlns:android="http://schemas.android.com/apk/res/android"
+            android:shape="rectangle" >
+            <gradient
+                android:angle="270"
+                android:endColor="@color/application_button_stop"
+                android:startColor="@color/application_button_start" 
+                />
+
+            <corners
+                android:radius="4dp" />
+            
+            <stroke 
+                android:width="1dp"
+                android:color="@color/dark"
+                />
+        </shape>
+    </item>
+    <item>
+        <shape
+            xmlns:android="http://schemas.android.com/apk/res/android"
+            android:shape="rectangle" >
+            <gradient
+                android:angle="270"
+                android:centerColor="#00ffffff"
+                android:endColor="#00ffffff"
+                android:startColor="#80ffffff" 
+                android:useLevel="false"
+                />
+
+            <corners
+                android:radius="4dp"/>
+        </shape>
+    </item>
+
+</layer-list>
\ No newline at end of file
diff --git a/Open-ILS/src/Android/res/drawable/header_button.xml b/Open-ILS/src/Android/res/drawable/header_button.xml
new file mode 100644 (file)
index 0000000..0af6035
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<layer-list>
+    <item>
+        <shape
+            xmlns:android="http://schemas.android.com/apk/res/android"
+            android:shape="rectangle" >
+            <gradient
+                android:angle="270"
+                android:endColor="@color/header_gradient_stop"
+                android:startColor="@color/header_gradient_start" 
+                />
+
+            <corners
+                android:radius="4dp" />
+            
+            <stroke 
+                android:width="1dp"
+                android:color="@color/dark"
+                />
+        </shape>
+    </item>
+    <item>
+        <shape
+            xmlns:android="http://schemas.android.com/apk/res/android"
+            android:shape="rectangle" >
+            <gradient
+                android:angle="270"
+                android:centerColor="#00ffffff"
+                android:endColor="#00ffffff"
+                android:startColor="#80ffffff" 
+                android:useLevel="false"
+                />
+
+            <corners
+                android:radius="4dp"/>
+        </shape>
+    </item>
+
+</layer-list>
\ No newline at end of file
diff --git a/Open-ILS/src/Android/res/drawable/listview_background.xml b/Open-ILS/src/Android/res/drawable/listview_background.xml
new file mode 100644 (file)
index 0000000..09dd8dd
--- /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:angle="270" android:startColor="#30ffffff"
+    android:endColor="#30ffffff" />
+
+    <corners android:radius="8dp" /> 
+</shape> 
\ No newline at end of file
index 8d96a54..de135d1 100644 (file)
@@ -2,7 +2,9 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
-    android:orientation="vertical" >
+    android:orientation="vertical"
+    android:background="@color/background"
+     >
    
     <include android:id="@+id/header_actionbar" layout="@layout/simple_actionbar"/>
     
@@ -29,6 +31,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:text="@string/create"
+            style="@style/ApplicationButton"
             />
         
     </LinearLayout>
index ccc36c5..eaa1339 100644 (file)
@@ -6,7 +6,9 @@
        android:paddingBottom="3dip"
        android:paddingTop="3dip" 
        android:paddingLeft="3dip" 
-    android:orientation="horizontal" >
+    android:orientation="horizontal" 
+    android:background="@color/background"
+    >
     
                <TextView
                android:id="@+id/bookbag_name"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:text="@string/details" 
-                android:layout_gravity="right" 
+                android:layout_gravity="right"
+                android:layout_marginRight="5dip"
+                style="@style/ApplicationButton"
+                android:paddingLeft="12dip"
+                android:paddingRight="12dip" 
                    />
                
 </LinearLayout>
\ No newline at end of file
index 75ab737..12fc4ca 100644 (file)
@@ -2,7 +2,9 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
-    android:orientation="vertical" >
+    android:orientation="vertical" 
+    android:background="@drawable/background_grey_image"
+    >
     
     <include android:id="@+id/header_actionbar" layout="@layout/simple_actionbar"/>
     
@@ -22,6 +24,7 @@
             android:id="@+id/bookbag_name"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
+            android:layout_marginLeft="5dip"
             />
         
         <Button 
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:text="@string/delete_button"
+            style="@style/ApplicationButton"
+            android:paddingLeft="15dip"
+            android:paddingRight="15dip"
+            android:layout_marginLeft="15dip"
             />
         
     </LinearLayout>
-    
-    
-       <LinearLayout 
-       android:layout_width="fill_parent"
-    android:layout_height="wrap_content"
-    android:orientation="horizontal"
-    android:gravity="center_vertical" 
-       android:paddingLeft="5dip"
-       >
-          
-               <TextView
-               android:layout_width="fill_parent"
-               android:layout_height="wrap_content"
-               android:layout_weight="1"
-               android:text="@string/title"
-               android:gravity="center"
-               />   
-           
-               <TextView
-               android:layout_width="fill_parent"
-               android:layout_height="wrap_content"
-               android:layout_weight="1"
-               android:gravity="center"
-               android:text="@string/author"
-               />
-
-               <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="@string/bags_action" 
-                android:layout_gravity="right"
-                android:gravity="center"
-                 />
-               
-       </LinearLayout>
      
        <ListView 
          android:id="@+id/bookbagitem_list"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"  
          android:paddingTop="10dip"
+         android:background="@drawable/listview_background"
          ></ListView>
 
 </LinearLayout>
\ No newline at end of file
index 8f52d67..da72a27 100644 (file)
@@ -6,14 +6,21 @@
        android:paddingBottom="3dip"
        android:paddingTop="3dip" 
        android:paddingLeft="3dip" 
-    android:orientation="horizontal" >
+    android:orientation="horizontal"
+    android:background="@android:color/transparent"
+    >
     
-               <TextView
+    <LinearLayout 
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:orientation="vertical"
+        >
+        <TextView
                android:id="@+id/bookbagitem_title"
                style="@style/TitleSearchStyleList"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
-               android:layout_weight="1"
                android:paddingLeft="3dip"
                />   
            
                style="@style/AuthorSearchStyleList"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
-               android:layout_weight="1"
-               android:gravity="center"
                android:paddingLeft="3dip"
                />
-               
+        
+    </LinearLayout>
+                       
                <Button
                 android:id="@+id/bookbagitem_remove_button"
                 android:layout_width="wrap_content"
@@ -34,6 +41,9 @@
                 android:text="@string/bookbagitem_remove" 
                 android:layout_gravity="right"
                 android:layout_weight="0"
+                style="@style/ApplicationButton"
+                android:layout_marginRight="5dip"
+                
                    />
                
 </LinearLayout>
\ No newline at end of file
index 2dc5160..00793c7 100644 (file)
@@ -3,7 +3,7 @@
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
     android:orientation="vertical"
-    android:padding="4dip"
+    android:background="@color/background"
      >
 
        <include android:id="@+id/header_actionbar" layout="@layout/simple_actionbar"/>
@@ -44,7 +44,7 @@
        <ListView 
          android:id="@+id/checkout_items_list"
          android:layout_width="fill_parent"
-         android:layout_height="wrap_content"  
+         android:layout_height="wrap_content" 
          >
            
        </ListView>
index 16c4793..3410fc8 100644 (file)
@@ -3,9 +3,9 @@
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
     android:orientation="horizontal"
-    android:paddingBottom="3dip"
-    android:paddingLeft="3dip"
-    android:paddingTop="3dip" >
+       android:padding="3dip"
+       android:background="@color/background"
+    >
 
     <LinearLayout
         android:layout_width="fill_parent"
@@ -41,7 +41,8 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:text="@string/renew_button" 
-            android:layout_gravity="center_vertical"
+            android:layout_gravity="center_vertical" 
+            style="@style/ApplicationButton"
             />
 
 
index a945767..6af946e 100644 (file)
@@ -5,7 +5,7 @@
     android:orientation="vertical"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
-    android:padding="4dip"
+    android:background="@drawable/background_grey_image"
     >
 
        <include android:id="@+id/header_actionbar" layout="@layout/simple_actionbar"/>
            android:layout_marginBottom="5dip"
            />
        
-       <LinearLayout
-               android:id="@+id/record_details_copy_information"
-               android:layout_width="fill_parent"
-               android:layout_height="wrap_content"
-               android:orientation="vertical"
-               >    
-       
-       </LinearLayout>
-       
+       <ScrollView 
+           android:layout_width="fill_parent"
+           android:layout_height="fill_parent"
+           >
+               <LinearLayout
+                       android:id="@+id/record_details_copy_information"
+                       android:layout_width="fill_parent"
+                       android:layout_height="wrap_content"
+                       android:orientation="vertical"
+                       android:padding="5dip"
+                       >    
+               
+               </LinearLayout>
+       </ScrollView>
 </LinearLayout>
\ No newline at end of file
index cafdbbe..75e3de1 100644 (file)
@@ -39,7 +39,9 @@
             android:layout_alignParentRight="true"
             android:layout_marginTop="5dip"
             android:padding="10dip"
-            android:text="@string/my_account_button_text" />
+            android:text="@string/my_account_button_text" 
+            style="@style/HeaderButton"
+            />
     </RelativeLayout>
     
        <LinearLayout
index a6b5970..db23e06 100644 (file)
@@ -2,13 +2,16 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
-    android:orientation="vertical" >
+    android:orientation="vertical"
+    android:background="@color/background"
+     >
 
        <include android:id="@+id/header_actionbar" layout="@layout/simple_actionbar"/>
     
          <TableLayout 
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
+             android:padding="5dip"
              >
             <TableRow 
                 android:layout_width="fill_parent"
@@ -70,6 +73,7 @@
              android:textSize="18sp"
              android:paddingTop="10dip"
              android:paddingBottom="5dip"
+             android:layout_marginLeft="10dip"
              />
 
        <ListView 
index 85ad58f..8daeab5 100644 (file)
@@ -1,55 +1,51 @@
 <?xml version="1.0" encoding="utf-8"?>
-<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="match_parent" > 
+    android:layout_height="match_parent"
+    android:background="@color/background"
+    android:padding="5dip"
+    android:orientation="vertical"
+    >
+        <LinearLayout
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal" >
+
+            <TextView
+                android:id="@+id/fines_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_weight="1" />
+
+            <TextView
+                android:id="@+id/fines_balance_owed"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="right"
+                android:layout_weight="0"
+                android:textColor="@color/red"
+                android:textStyle="bold" />
+        </LinearLayout>
 
-    
-    <TableRow 
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        >
-        
-            <TextView 
-     android:id="@+id/fines_title" 
-     android:layout_width="fill_parent"   
-     android:layout_height="fill_parent"
-     android:layout_weight="10"
-     
-     
-        />
-            
-      <TextView 
-     android:id="@+id/fines_balance_owed"
-     android:layout_width="fill_parent"   
-     android:layout_height="fill_parent"
-     android:textColor="@color/red"   
-     android:textStyle="bold" 
-     android:layout_weight="2"
-     android:layout_gravity="right"  
-        />  
-        
-    </TableRow>
-    
-    <TableRow 
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        >
 
-     <TextView 
-     android:id="@+id/fines_author"
-     android:layout_width="fill_parent"   
-     android:layout_height="fill_parent" 
-     android:layout_weight="10"
-        />
-     
-     <TextView 
-     android:id="@+id/fines_status"
-     android:layout_width="fill_parent"   
-     android:layout_height="fill_parent" 
-     android:textStyle="bold"  
-     android:layout_weight="4"
-     android:layout_gravity="right" 
-        />
-    </TableRow>
+        <LinearLayout
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal" >
+
+            <TextView
+                android:id="@+id/fines_author"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_weight="1" />
+            
+            <TextView
+                android:id="@+id/fines_status"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="right"
+                android:layout_weight="0"
+                android:textStyle="bold" />
+        </LinearLayout>
 
-</TableLayout>
\ No newline at end of file
+</LinearLayout>
\ No newline at end of file
index 1de0426..b480139 100644 (file)
@@ -1,7 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="match_parent" >
+    android:layout_height="match_parent"
+    android:background="@drawable/background_grey_image"
+     >
   
        <include android:id="@+id/header_actionbar" layout="@layout/simple_actionbar"/>
         
                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 
@@ -26,6 +31,8 @@
                    android:layout_width="100dip"
                    android:layout_height="wrap_content"
                    android:text="@string/cancel_hold"
+                   style="@style/ApplicationButton"
+                   android:layout_margin="5dip"
                    />   
                    
                 <Button 
@@ -33,6 +40,8 @@
                    android:layout_width="100dip"
                    android:layout_height="wrap_content"
                    android:text="@string/update_hold"
+                   style="@style/ApplicationButton"
+                   android:layout_margin="5dip"
                    />  
            </LinearLayout>
     
index 5ad2c18..3adbf45 100644 (file)
@@ -2,7 +2,9 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
-    android:orientation="vertical" >
+    android:orientation="vertical"
+    android:background="@color/background"
+     >
     
     <include android:id="@+id/header_actionbar" layout="@layout/simple_actionbar"/>
     
index 04ef517..3533b08 100644 (file)
@@ -4,6 +4,7 @@
     android:layout_height="match_parent" 
     android:orientation="horizontal"
     android:paddingLeft="5dp"
+    android:background="@color/background"
     > 
 
     
index 8190be6..e5f54bf 100644 (file)
@@ -1,7 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="match_parent" >
+    android:layout_height="match_parent"
+    android:background="@drawable/background_grey_image"
+     >
   
     
        <include android:id="@+id/header_actionbar" layout="@layout/simple_actionbar"/>
                android:gravity="center_horizontal"
                android:layout_alignParentBottom="true"
                android:layout_centerInParent="true"
+               android:layout_marginBottom="3dip"
                >
                <Button
                    android:id="@+id/cancel_hold"
                    android:layout_width="100dip"
                    android:layout_height="wrap_content"
                    android:text="@string/cancel"
+                   style="@style/ApplicationButton"
+                   android:layout_margin="5dip"
                    />
                
                <Button 
@@ -28,6 +33,8 @@
                    android:layout_width="100dip"
                    android:layout_height="wrap_content"
                    android:text="@string/place_hold"
+                   style="@style/ApplicationButton"
+                   android:layout_margin="5dip"
                    />   
            </LinearLayout>
     
index 8ead6e9..4d7eb5f 100644 (file)
@@ -38,7 +38,9 @@
             android:layout_alignParentRight="true"
             android:layout_marginTop="5dip"
             android:padding="10dip"
-            android:text="@string/my_account_button_text" />
+            android:text="@string/my_account_button_text" 
+            style="@style/HeaderButton"
+            />
     </RelativeLayout>
 
     <LinearLayout
index 990fad7..fcefdcb 100644 (file)
@@ -39,7 +39,9 @@
             android:layout_alignParentRight="true"
             android:layout_marginTop="5dip"
             android:padding="10dip"
-            android:text="@string/my_account_button_text" />
+            android:text="@string/my_account_button_text"
+            style="@style/HeaderButton"
+             />
     </RelativeLayout>
     
         <TextView 
index e0bf574..63bcb23 100644 (file)
@@ -6,4 +6,6 @@
     android:layout_gravity="center"
     android:textColor="@color/dark"
     android:padding="5dp"
-    android:gravity="center"/>
+    android:gravity="center"
+    android:singleLine="true"
+    />
index b5d44b5..d2ebbba 100644 (file)
@@ -68,6 +68,9 @@
     
     <color name="background">#333</color>
     
+    <color name="application_button_start">#444</color>
+    <color name="application_button_stop">#444</color>
+    
     <!-- using alpha on header -->
     <color name="menu_background_start">#585858</color>
     <color name="menu_background_stop">#c8c8c8</color>
index 046ad82..ac1d74c 100644 (file)
@@ -88,9 +88,9 @@
     <string name="suspend_hold">Suspend Hold</string>
     <string name="place_hold">Place hold</string>
     <string name="cancel">Cancel</string>
-    <string name="cancel_hold">Cancel hold</string>
+    <string name="cancel_hold">Delete</string>
     <string name="back">Back</string>
-    <string name="update_hold">Update Hold</string>
+    <string name="update_hold">Update</string>
     <string name="cancel_hold_dialog_message">Are you sure you want to cancel this hold?</string>
     <string name="thaw_date">Automatically activate hold one</string>
     <string name="hold_phone_hint">Contact phone number</string>
     <string name="bookbagitem_remove">remove</string>
     <string name="create_bookbag">New : </string>
     <string name="create">create</string>
-    <string name="bookbag_name">bookbag name</string>
+    <string name="bookbag_name">Bookbag name: </string>
     <string name="add_button">add</string>
     
     
index 749e01b..ddbf1c6 100644 (file)
        <item name="android:layout_marginTop">5dip</item>
    </style>
     
+   
+   
+   <style name="HeaderButton">
+       <item name="android:textColor">@color/white</item>
+       <item name="android:background">@drawable/header_button</item>
+       <item name="android:layout_marginRight">5dip</item>
+   </style>
+   
+   <style name="ApplicationButton">
+       <item name="android:textColor">@color/white</item>
+       <item name="android:background">@drawable/application_button</item>
+       <item name="android:padding">10dip</item>
+   </style>
+   
     <!--  Menu List Buttons -->
    <style name="MenuListButton">
                <item name="android:layout_margin">5dip</item>
index 766de1d..d385e0e 100644 (file)
@@ -406,7 +406,7 @@ public class HoldDetails extends Activity {
                                selectedOrgPos = i;
                }
                ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
-                               android.R.layout.simple_spinner_item, list);
+                               R.layout.spinner_layout, list);
                orgSelector.setAdapter(adapter);
 
                orgSelector.setSelection(selectedOrgPos);