OC-1832: Customize dropdown and spinner in ActionBar
authormasensio <masensio@solidgear.es>
Tue, 29 Oct 2013 09:33:30 +0000 (10:33 +0100)
committermasensio <masensio@solidgear.es>
Tue, 29 Oct 2013 09:33:30 +0000 (10:33 +0100)
35 files changed:
res/drawable-hdpi/dropdown_default.9.png [new file with mode: 0644]
res/drawable-hdpi/dropdown_disabled.9.png [new file with mode: 0644]
res/drawable-hdpi/dropdown_focused.9.png [new file with mode: 0644]
res/drawable-hdpi/dropdown_pressed.9.png [new file with mode: 0644]
res/drawable-hdpi/freenet_dropdown_default.9.png [deleted file]
res/drawable-hdpi/freenet_dropdown_disabled.9.png [deleted file]
res/drawable-hdpi/freenet_dropdown_focused.9.png [deleted file]
res/drawable-hdpi/freenet_dropdown_pressed.9.png [deleted file]
res/drawable-hdpi/freenet_spinner_48_inner.png [deleted file]
res/drawable-hdpi/spinner_48_inner.png [new file with mode: 0644]
res/drawable-mdpi/dropdown_default.9.png [new file with mode: 0644]
res/drawable-mdpi/dropdown_disabled.9.png [new file with mode: 0644]
res/drawable-mdpi/dropdown_focused.9.png [new file with mode: 0644]
res/drawable-mdpi/dropdown_pressed.9.png [new file with mode: 0644]
res/drawable-mdpi/freenet_dropdown_default.9.png [deleted file]
res/drawable-mdpi/freenet_dropdown_disabled.9.png [deleted file]
res/drawable-mdpi/freenet_dropdown_focused.9.png [deleted file]
res/drawable-mdpi/freenet_dropdown_pressed.9.png [deleted file]
res/drawable-mdpi/freenet_spinner_48_inner.png [deleted file]
res/drawable-mdpi/spinner_48_inner.png [new file with mode: 0644]
res/drawable-xhdpi/dropdown_default.9.png [new file with mode: 0644]
res/drawable-xhdpi/dropdown_disabled.9.png [new file with mode: 0644]
res/drawable-xhdpi/dropdown_focused.9.png [new file with mode: 0644]
res/drawable-xhdpi/dropdown_pressed.9.png [new file with mode: 0644]
res/drawable-xhdpi/freenet_dropdown_default.9.png [deleted file]
res/drawable-xhdpi/freenet_dropdown_disabled.9.png [deleted file]
res/drawable-xhdpi/freenet_dropdown_focused.9.png [deleted file]
res/drawable-xhdpi/freenet_dropdown_pressed.9.png [deleted file]
res/drawable-xhdpi/freenet_spinner_48_inner.png [deleted file]
res/drawable-xhdpi/spinner_48_inner.png [new file with mode: 0644]
res/drawable/dropdown.xml [new file with mode: 0644]
res/drawable/freenet_dropdown.xml [deleted file]
res/drawable/freenet_indeterminate_progress.xml [deleted file]
res/drawable/indeterminate_progress.xml [new file with mode: 0644]
res/values/styles.xml

diff --git a/res/drawable-hdpi/dropdown_default.9.png b/res/drawable-hdpi/dropdown_default.9.png
new file mode 100644 (file)
index 0000000..1589368
Binary files /dev/null and b/res/drawable-hdpi/dropdown_default.9.png differ
diff --git a/res/drawable-hdpi/dropdown_disabled.9.png b/res/drawable-hdpi/dropdown_disabled.9.png
new file mode 100644 (file)
index 0000000..455d11b
Binary files /dev/null and b/res/drawable-hdpi/dropdown_disabled.9.png differ
diff --git a/res/drawable-hdpi/dropdown_focused.9.png b/res/drawable-hdpi/dropdown_focused.9.png
new file mode 100644 (file)
index 0000000..96f87d7
Binary files /dev/null and b/res/drawable-hdpi/dropdown_focused.9.png differ
diff --git a/res/drawable-hdpi/dropdown_pressed.9.png b/res/drawable-hdpi/dropdown_pressed.9.png
new file mode 100644 (file)
index 0000000..9dc0db1
Binary files /dev/null and b/res/drawable-hdpi/dropdown_pressed.9.png differ
diff --git a/res/drawable-hdpi/freenet_dropdown_default.9.png b/res/drawable-hdpi/freenet_dropdown_default.9.png
deleted file mode 100644 (file)
index 1589368..0000000
Binary files a/res/drawable-hdpi/freenet_dropdown_default.9.png and /dev/null differ
diff --git a/res/drawable-hdpi/freenet_dropdown_disabled.9.png b/res/drawable-hdpi/freenet_dropdown_disabled.9.png
deleted file mode 100644 (file)
index 455d11b..0000000
Binary files a/res/drawable-hdpi/freenet_dropdown_disabled.9.png and /dev/null differ
diff --git a/res/drawable-hdpi/freenet_dropdown_focused.9.png b/res/drawable-hdpi/freenet_dropdown_focused.9.png
deleted file mode 100644 (file)
index 96f87d7..0000000
Binary files a/res/drawable-hdpi/freenet_dropdown_focused.9.png and /dev/null differ
diff --git a/res/drawable-hdpi/freenet_dropdown_pressed.9.png b/res/drawable-hdpi/freenet_dropdown_pressed.9.png
deleted file mode 100644 (file)
index 9dc0db1..0000000
Binary files a/res/drawable-hdpi/freenet_dropdown_pressed.9.png and /dev/null differ
diff --git a/res/drawable-hdpi/freenet_spinner_48_inner.png b/res/drawable-hdpi/freenet_spinner_48_inner.png
deleted file mode 100644 (file)
index 36123fb..0000000
Binary files a/res/drawable-hdpi/freenet_spinner_48_inner.png and /dev/null differ
diff --git a/res/drawable-hdpi/spinner_48_inner.png b/res/drawable-hdpi/spinner_48_inner.png
new file mode 100644 (file)
index 0000000..36123fb
Binary files /dev/null and b/res/drawable-hdpi/spinner_48_inner.png differ
diff --git a/res/drawable-mdpi/dropdown_default.9.png b/res/drawable-mdpi/dropdown_default.9.png
new file mode 100644 (file)
index 0000000..774a811
Binary files /dev/null and b/res/drawable-mdpi/dropdown_default.9.png differ
diff --git a/res/drawable-mdpi/dropdown_disabled.9.png b/res/drawable-mdpi/dropdown_disabled.9.png
new file mode 100644 (file)
index 0000000..fd2861a
Binary files /dev/null and b/res/drawable-mdpi/dropdown_disabled.9.png differ
diff --git a/res/drawable-mdpi/dropdown_focused.9.png b/res/drawable-mdpi/dropdown_focused.9.png
new file mode 100644 (file)
index 0000000..4b5b3d9
Binary files /dev/null and b/res/drawable-mdpi/dropdown_focused.9.png differ
diff --git a/res/drawable-mdpi/dropdown_pressed.9.png b/res/drawable-mdpi/dropdown_pressed.9.png
new file mode 100644 (file)
index 0000000..a6491fc
Binary files /dev/null and b/res/drawable-mdpi/dropdown_pressed.9.png differ
diff --git a/res/drawable-mdpi/freenet_dropdown_default.9.png b/res/drawable-mdpi/freenet_dropdown_default.9.png
deleted file mode 100644 (file)
index 774a811..0000000
Binary files a/res/drawable-mdpi/freenet_dropdown_default.9.png and /dev/null differ
diff --git a/res/drawable-mdpi/freenet_dropdown_disabled.9.png b/res/drawable-mdpi/freenet_dropdown_disabled.9.png
deleted file mode 100644 (file)
index fd2861a..0000000
Binary files a/res/drawable-mdpi/freenet_dropdown_disabled.9.png and /dev/null differ
diff --git a/res/drawable-mdpi/freenet_dropdown_focused.9.png b/res/drawable-mdpi/freenet_dropdown_focused.9.png
deleted file mode 100644 (file)
index 4b5b3d9..0000000
Binary files a/res/drawable-mdpi/freenet_dropdown_focused.9.png and /dev/null differ
diff --git a/res/drawable-mdpi/freenet_dropdown_pressed.9.png b/res/drawable-mdpi/freenet_dropdown_pressed.9.png
deleted file mode 100644 (file)
index a6491fc..0000000
Binary files a/res/drawable-mdpi/freenet_dropdown_pressed.9.png and /dev/null differ
diff --git a/res/drawable-mdpi/freenet_spinner_48_inner.png b/res/drawable-mdpi/freenet_spinner_48_inner.png
deleted file mode 100644 (file)
index 52db504..0000000
Binary files a/res/drawable-mdpi/freenet_spinner_48_inner.png and /dev/null differ
diff --git a/res/drawable-mdpi/spinner_48_inner.png b/res/drawable-mdpi/spinner_48_inner.png
new file mode 100644 (file)
index 0000000..52db504
Binary files /dev/null and b/res/drawable-mdpi/spinner_48_inner.png differ
diff --git a/res/drawable-xhdpi/dropdown_default.9.png b/res/drawable-xhdpi/dropdown_default.9.png
new file mode 100644 (file)
index 0000000..623f484
Binary files /dev/null and b/res/drawable-xhdpi/dropdown_default.9.png differ
diff --git a/res/drawable-xhdpi/dropdown_disabled.9.png b/res/drawable-xhdpi/dropdown_disabled.9.png
new file mode 100644 (file)
index 0000000..a56b9ec
Binary files /dev/null and b/res/drawable-xhdpi/dropdown_disabled.9.png differ
diff --git a/res/drawable-xhdpi/dropdown_focused.9.png b/res/drawable-xhdpi/dropdown_focused.9.png
new file mode 100644 (file)
index 0000000..b1ea774
Binary files /dev/null and b/res/drawable-xhdpi/dropdown_focused.9.png differ
diff --git a/res/drawable-xhdpi/dropdown_pressed.9.png b/res/drawable-xhdpi/dropdown_pressed.9.png
new file mode 100644 (file)
index 0000000..ffb1e24
Binary files /dev/null and b/res/drawable-xhdpi/dropdown_pressed.9.png differ
diff --git a/res/drawable-xhdpi/freenet_dropdown_default.9.png b/res/drawable-xhdpi/freenet_dropdown_default.9.png
deleted file mode 100644 (file)
index 623f484..0000000
Binary files a/res/drawable-xhdpi/freenet_dropdown_default.9.png and /dev/null differ
diff --git a/res/drawable-xhdpi/freenet_dropdown_disabled.9.png b/res/drawable-xhdpi/freenet_dropdown_disabled.9.png
deleted file mode 100644 (file)
index a56b9ec..0000000
Binary files a/res/drawable-xhdpi/freenet_dropdown_disabled.9.png and /dev/null differ
diff --git a/res/drawable-xhdpi/freenet_dropdown_focused.9.png b/res/drawable-xhdpi/freenet_dropdown_focused.9.png
deleted file mode 100644 (file)
index b1ea774..0000000
Binary files a/res/drawable-xhdpi/freenet_dropdown_focused.9.png and /dev/null differ
diff --git a/res/drawable-xhdpi/freenet_dropdown_pressed.9.png b/res/drawable-xhdpi/freenet_dropdown_pressed.9.png
deleted file mode 100644 (file)
index ffb1e24..0000000
Binary files a/res/drawable-xhdpi/freenet_dropdown_pressed.9.png and /dev/null differ
diff --git a/res/drawable-xhdpi/freenet_spinner_48_inner.png b/res/drawable-xhdpi/freenet_spinner_48_inner.png
deleted file mode 100644 (file)
index ba7338c..0000000
Binary files a/res/drawable-xhdpi/freenet_spinner_48_inner.png and /dev/null differ
diff --git a/res/drawable-xhdpi/spinner_48_inner.png b/res/drawable-xhdpi/spinner_48_inner.png
new file mode 100644 (file)
index 0000000..ba7338c
Binary files /dev/null and b/res/drawable-xhdpi/spinner_48_inner.png differ
diff --git a/res/drawable/dropdown.xml b/res/drawable/dropdown.xml
new file mode 100644 (file)
index 0000000..13e06b9
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ownCloud Android client application
+
+  Copyright (C) 2012-2013 ownCloud Inc.
+
+  This program is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License version 2,
+  as published by the Free Software Foundation.
+
+  This program is distributed in the hope that it will be useful,
+  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, see <http://www.gnu.org/licenses/>.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_enabled="false"
+          android:drawable="@drawable/dropdown_disabled" />
+    <item android:state_pressed="true"
+          android:drawable="@drawable/dropdown_pressed" />
+    <item android:state_pressed="false" android:state_focused="true"
+          android:drawable="@drawable/dropdown_focused" />
+    <item android:drawable="@drawable/dropdown_default" />
+</selector>
diff --git a/res/drawable/freenet_dropdown.xml b/res/drawable/freenet_dropdown.xml
deleted file mode 100644 (file)
index d3d1ac8..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ownCloud Android client application
-
-  Copyright (C) 2012-2013 ownCloud Inc.
-
-  This program is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License version 2,
-  as published by the Free Software Foundation.
-
-  This program is distributed in the hope that it will be useful,
-  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, see <http://www.gnu.org/licenses/>.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_enabled="false"
-          android:drawable="@drawable/freenet_dropdown_disabled" />
-    <item android:state_pressed="true"
-          android:drawable="@drawable/freenet_dropdown_pressed" />
-    <item android:state_pressed="false" android:state_focused="true"
-          android:drawable="@drawable/freenet_dropdown_focused" />
-    <item android:drawable="@drawable/freenet_dropdown_default" />
-</selector>
diff --git a/res/drawable/freenet_indeterminate_progress.xml b/res/drawable/freenet_indeterminate_progress.xml
deleted file mode 100644 (file)
index ae1c2e4..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ownCloud Android client application
-
-  Copyright (C) 2012-2013 ownCloud Inc.
-
-  This program is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License version 2,
-  as published by the Free Software Foundation.
-
-  This program is distributed in the hope that it will be useful,
-  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, see <http://www.gnu.org/licenses/>.
--->
-<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
-    <!--  item>
-        <rotate
-             android:drawable="@drawable/freenet_spinner_48_outer"
-             android:pivotX="50%"
-             android:pivotY="50%"
-             android:fromDegrees="0"
-             android:toDegrees="1080" />
-    </item-->
-    <item>
-        <rotate
-             android:drawable="@drawable/freenet_spinner_48_inner"
-             android:pivotX="50%"
-             android:pivotY="50%"
-             android:fromDegrees="0"
-             android:toDegrees="720" />
-    </item>
-</layer-list>
diff --git a/res/drawable/indeterminate_progress.xml b/res/drawable/indeterminate_progress.xml
new file mode 100644 (file)
index 0000000..4f19fdd
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ownCloud Android client application
+
+  Copyright (C) 2012-2013 ownCloud Inc.
+
+  This program is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License version 2,
+  as published by the Free Software Foundation.
+
+  This program is distributed in the hope that it will be useful,
+  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, see <http://www.gnu.org/licenses/>.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <!--  item>
+        <rotate
+             android:drawable="@drawable/freenet_spinner_48_outer"
+             android:pivotX="50%"
+             android:pivotY="50%"
+             android:fromDegrees="0"
+             android:toDegrees="1080" />
+    </item-->
+    <item>
+        <rotate
+             android:drawable="@drawable/spinner_48_inner"
+             android:pivotX="50%"
+             android:pivotY="50%"
+             android:fromDegrees="0"
+             android:toDegrees="720" />
+    </item>
+</layer-list>
index 00e96b4..b2ecee3 100644 (file)
        <item name="android:actionBarStyle">@style/Theme.ownCloud.Widget.ActionBar</item>
        <item name="actionBarStyle">@style/Theme.ownCloud.Widget.ActionBar</item>
        <item name="android:buttonStyle">@style/Theme.ownCloud.ButtonStyle</item>
+       <item name="actionDropDownStyle">@style/DropDownStyle</item>
+       <item name="android:actionDropDownStyle">@style/DropDownStyle</item>
        </style>
        
        <style name="Theme.ownCloud.noActionBar" parent="style/Theme.Sherlock.Light.NoActionBar">
       <item name="android:actionBarStyle">@style/Theme.ownCloud.Widget.ActionBar</item>
       <item name="actionBarStyle">@style/Theme.ownCloud.Widget.ActionBar</item>
       <item name="android:buttonStyle">@style/Theme.ownCloud.ButtonStyle</item>
+      <item name="actionDropDownStyle">@style/DropDownStyle</item>
+      <item name="android:actionDropDownStyle">@style/DropDownStyle</item>
     </style>
        
        <style name="Theme.ownCloud.Fullscreen" parent="style/Theme.Sherlock.NoActionBar">
       <item name="android:actionBarStyle">@style/Theme.ownCloud.Widget.ActionBar</item>
       <item name="actionBarStyle">@style/Theme.ownCloud.Widget.ActionBar</item>
       <item name="android:windowFullscreen">true</item>
+      <item name="actionDropDownStyle">@style/DropDownStyle</item>
+      <item name="android:actionDropDownStyle">@style/DropDownStyle</item>
     </style>
        
        
        <item name="android:shadowRadius">1</item>
        <item name="android:shadowDy">1</item>
        <item name="android:backgroundSplit">@drawable/split_action_bg</item>
+       <item name="android:indeterminateProgressStyle">@style/IndeterminateStyle</item>
+       <item name="indeterminateProgressStyle">@style/IndeterminateStyle</item>
+       </style>
+
+       <!-- DropDown -->
+       <style name="DropDownStyle" parent="style/Widget.Sherlock.Spinner.DropDown.ActionBar">
+           <item name="android:background">@drawable/dropdown</item>
+       </style>
+       <style name="IndeterminateStyle" parent="style/Widget.Sherlock.ProgressBar">
+           <item name="android:indeterminateDrawable">@drawable/indeterminate_progress</item>
        </style>
 
-               
        <!-- Dialogs -->
        <style name="Theme.ownCloud.Dialog" parent="style/Theme.Sherlock.Light.Dialog">
        </style>