Browse Source

redesign of dialog according to design review/mock/feedback

AndyScherzinger 8 years ago
parent
commit
6086ff81c6
40 changed files with 331 additions and 185 deletions
  1. 6 6
      drawable_resources/alphabetical_desc.svg
  2. 13 12
      drawable_resources/modification_asc.svg
  3. 11 11
      drawable_resources/modification_desc.svg
  4. 12 12
      drawable_resources/size_asc.svg
  5. 13 13
      drawable_resources/size_desc.svg
  6. BIN
      res/drawable-hdpi/ic_alphabetical_asc.png
  7. BIN
      res/drawable-hdpi/ic_alphabetical_desc.png
  8. BIN
      res/drawable-hdpi/ic_modification_asc.png
  9. BIN
      res/drawable-hdpi/ic_modification_desc.png
  10. BIN
      res/drawable-hdpi/ic_size_asc.png
  11. BIN
      res/drawable-hdpi/ic_size_desc.png
  12. BIN
      res/drawable-mdpi/ic_alphabetical_asc.png
  13. BIN
      res/drawable-mdpi/ic_alphabetical_desc.png
  14. BIN
      res/drawable-mdpi/ic_modification_asc.png
  15. BIN
      res/drawable-mdpi/ic_modification_desc.png
  16. BIN
      res/drawable-mdpi/ic_size_asc.png
  17. BIN
      res/drawable-mdpi/ic_size_desc.png
  18. BIN
      res/drawable-xhdpi/ic_alphabetical_asc.png
  19. BIN
      res/drawable-xhdpi/ic_alphabetical_desc.png
  20. BIN
      res/drawable-xhdpi/ic_modification_asc.png
  21. BIN
      res/drawable-xhdpi/ic_modification_desc.png
  22. BIN
      res/drawable-xhdpi/ic_size_asc.png
  23. BIN
      res/drawable-xhdpi/ic_size_desc.png
  24. BIN
      res/drawable-xxhdpi/ic_alphabetical_asc.png
  25. BIN
      res/drawable-xxhdpi/ic_alphabetical_desc.png
  26. BIN
      res/drawable-xxhdpi/ic_modification_asc.png
  27. BIN
      res/drawable-xxhdpi/ic_modification_desc.png
  28. BIN
      res/drawable-xxhdpi/ic_size_asc.png
  29. BIN
      res/drawable-xxhdpi/ic_size_desc.png
  30. BIN
      res/drawable-xxxhdpi/ic_modification_asc.png
  31. BIN
      res/drawable-xxxhdpi/ic_modification_desc.png
  32. BIN
      res/drawable-xxxhdpi/ic_size_asc.png
  33. BIN
      res/drawable-xxxhdpi/ic_size_desc.png
  34. 226 119
      res/layout/sorting_order_fragment.xml
  35. 38 2
      src/com/owncloud/android/ui/dialog/SortingOrderDialogFragment.java
  36. 2 1
      src/main/java/com/owncloud/android/utils/DisplayUtils.java
  37. 0 6
      src/main/res/values/attrs.xml
  38. 1 0
      src/main/res/values/colors.xml
  39. 1 0
      src/main/res/values/dims.xml
  40. 8 3
      src/main/res/values/strings.xml

+ 6 - 6
drawable_resources/alphabetical_desc.svg

@@ -8,11 +8,11 @@
    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
    version="1.1"
-   width="24"
-   height="24"
+   width="25.6"
+   height="25.6"
    viewBox="0 0 24 24"
    id="svg2"
-   inkscape:version="0.91 r13725"
+   inkscape:version="0.92.0 r15299"
    sodipodi:docname="alphabetical_desc.svg"
    inkscape:export-filename="C:\DEV\src\Android\Nextcloud\newSortingLayout\res\drawable-xxxhdpi\ic_alphabetical_desc.png"
    inkscape:export-xdpi="360"
@@ -44,7 +44,7 @@
      id="namedview6"
      showgrid="false"
      inkscape:zoom="27.81"
-     inkscape:cx="7.0679049"
+     inkscape:cx="-2.5868955"
      inkscape:cy="12"
      inkscape:window-x="-9"
      inkscape:window-y="-9"
@@ -52,12 +52,12 @@
      inkscape:current-layer="svg2" />
   <path
      style="fill:#757575;fill-opacity:1"
-     d="m 7.7507904,1.734489 0,1.675878 3.7732956,0 0,0.05312 -4.1674184,5.939256 0,1.105257 6.7994724,0 0,-1.684446 -4.133147,0 0,-0.07026 4.071458,-5.843297 0,-1.175514 -6.3436606,0 z"
+     d="m 7.7507904,1.734489 v 1.675878 h 3.7732956 v 0.05312 L 7.3566676,9.402743 V 10.508 H 14.15614 V 8.823554 H 10.022993 V 8.753294 L 14.094451,2.909997 V 1.734483 H 7.7507904 Z"
      id="path4"
      inkscape:connector-curvature="0" />
   <path
      style="fill:#757575;fill-opacity:1"
-     d="M 9.6035632,11.364486 6.8926845,20.138 l 2.0802823,0 0.6305964,-2.369878 2.5360938,0 0.683717,2.369878 2.159106,0 -2.746863,-8.773514 -2.6320538,0 z m 1.2200668,1.429123 0.0257,0 0.219338,0.84308 0.227906,0.851647 0.553485,1.859232 -1.9569049,0 0.5260679,-1.842096 0.21077,-0.860215 0.193634,-0.851648 z"
+     d="M 9.6035632,11.364486 6.8926845,20.138 H 8.9729668 L 9.6035632,17.768122 H 12.139657 L 12.823374,20.138 h 2.159106 l -2.746863,-8.773514 z m 1.2200668,1.429123 h 0.0257 l 0.219338,0.84308 0.227906,0.851647 0.553485,1.859232 H 9.8931541 l 0.5260679,-1.842096 0.21077,-0.860215 0.193634,-0.851648 z"
      id="path4-2"
      inkscape:connector-curvature="0" />
   <path

+ 13 - 12
drawable_resources/modified_asc.svg → drawable_resources/modification_asc.svg

@@ -8,13 +8,13 @@
    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
    version="1.1"
-   width="24"
-   height="24"
+   width="25.6"
+   height="25.6"
    viewBox="0 0 24 24"
    id="svg2"
-   inkscape:version="0.91 r13725"
+   inkscape:version="0.92.0 r15299"
    sodipodi:docname="modified_asc.svg"
-   inkscape:export-filename="C:\DEV\src\Android\Nextcloud\newSortingLayout\res\drawable-xxxhdpi\ic_modified_asc.png"
+   inkscape:export-filename="C:\DEV\src\Android\Nextcloud\newSortingLayout\res\drawable-xxxhdpi\ic_modification_asc.png"
    inkscape:export-xdpi="360"
    inkscape:export-ydpi="360">
   <metadata
@@ -25,6 +25,7 @@
         <dc:format>image/svg+xml</dc:format>
         <dc:type
            rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
       </cc:Work>
     </rdf:RDF>
   </metadata>
@@ -43,21 +44,21 @@
      inkscape:window-height="1005"
      id="namedview6"
      showgrid="false"
-     inkscape:zoom="27.812867"
-     inkscape:cx="3.7838958"
+     inkscape:zoom="22.63"
+     inkscape:cx="15.581769"
      inkscape:cy="6.7845462"
      inkscape:window-x="-9"
      inkscape:window-y="-9"
      inkscape:window-maximized="1"
      inkscape:current-layer="svg2" />
   <path
-     style="fill:#757575;fill-opacity:1"
-     d="M 10.865234 2 A 8.866 8.866 0 0 0 2 10.865234 C 2 15.741534 5.9623376 19.732422 10.865234 19.732422 A 8.866 8.866 0 0 0 13.613281 19.285156 L 13.613281 17.402344 A 7.0928 7.0928 0 0 1 10.865234 17.958984 A 7.0928 7.0928 0 0 1 3.7734375 10.865234 A 7.0928 7.0928 0 0 1 10.865234 3.7734375 A 7.0928 7.0928 0 0 1 17.958984 10.865234 A 7.0928 7.0928 0 0 1 17.949219 11.162109 L 19.716797 11.162109 A 8.866 8.866 0 0 0 19.732422 10.865234 A 8.866 8.866 0 0 0 10.865234 2 z M 9.9785156 6.4335938 L 9.9785156 11.751953 L 14.634766 14.544922 L 15.298828 13.455078 L 11.308594 11.087891 L 11.308594 6.4335938 L 9.9785156 6.4335938 z "
+     style="fill:#757575;fill-opacity:1;stroke-width:1.06666672"
+     d="M 11.589844 2.1328125 A 9.4570668 9.4570668 0 0 0 2.1328125 11.589844 C 2.1328125 16.79123 6.3600875 21.048828 11.589844 21.048828 A 9.4570668 9.4570668 0 0 0 13.015625 20.921875 L 13.015625 19.017578 A 7.5656534 7.5656534 0 0 1 11.589844 19.15625 A 7.5656534 7.5656534 0 0 1 4.0253906 11.589844 A 7.5656534 7.5656534 0 0 1 11.589844 4.0253906 A 7.5656534 7.5656534 0 0 1 18.978516 10 L 20.902344 10 A 9.4570668 9.4570668 0 0 0 11.589844 2.1328125 z M 10.644531 6.8632812 L 10.644531 12.535156 L 13.015625 13.957031 L 13.015625 12.392578 L 12.0625 11.826172 L 12.0625 6.8632812 L 10.644531 6.8632812 z "
+     transform="scale(0.93749999)"
      id="path4" />
   <path
      inkscape:connector-curvature="0"
-     d="m 19.12569,21.6966 -1.428741,0.0014 -0.0086,-6.184289 -1.53692,1.544835 -1.015429,-1.013386 3.263957,-3.275355 3.275354,3.263958 -1.013385,1.015428 -1.544836,-1.53692 z"
-     id="path4-3"
-     sodipodi:nodetypes="cccccccccc"
-     style="fill:#757575;fill-opacity:1" />
+     d="m 13.720313,16.930993 h 5.580275 v -1.736354 h -5.580275 m 0,-4.340882 v 1.736354 h 8.370413 v -1.736354 m -8.370413,10.418118 h 2.790138 v -1.736351 h -2.790138 z"
+     id="path4-8"
+     style="fill:#757575;fill-opacity:1;stroke-width:1.16980636" />
 </svg>

+ 11 - 11
drawable_resources/modified_desc.svg → drawable_resources/modification_desc.svg

@@ -8,11 +8,11 @@
    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
    version="1.1"
-   width="24"
-   height="24"
+   width="25.6"
+   height="25.6"
    viewBox="0 0 24 24"
    id="svg2"
-   inkscape:version="0.91 r13725"
+   inkscape:version="0.92.0 r15299"
    sodipodi:docname="modified_desc.svg"
    inkscape:export-filename="C:\DEV\src\Android\Nextcloud\newSortingLayout\res\drawable-xxxhdpi\ic_modified_desc.png"
    inkscape:export-xdpi="360"
@@ -43,21 +43,21 @@
      inkscape:window-height="1005"
      id="namedview6"
      showgrid="false"
-     inkscape:zoom="27.812867"
-     inkscape:cx="3.7838958"
+     inkscape:zoom="22.63"
+     inkscape:cx="15.581769"
      inkscape:cy="6.7845462"
      inkscape:window-x="-9"
      inkscape:window-y="-9"
      inkscape:window-maximized="1"
      inkscape:current-layer="svg2" />
   <path
-     style="fill:#757575;fill-opacity:1"
-     d="M 10.865234 2 A 8.866 8.866 0 0 0 2 10.865234 C 2 15.741534 5.9623376 19.732422 10.865234 19.732422 A 8.866 8.866 0 0 0 13.613281 19.285156 L 13.613281 17.402344 A 7.0928 7.0928 0 0 1 10.865234 17.958984 A 7.0928 7.0928 0 0 1 3.7734375 10.865234 A 7.0928 7.0928 0 0 1 10.865234 3.7734375 A 7.0928 7.0928 0 0 1 17.958984 10.865234 A 7.0928 7.0928 0 0 1 17.949219 11.162109 L 19.716797 11.162109 A 8.866 8.866 0 0 0 19.732422 10.865234 A 8.866 8.866 0 0 0 10.865234 2 z M 9.9785156 6.4335938 L 9.9785156 11.751953 L 14.634766 14.544922 L 15.298828 13.455078 L 11.308594 11.087891 L 11.308594 6.4335938 L 9.9785156 6.4335938 z "
+     style="fill:#757575;fill-opacity:1;stroke-width:1.06666672"
+     d="M 11.589844 2.1328125 A 9.4570668 9.4570668 0 0 0 2.1328125 11.589844 C 2.1328125 16.79123 6.3600875 21.048828 11.589844 21.048828 A 9.4570668 9.4570668 0 0 0 13.015625 20.921875 L 13.015625 19.017578 A 7.5656534 7.5656534 0 0 1 11.589844 19.15625 A 7.5656534 7.5656534 0 0 1 4.0253906 11.589844 A 7.5656534 7.5656534 0 0 1 11.589844 4.0253906 A 7.5656534 7.5656534 0 0 1 18.978516 10 L 20.902344 10 A 9.4570668 9.4570668 0 0 0 11.589844 2.1328125 z M 10.644531 6.8632812 L 10.644531 12.535156 L 13.015625 13.957031 L 13.015625 12.392578 L 12.0625 11.826172 L 12.0625 6.8632812 L 10.644531 6.8632812 z "
+     transform="scale(0.93749999)"
      id="path4" />
   <path
      inkscape:connector-curvature="0"
-     d="m 19.12569,12.771205 -1.428741,-0.0014 -0.0086,6.184289 -1.53692,-1.544835 -1.015429,1.013386 3.263957,3.275355 3.275354,-3.263958 -1.013385,-1.015428 -1.544836,1.53692 z"
-     id="path4-3"
-     sodipodi:nodetypes="cccccccccc"
-     style="fill:#757575;fill-opacity:1" />
+     d="m 13.720313,15.194639 h 5.580275 v 1.736354 h -5.580275 m 0,4.340882 v -1.736354 h 8.370413 v 1.736354 M 13.720313,10.853757 h 2.790138 v 1.736351 h -2.790138 z"
+     id="path4-8"
+     style="fill:#757575;fill-opacity:1;stroke-width:1.16980636" />
 </svg>

+ 12 - 12
drawable_resources/size_asc.svg

@@ -8,11 +8,11 @@
    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
    version="1.1"
-   width="24"
-   height="24"
+   width="25.6"
+   height="25.6"
    viewBox="0 0 24 24"
    id="svg2"
-   inkscape:version="0.91 r13725"
+   inkscape:version="0.92.0 r15299"
    sodipodi:docname="size_asc.svg"
    inkscape:export-filename="C:\DEV\src\Android\Nextcloud\newSortingLayout\res\drawable-xxxhdpi\ic_size_asc.png"
    inkscape:export-xdpi="360"
@@ -44,9 +44,9 @@
      inkscape:window-height="1005"
      id="namedview6"
      showgrid="false"
-     inkscape:zoom="11.313709"
-     inkscape:cx="-26.982302"
-     inkscape:cy="7.1318512"
+     inkscape:zoom="22.627418"
+     inkscape:cx="15.398362"
+     inkscape:cy="7.3901816"
      inkscape:window-x="-9"
      inkscape:window-y="-9"
      inkscape:window-maximized="1"
@@ -66,12 +66,12 @@
      inkscape:label="Layer 1" />
   <path
      inkscape:connector-curvature="0"
-     d="m 16.137059,17.154209 4.770256,0 0,1.484309 -4.770256,0 m 0,3.71077 0,-1.484309 7.155385,0 0,1.484309 m -7.155385,-8.905849 2.385129,0 0,1.484307 -2.385129,0 0,-1.484307 z"
+     d="m 13.720501,15.194819 h 5.580275 v 1.736354 h -5.580275 m 0,4.340882 v -1.736354 h 8.370414 v 1.736354 M 13.720501,10.853937 h 2.790138 v 1.736351 h -2.790138 z"
      id="path4-8"
-     style="fill:#757575;fill-opacity:1" />
+     style="fill:#757575;fill-opacity:1;stroke-width:1.16980636" />
   <path
-     style="fill:#757575;fill-opacity:1"
-     d="M 9.7616806,1.690984 A 8.866,8.866 0 0 0 0.89449351,10.556218 8.866,8.866 0 0 0 9.7616806,19.423406 8.866,8.866 0 0 0 14.642541,17.94489 l 0,-2.265625 A 7.0928,7.0928 0 0 1 9.7616806,17.649968 7.0928,7.0928 0 0 1 2.667931,10.556218 7.0928,7.0928 0 0 1 9.7616806,3.4644215 7.0928,7.0928 0 0 1 16.853478,10.556218 7.0928,7.0928 0 0 1 16.714806,11.950749 l 1.796875,0 A 8.866,8.866 0 0 0 18.626916,10.556218 8.866,8.866 0 0 0 9.7616806,1.690984 Z m 0,3.546875 0,5.318359 -3.7597652,3.759766 c 2.0746439,2.074644 5.4429346,2.074644 7.5175786,0 2.08351,-2.074644 2.08351,-5.4429341 0,-7.5175781 C 12.482172,5.7522179 11.118179,5.237859 9.7616806,5.237859 Z"
-     id="path4-88"
-     inkscape:connector-curvature="0" />
+     style="fill:#757575;fill-opacity:1;stroke-width:1.06666672"
+     d="M 10.412109 1.8046875 A 9.4570668 9.4570668 0 0 0 0.95507812 11.259766 A 9.4570668 9.4570668 0 0 0 10.412109 20.71875 A 9.4570668 9.4570668 0 0 0 13.015625 20.337891 L 13.015625 18.351562 A 7.5656534 7.5656534 0 0 1 10.412109 18.826172 A 7.5656534 7.5656534 0 0 1 2.8457031 11.259766 A 7.5656534 7.5656534 0 0 1 10.412109 3.6953125 A 7.5656534 7.5656534 0 0 1 17.869141 10 L 19.773438 10 A 9.4570668 9.4570668 0 0 0 10.412109 1.8046875 z M 10.412109 5.5878906 L 10.412109 11.259766 L 6.4023438 15.269531 C 8.191236 17.058424 10.881148 17.400168 13.015625 16.296875 L 13.015625 10 L 15.941406 10 C 15.711784 8.9928477 15.206905 8.0355871 14.419922 7.2519531 C 13.313445 6.1360192 11.859041 5.5878906 10.412109 5.5878906 z "
+     transform="scale(0.93749999)"
+     id="path4-88" />
 </svg>

+ 13 - 13
drawable_resources/size_desc.svg

@@ -8,11 +8,11 @@
    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
    version="1.1"
-   width="24"
-   height="24"
+   width="25.6"
+   height="25.6"
    viewBox="0 0 24 24"
    id="svg2"
-   inkscape:version="0.91 r13725"
+   inkscape:version="0.92.0 r15299"
    sodipodi:docname="size_desc.svg"
    inkscape:export-filename="C:\DEV\src\Android\Nextcloud\newSortingLayout\res\drawable-xxxhdpi\ic_size_desc.png"
    inkscape:export-xdpi="360"
@@ -43,9 +43,9 @@
      inkscape:window-height="1005"
      id="namedview6"
      showgrid="false"
-     inkscape:zoom="11.313709"
-     inkscape:cx="-26.982302"
-     inkscape:cy="7.1318512"
+     inkscape:zoom="22.63"
+     inkscape:cx="11.152894"
+     inkscape:cy="8.874615"
      inkscape:window-x="-9"
      inkscape:window-y="-9"
      inkscape:window-maximized="1"
@@ -63,14 +63,14 @@
      inkscape:groupmode="layer"
      id="layer1"
      inkscape:label="Layer 1" />
+  <path
+     style="fill:#757575;fill-opacity:1;stroke-width:1.06666672"
+     d="M 10.412109 1.8046875 A 9.4570668 9.4570668 0 0 0 0.95507812 11.259766 A 9.4570668 9.4570668 0 0 0 10.412109 20.71875 A 9.4570668 9.4570668 0 0 0 13.015625 20.337891 L 13.015625 18.351562 A 7.5656534 7.5656534 0 0 1 10.412109 18.826172 A 7.5656534 7.5656534 0 0 1 2.8457031 11.259766 A 7.5656534 7.5656534 0 0 1 10.412109 3.6953125 A 7.5656534 7.5656534 0 0 1 17.869141 10 L 19.773438 10 A 9.4570668 9.4570668 0 0 0 10.412109 1.8046875 z M 10.412109 5.5878906 L 10.412109 11.259766 L 6.4023438 15.269531 C 8.191236 17.058424 10.881148 17.400168 13.015625 16.296875 L 13.015625 10 L 15.941406 10 C 15.711784 8.9928477 15.206905 8.0355871 14.419922 7.2519531 C 13.313445 6.1360192 11.859041 5.5878906 10.412109 5.5878906 z "
+     transform="scale(0.93749999)"
+     id="path4-88" />
   <path
      inkscape:connector-curvature="0"
-     d="m 16.137059,18.638518 4.770256,0 0,-1.484309 -4.770256,0 m 0,-3.71077 0,1.484309 7.155385,0 0,-1.484309 m -7.155385,8.905849 2.385129,0 0,-1.484307 -2.385129,0 0,1.484307 z"
+     d="m 13.720312,16.930993 h 5.580275 v -1.736354 h -5.580275 m 0,-4.340882 v 1.736354 h 8.370413 v -1.736354 m -8.370413,10.418118 h 2.790138 v -1.736351 h -2.790138 z"
      id="path4-8"
-     style="fill:#757575;fill-opacity:1" />
-  <path
-     style="fill:#757575;fill-opacity:1"
-     d="M 9.7616806,1.690984 A 8.866,8.866 0 0 0 0.89449351,10.556218 8.866,8.866 0 0 0 9.7616806,19.423406 8.866,8.866 0 0 0 14.642541,17.94489 l 0,-2.265625 A 7.0928,7.0928 0 0 1 9.7616806,17.649968 7.0928,7.0928 0 0 1 2.667931,10.556218 7.0928,7.0928 0 0 1 9.7616806,3.4644215 7.0928,7.0928 0 0 1 16.853478,10.556218 7.0928,7.0928 0 0 1 16.714806,11.950749 l 1.796875,0 A 8.866,8.866 0 0 0 18.626916,10.556218 8.866,8.866 0 0 0 9.7616806,1.690984 Z m 0,3.546875 0,5.318359 -3.7597652,3.759766 c 2.0746439,2.074644 5.4429346,2.074644 7.5175786,0 2.08351,-2.074644 2.08351,-5.4429341 0,-7.5175781 C 12.482172,5.7522179 11.118179,5.237859 9.7616806,5.237859 Z"
-     id="path4-88"
-     inkscape:connector-curvature="0" />
+     style="fill:#757575;fill-opacity:1;stroke-width:1.16980636" />
 </svg>

BIN
res/drawable-hdpi/ic_alphabetical_asc.png


BIN
res/drawable-hdpi/ic_alphabetical_desc.png


BIN
res/drawable-hdpi/ic_modification_asc.png


BIN
res/drawable-hdpi/ic_modification_desc.png


BIN
res/drawable-hdpi/ic_size_asc.png


BIN
res/drawable-hdpi/ic_size_desc.png


BIN
res/drawable-mdpi/ic_alphabetical_asc.png


BIN
res/drawable-mdpi/ic_alphabetical_desc.png


BIN
res/drawable-mdpi/ic_modification_asc.png


BIN
res/drawable-mdpi/ic_modification_desc.png


BIN
res/drawable-mdpi/ic_size_asc.png


BIN
res/drawable-mdpi/ic_size_desc.png


BIN
res/drawable-xhdpi/ic_alphabetical_asc.png


BIN
res/drawable-xhdpi/ic_alphabetical_desc.png


BIN
res/drawable-xhdpi/ic_modification_asc.png


BIN
res/drawable-xhdpi/ic_modification_desc.png


BIN
res/drawable-xhdpi/ic_size_asc.png


BIN
res/drawable-xhdpi/ic_size_desc.png


BIN
res/drawable-xxhdpi/ic_alphabetical_asc.png


BIN
res/drawable-xxhdpi/ic_alphabetical_desc.png


BIN
res/drawable-xxhdpi/ic_modification_asc.png


BIN
res/drawable-xxhdpi/ic_modification_desc.png


BIN
res/drawable-xxhdpi/ic_size_asc.png


BIN
res/drawable-xxhdpi/ic_size_desc.png


BIN
res/drawable-xxxhdpi/ic_modification_asc.png


BIN
res/drawable-xxxhdpi/ic_modification_desc.png


BIN
res/drawable-xxxhdpi/ic_size_asc.png


BIN
res/drawable-xxxhdpi/ic_size_desc.png


+ 226 - 119
res/layout/sorting_order_fragment.xml

@@ -18,142 +18,249 @@
   You should have received a copy of the GNU Affero General Public
   License along with this program.  If not, see <http://www.gnu.org/licenses/>.
 -->
-<LinearLayout android:id="@+id/root"
-              xmlns:android="http://schemas.android.com/apk/res/android"
-              android:layout_width="match_parent"
-              android:layout_height="wrap_content"
-              android:orientation="vertical"
-              android:padding="@dimen/standard_padding">
-
-    <TextView
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        style="@style/Base.DialogWindowTitle.AppCompat"
-        android:layout_marginBottom="@dimen/standard_margin"
-        android:text="Sort by" />
+<LinearLayout
+    android:id="@+id/root"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:minWidth="300dp"
+    android:orientation="vertical">
 
     <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginBottom="@dimen/standard_margin"
-        android:orientation="horizontal">
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content">
 
         <TextView
-            android:id="@+id/sortByNameText"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center_vertical"
-            android:layout_marginBottom="@dimen/standard_half_margin"
-            android:layout_marginTop="@dimen/standard_half_margin"
-            android:layout_marginRight="@dimen/standard_margin"
-            android:layout_weight="1"
-            android:ellipsize="middle"
-            android:maxLines="1"
-            android:text="Name"
-            android:textColor="@color/textColor"
-            android:textSize="@dimen/two_line_primary_text_size"/>
-
-        <ImageButton
-            android:id="@+id/sortByNameAscending"
-            android:layout_width="wrap_content"
+            android:id="@+id/header"
+            style="@style/Base.DialogWindowTitle.AppCompat"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_gravity="center_vertical"
-            android:background="@color/white"
-            android:padding="@dimen/standard_padding"
-            android:src="@drawable/ic_alphabetical_asc"/>
-
-        <ImageButton
-            android:id="@+id/sortByNameDescending"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center_vertical"
-            android:background="@color/white"
-            android:padding="@dimen/standard_padding"
-            android:src="@drawable/ic_alphabetical_desc"/>
+            android:layout_margin="@dimen/standard_margin"
+            android:text="@string/sort_by"/>
 
     </LinearLayout>
 
-    <LinearLayout
+    <ScrollView
+        android:id="@+id/scrollableSortings"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginBottom="@dimen/standard_margin"
-        android:orientation="horizontal">
+        android:layout_height="0dp"
+        android:layout_weight="1">
 
-        <TextView
-            android:id="@+id/sortByModificationDateText"
-            android:layout_width="0dp"
+        <LinearLayout
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_gravity="center_vertical"
-            android:layout_marginBottom="@dimen/standard_half_margin"
-            android:layout_marginTop="@dimen/standard_half_margin"
-            android:layout_marginRight="@dimen/standard_margin"
-            android:layout_weight="1"
-            android:ellipsize="middle"
-            android:maxLines="1"
-            android:text="Modification Date"
-            android:textColor="@color/textColor"
-            android:textSize="@dimen/two_line_primary_text_size"/>
-
-        <ImageButton
-            android:id="@+id/sortByModificationDateAscending"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center_vertical"
-            android:background="@color/white"
-            android:padding="@dimen/standard_padding"
-            android:src="@drawable/ic_modification_asc"/>
+            android:orientation="vertical">
 
-        <ImageButton
-            android:id="@+id/sortByModificationDateDescending"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center_vertical"
-            android:background="@color/white"
-            android:padding="@dimen/standard_padding"
-            android:src="@drawable/ic_modification_desc"/>
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal">
 
-    </LinearLayout>
+                <ImageButton
+                    android:id="@+id/sortByNameAscending"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:background="@color/white"
+                    android:paddingBottom="@dimen/standard_half_padding"
+                    android:paddingLeft="@dimen/standard_padding"
+                    android:paddingRight="@dimen/standard_half_padding"
+                    android:paddingTop="@dimen/standard_half_padding"
+                    android:src="@drawable/ic_alphabetical_asc"/>
 
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginBottom="@dimen/standard_margin"
-        android:orientation="horizontal">
+                <TextView
+                    android:id="@+id/sortByNameAZText"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:layout_weight="1"
+                    android:ellipsize="middle"
+                    android:maxLines="1"
+                    android:paddingBottom="@dimen/standard_half_padding"
+                    android:paddingRight="@dimen/standard_double_padding"
+                    android:paddingTop="@dimen/standard_half_padding"
+                    android:text="@string/menu_item_sort_by_name_a_z"
+                    android:textColor="@color/standard_grey"
+                    android:textSize="@dimen/two_line_primary_text_size"/>
 
-        <TextView
-            android:id="@+id/sortBySizeText"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center_vertical"
-            android:layout_marginBottom="@dimen/standard_half_margin"
-            android:layout_marginTop="@dimen/standard_half_margin"
-            android:layout_marginRight="@dimen/standard_margin"
-            android:layout_weight="1"
-            android:ellipsize="middle"
-            android:maxLines="1"
-            android:text="Size"
-            android:textColor="@color/textColor"
-            android:textSize="@dimen/two_line_primary_text_size"/>
-
-        <ImageButton
-            android:id="@+id/sortBySizeAscending"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center_vertical"
-            android:background="@color/white"
-            android:padding="@dimen/standard_padding"
-            android:src="@drawable/ic_size_asc"/>
+            </LinearLayout>
 
-        <ImageButton
-            android:id="@+id/sortBySizeDescending"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center_vertical"
-            android:background="@color/white"
-            android:padding="@dimen/standard_padding"
-            android:src="@drawable/ic_size_desc"/>
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginBottom="@dimen/standard_margin"
+                android:orientation="horizontal">
 
-    </LinearLayout>
+                <ImageButton
+                    android:id="@+id/sortByNameDescending"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:background="@color/white"
+                    android:paddingBottom="@dimen/standard_half_padding"
+                    android:paddingLeft="@dimen/standard_padding"
+                    android:paddingRight="@dimen/standard_half_padding"
+                    android:paddingTop="@dimen/standard_half_padding"
+                    android:src="@drawable/ic_alphabetical_desc"/>
+
+                <TextView
+                    android:id="@+id/sortByNameZAText"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:layout_weight="1"
+                    android:ellipsize="middle"
+                    android:maxLines="1"
+                    android:paddingBottom="@dimen/standard_half_padding"
+                    android:paddingRight="@dimen/standard_double_padding"
+                    android:paddingTop="@dimen/standard_half_padding"
+                    android:text="@string/menu_item_sort_by_name_z_a"
+                    android:textColor="@color/standard_grey"
+                    android:textSize="@dimen/two_line_primary_text_size"/>
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal">
+
+                <ImageButton
+                    android:id="@+id/sortByModificationDateDescending"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:background="@color/white"
+                    android:paddingBottom="@dimen/standard_half_padding"
+                    android:paddingLeft="@dimen/standard_padding"
+                    android:paddingRight="@dimen/standard_half_padding"
+                    android:paddingTop="@dimen/standard_half_padding"
+                    android:src="@drawable/ic_modification_desc"/>
+
+                <TextView
+                    android:id="@+id/sortByModificationDateNewestFirstText"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:layout_weight="1"
+                    android:ellipsize="middle"
+                    android:maxLines="1"
+                    android:paddingBottom="@dimen/standard_half_padding"
+                    android:paddingRight="@dimen/standard_double_padding"
+                    android:paddingTop="@dimen/standard_half_padding"
+                    android:text="@string/menu_item_sort_by_date_newest_first"
+                    android:textColor="@color/standard_grey"
+                    android:textSize="@dimen/two_line_primary_text_size"/>
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginBottom="@dimen/standard_margin"
+                android:orientation="horizontal">
+
+                <ImageButton
+                    android:id="@+id/sortByModificationDateAscending"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:background="@color/white"
+                    android:paddingBottom="@dimen/standard_half_padding"
+                    android:paddingLeft="@dimen/standard_padding"
+                    android:paddingRight="@dimen/standard_half_padding"
+                    android:paddingTop="@dimen/standard_half_padding"
+                    android:src="@drawable/ic_modification_asc"/>
+
+                <TextView
+                    android:id="@+id/sortByModificationDateOldestFirstText"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:layout_weight="1"
+                    android:ellipsize="middle"
+                    android:maxLines="1"
+                    android:paddingBottom="@dimen/standard_half_padding"
+                    android:paddingRight="@dimen/standard_double_padding"
+                    android:paddingTop="@dimen/standard_half_padding"
+                    android:text="@string/menu_item_sort_by_date_oldest_first"
+                    android:textColor="@color/standard_grey"
+                    android:textSize="@dimen/two_line_primary_text_size"/>
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal">
+
+                <ImageButton
+                    android:id="@+id/sortBySizeDescending"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:background="@color/white"
+                    android:paddingBottom="@dimen/standard_half_padding"
+                    android:paddingLeft="@dimen/standard_padding"
+                    android:paddingRight="@dimen/standard_half_padding"
+                    android:paddingTop="@dimen/standard_half_padding"
+                    android:src="@drawable/ic_size_desc"/>
+
+                <TextView
+                    android:id="@+id/sortBySizeBiggestFirstText"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:layout_weight="1"
+                    android:ellipsize="middle"
+                    android:maxLines="1"
+                    android:paddingBottom="@dimen/standard_half_padding"
+                    android:paddingRight="@dimen/standard_double_padding"
+                    android:paddingTop="@dimen/standard_half_padding"
+                    android:text="@string/menu_item_sort_by_size_biggest_first"
+                    android:textColor="@color/standard_grey"
+                    android:textSize="@dimen/two_line_primary_text_size"/>
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginBottom="@dimen/standard_margin"
+                android:orientation="horizontal">
+
+                <ImageButton
+                    android:id="@+id/sortBySizeAscending"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:background="@color/white"
+                    android:paddingBottom="@dimen/standard_half_padding"
+                    android:paddingLeft="@dimen/standard_padding"
+                    android:paddingRight="@dimen/standard_half_padding"
+                    android:paddingTop="@dimen/standard_half_padding"
+                    android:src="@drawable/ic_size_asc"/>
+
+                <TextView
+                    android:id="@+id/sortBySizeSmallestFirstText"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:layout_weight="1"
+                    android:ellipsize="middle"
+                    android:maxLines="1"
+                    android:paddingBottom="@dimen/standard_half_padding"
+                    android:paddingRight="@dimen/standard_double_padding"
+                    android:paddingTop="@dimen/standard_half_padding"
+                    android:text="@string/menu_item_sort_by_size_smallest_first"
+                    android:textColor="@color/standard_grey"
+                    android:textSize="@dimen/two_line_primary_text_size"/>
+
+            </LinearLayout>
+
+        </LinearLayout>
+
+    </ScrollView>
 
     <LinearLayout
         android:layout_width="match_parent"

+ 38 - 2
src/com/owncloud/android/ui/dialog/SortingOrderDialogFragment.java

@@ -29,6 +29,7 @@ import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.ImageButton;
+import android.widget.TextView;
 
 import com.owncloud.android.R;
 import com.owncloud.android.lib.common.utils.Log_OC;
@@ -59,6 +60,13 @@ public class SortingOrderDialogFragment extends DialogFragment {
     private ImageButton mSortByModificationDateAscendingButton = null;
     private ImageButton mSortByModificationDateDescendingButton = null;
 
+    private TextView mSortByNameAscendingText = null;
+    private TextView mSortByNameDescendingText = null;
+    private TextView mSortBySizeAscendingText = null;
+    private TextView mSortBySizeDescendingText = null;
+    private TextView mSortByModificationDateAscendingText = null;
+    private TextView mSortByModificationDateDescendingText = null;
+
     private int mSortOrder;
     private boolean mSortAscending;
 
@@ -113,6 +121,13 @@ public class SortingOrderDialogFragment extends DialogFragment {
         mSortBySizeAscendingButton = (ImageButton) view.findViewById(R.id.sortBySizeAscending);
         mSortBySizeDescendingButton = (ImageButton) view.findViewById(R.id.sortBySizeDescending);
 
+        mSortByNameAscendingText = (TextView) view.findViewById(R.id.sortByNameAZText);
+        mSortByNameDescendingText = (TextView) view.findViewById(R.id.sortByNameZAText);
+        mSortByModificationDateAscendingText = (TextView) view.findViewById(R.id.sortByModificationDateOldestFirstText);
+        mSortByModificationDateDescendingText = (TextView) view.findViewById(R.id.sortByModificationDateNewestFirstText);
+        mSortBySizeAscendingText = (TextView) view.findViewById(R.id.sortBySizeSmallestFirstText);
+        mSortBySizeDescendingText = (TextView) view.findViewById(R.id.sortBySizeBiggestFirstText);
+
         mSortByNameAscendingButton.setTag(BY_NAME_ASC);
         mSortByNameDescendingButton.setTag(BY_NAME_DESC);
         mSortByModificationDateAscendingButton.setTag(BY_MODIFICATION_DATE_ASC);
@@ -120,6 +135,13 @@ public class SortingOrderDialogFragment extends DialogFragment {
         mSortBySizeAscendingButton.setTag(BY_SIZE_ASC);
         mSortBySizeDescendingButton.setTag(BY_SIZE_DESC);
 
+        mSortByNameAscendingText.setTag(BY_NAME_ASC);
+        mSortByNameDescendingText.setTag(BY_NAME_DESC);
+        mSortByModificationDateAscendingText.setTag(BY_MODIFICATION_DATE_ASC);
+        mSortByModificationDateDescendingText.setTag(BY_MODIFICATION_DATE_DESC);
+        mSortBySizeAscendingText.setTag(BY_SIZE_ASC);
+        mSortBySizeDescendingText.setTag(BY_SIZE_DESC);
+
         setupActiveOrderSelection();
     }
 
@@ -131,30 +153,36 @@ public class SortingOrderDialogFragment extends DialogFragment {
             switch (mSortOrder) {
                 case 0:
                     DisplayUtils.colorImageButton(mSortByNameAscendingButton);
+                    mSortByNameAscendingText.setTextColor(getResources().getColor(R.color.color_accent));
                     break;
                 case 1:
                     DisplayUtils.colorImageButton(mSortByModificationDateAscendingButton);
+                    mSortByModificationDateAscendingText.setTextColor(getResources().getColor(R.color.color_accent));
                     break;
                 case 2:
                     DisplayUtils.colorImageButton(mSortBySizeAscendingButton);
+                    mSortBySizeAscendingText.setTextColor(getResources().getColor(R.color.color_accent));
                     break;
                 default: //do nothing
-                    Log_OC.w(TAG, "Unknown sort criteria!");
+                    Log_OC.w(TAG, "Unknown sort order " + mSortOrder);
                     break;
             }
         } else {
             switch (mSortOrder) {
                 case 0:
                     DisplayUtils.colorImageButton(mSortByNameDescendingButton);
+                    mSortByNameDescendingText.setTextColor(getResources().getColor(R.color.color_accent));
                     break;
                 case 1:
                     DisplayUtils.colorImageButton(mSortByModificationDateDescendingButton);
+                    mSortByModificationDateDescendingText.setTextColor(getResources().getColor(R.color.color_accent));
                     break;
                 case 2:
                     DisplayUtils.colorImageButton(mSortBySizeDescendingButton);
+                    mSortBySizeDescendingText.setTextColor(getResources().getColor(R.color.color_accent));
                     break;
                 default: //do nothing
-                    Log_OC.w(TAG, "Unknown sort criteria!");
+                    Log_OC.w(TAG, "Unknown sort order " + mSortOrder);
                     break;
             }
         }
@@ -174,12 +202,20 @@ public class SortingOrderDialogFragment extends DialogFragment {
         });
 
         OnSortingOrderClickListener sortingClickListener = new OnSortingOrderClickListener();
+
         mSortByNameAscendingButton.setOnClickListener(sortingClickListener);
         mSortByNameDescendingButton.setOnClickListener(sortingClickListener);
         mSortByModificationDateAscendingButton.setOnClickListener(sortingClickListener);
         mSortByModificationDateDescendingButton.setOnClickListener(sortingClickListener);
         mSortBySizeAscendingButton.setOnClickListener(sortingClickListener);
         mSortBySizeDescendingButton.setOnClickListener(sortingClickListener);
+
+        mSortByNameAscendingText.setOnClickListener(sortingClickListener);
+        mSortByNameDescendingText.setOnClickListener(sortingClickListener);
+        mSortByModificationDateAscendingText.setOnClickListener(sortingClickListener);
+        mSortByModificationDateDescendingText.setOnClickListener(sortingClickListener);
+        mSortBySizeAscendingText.setOnClickListener(sortingClickListener);
+        mSortBySizeDescendingText.setOnClickListener(sortingClickListener);
     }
 
     @Override

+ 2 - 1
src/main/java/com/owncloud/android/utils/DisplayUtils.java

@@ -329,7 +329,8 @@ public class DisplayUtils {
      */
     public static void colorImageButton(ImageButton imageButton) {
         if (imageButton != null) {
-            imageButton.setColorFilter(imageButton.getResources().getColor(R.color.primary), PorterDuff.Mode.SRC_ATOP);
+            imageButton.setColorFilter(imageButton.getResources().getColor(R.color.color_accent),
+                    PorterDuff.Mode.SRC_ATOP);
         }
     }
 

+ 0 - 6
src/main/res/values/attrs.xml

@@ -26,10 +26,4 @@
 		<item>@string/uploader_upload_files_behaviour_only_upload</item>
 		<item>@string/uploader_upload_files_behaviour_upload_and_delete_from_source</item>
 	</string-array>
-
-	<string-array name="menu_items_sort_by_options" translatable="false">
-		<item>@string/menu_item_sort_by_name</item>
-		<item>@string/menu_item_sort_by_date</item>
-		<item>@string/menu_item_sort_by_size</item>
-	</string-array>
 </resources>

+ 1 - 0
src/main/res/values/colors.xml

@@ -45,6 +45,7 @@
     <!-- Colors -->
     <color name="color_accent">@color/owncloud_blue_accent</color>
     <color name="dialog_list_item">#1F1F1F</color>
+    <color name="standard_grey">#757575</color>
 
     <!-- standard material color definitions -->
     <color name="primary">@color/owncloud_blue</color>

+ 1 - 0
src/main/res/values/dims.xml

@@ -35,6 +35,7 @@
     <dimen name="file_icon_size_grid">128dp</dimen>
     <dimen name="file_avatar_size">128dp</dimen>
     <dimen name="standard_padding">16dp</dimen>
+    <dimen name="standard_double_padding">32dp</dimen>
     <dimen name="standard_half_padding">8dp</dimen>
     <dimen name="standard_quarter_padding">4dp</dimen>
     <dimen name="standard_margin">16dp</dimen>

+ 8 - 3
src/main/res/values/strings.xml

@@ -13,9 +13,14 @@
     <string name="actionbar_send_file">Send</string>
     <string name="actionbar_sort">Sort</string>
     <string name="actionbar_sort_title">Sort by</string>
-    <string name="menu_item_sort_by_name">A - Z</string>
-    <string name="menu_item_sort_by_date">Newest - Oldest</string>
-    <string name="menu_item_sort_by_size">Biggest - Smallest</string>
+    <string name="sort_by">Sort by</string>
+    <string name="menu_item_sort_by_name_a_z">A - Z</string>
+    <string name="menu_item_sort_by_name_z_a">Z - A</string>
+    <string name="menu_item_sort_by_date_newest_first">Newest first</string>
+    <string name="menu_item_sort_by_date_oldest_first">Oldest first</string>
+    <string name="menu_item_sort_by_size_biggest_first">Biggest first</string>
+    <string name="menu_item_sort_by_size_smallest_first">Smallest first</string>
+
     <string name="drawer_item_all_files">All files</string>
     <string name="drawer_item_on_device">On device</string>
     <string name="drawer_item_settings">Settings</string>