Merge pull request #575 from nextcloud/newSortingLayout

New sorting order dialog
This commit is contained in:
Mario Đanić 2017-03-27 07:20:48 +02:00 committed by GitHub
commit 28aa44b0c2
47 changed files with 1060 additions and 54 deletions

View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
width="25.6"
height="25.6"
viewBox="0 0 24 24"
id="svg2"
inkscape:version="0.92.0 r15299"
sodipodi:docname="alphabetical_asc.svg"
inkscape:export-filename="C:\DEV\src\Android\Nextcloud\newSortingLayout\res\drawable-xxxhdpi\ic_alphabetical_asc.png"
inkscape:export-xdpi="360"
inkscape:export-ydpi="360">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1005"
id="namedview6"
showgrid="false"
inkscape:zoom="27.81"
inkscape:cx="5.6317334"
inkscape:cy="12"
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<g
id="g4174"
transform="matrix(0.92801764,0,0,0.92801764,3.1474097,-0.40986228)"
style="fill:#757575;fill-opacity:1">
<path
inkscape:connector-curvature="0"
id="path4"
d="m 4.9604453,12.687998 v 1.805869 h 4.0659743 v 0.05724 L 4.535752,20.951046 v 1.190987 H 11.86263 V 20.326932 H 7.4088934 v -0.07571 L 11.796157,13.954685 V 12.687992 H 4.9604453 Z"
style="fill:#757575;fill-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path4-2"
d="M 6.9569297,2.3102604 4.0357798,11.764298 h 2.2416409 l 0.679509,-2.5536989 h 2.7328076 l 0.7367497,2.5536989 h 2.326579 L 9.7931408,2.3102604 Z m 1.314702,1.539974 h 0.027698 L 8.5356806,4.7587082 8.781264,5.6764144 9.3776808,7.6798582 H 7.2689873 L 7.8358603,5.6948791 8.0629788,4.7679408 Z"
style="fill:#757575;fill-opacity:1" />
</g>
<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" />
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
width="25.6"
height="25.6"
viewBox="0 0 24 24"
id="svg2"
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"
inkscape:export-ydpi="360">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1005"
id="namedview6"
showgrid="false"
inkscape:zoom="27.81"
inkscape:cx="-2.5868955"
inkscape:cy="12"
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 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 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
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" />
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z" /></svg>

After

Width:  |  Height:  |  Size: 366 B

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M19,19H5V8H19M16,1V3H8V1H6V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3H18V1M17,12H12V17H17V12Z" /></svg>

After

Width:  |  Height:  |  Size: 426 B

View File

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
width="25.6"
height="25.6"
viewBox="0 0 24 24"
id="svg2"
inkscape:version="0.92.0 r15299"
sodipodi:docname="modified_asc.svg"
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
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<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>
<defs
id="defs8" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1005"
id="namedview6"
showgrid="false"
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;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 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>

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
width="25.6"
height="25.6"
viewBox="0 0 24 24"
id="svg2"
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"
inkscape:export-ydpi="360">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1005"
id="namedview6"
showgrid="false"
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;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 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>

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
width="25.6"
height="25.6"
viewBox="0 0 24 24"
id="svg2"
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"
inkscape:export-ydpi="360">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1005"
id="namedview6"
showgrid="false"
inkscape:zoom="22.627418"
inkscape:cx="15.398362"
inkscape:cy="7.3901816"
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="Layer 3" />
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2"
style="display:inline" />
<g
inkscape:groupmode="layer"
id="layer1"
inkscape:label="Layer 1" />
<path
inkscape:connector-curvature="0"
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;stroke-width:1.16980636" />
<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" />
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
width="25.6"
height="25.6"
viewBox="0 0 24 24"
id="svg2"
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"
inkscape:export-ydpi="360">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1005"
id="namedview6"
showgrid="false"
inkscape:zoom="22.63"
inkscape:cx="11.152894"
inkscape:cy="8.874615"
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="Layer 3" />
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2"
style="display:inline" />
<g
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 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;stroke-width:1.16980636" />
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -80,6 +80,7 @@ import com.owncloud.android.operations.SynchronizeFileOperation;
import com.owncloud.android.operations.UploadFileOperation;
import com.owncloud.android.services.observer.FileObserverService;
import com.owncloud.android.syncadapter.FileSyncAdapter;
import com.owncloud.android.ui.dialog.SortingOrderDialogFragment;
import com.owncloud.android.ui.fragment.FileDetailFragment;
import com.owncloud.android.ui.fragment.FileFragment;
import com.owncloud.android.ui.fragment.OCFileListFragment;
@ -99,6 +100,7 @@ import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import static com.owncloud.android.db.PreferenceManager.getSortAscending;
import static com.owncloud.android.db.PreferenceManager.getSortOrder;
/**
@ -107,7 +109,7 @@ import static com.owncloud.android.db.PreferenceManager.getSortOrder;
public class FileDisplayActivity extends HookActivity
implements FileFragment.ContainerActivity,
OnEnforceableRefreshListener {
OnEnforceableRefreshListener, SortingOrderDialogFragment.OnSortingOrderListener {
private SyncBroadcastReceiver mSyncBroadcastReceiver;
private UploadFinishReceiver mUploadFinishReceiver;
@ -123,6 +125,8 @@ public class FileDisplayActivity extends HookActivity
private static final String KEY_WAITING_TO_SEND = "WAITING_TO_SEND";
private static final String KEY_SEARCH_QUERY = "KEY_SEARCH_QUERY";
private static final String SORT_ORDER_DIALOG_TAG = "SORT_ORDER_DIALOG";
public static final String ACTION_DETAILS = "com.owncloud.android.ui.activity.action.DETAILS";
public static final int REQUEST_CODE__SELECT_CONTENT_FROM_APPS = REQUEST_CODE__LAST_SHARED + 1;
@ -700,28 +704,16 @@ public class FileDisplayActivity extends HookActivity
break;
}
case R.id.action_sort: {
Integer sortOrder = getSortOrder(this);
FragmentManager fm = getSupportFragmentManager();
FragmentTransaction ft = fm.beginTransaction();
ft.addToBackStack(null);
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(R.string.actionbar_sort_title)
.setSingleChoiceItems(R.array.menu_items_sort_by_options, sortOrder,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
switch (which) {
case 0:
sortByName(true);
break;
case 1:
sortByDate(false);
break;
case 2:
sortBySize(false);
}
SortingOrderDialogFragment mSortingOrderDialogFragment = SortingOrderDialogFragment.newInstance(
getSortOrder(this),
getSortAscending(this)
);
mSortingOrderDialogFragment.show(ft, SORT_ORDER_DIALOG_TAG);
dialog.dismiss();
}
});
builder.create().show();
break;
}
case R.id.action_switch_view: {
@ -1076,6 +1068,33 @@ public class FileDisplayActivity extends HookActivity
}
}
@Override
public void onSortingOrderChosen(int selection) {
switch (selection) {
case SortingOrderDialogFragment.BY_NAME_ASC:
sortByName(true);
break;
case SortingOrderDialogFragment.BY_NAME_DESC:
sortByName(false);
break;
case SortingOrderDialogFragment.BY_MODIFICATION_DATE_ASC:
sortByDate(true);
break;
case SortingOrderDialogFragment.BY_MODIFICATION_DATE_DESC:
sortByDate(false);
break;
case SortingOrderDialogFragment.BY_SIZE_ASC:
sortBySize(true);
break;
case SortingOrderDialogFragment.BY_SIZE_DESC:
sortBySize(false);
break;
default: // defaulting to alphabetical-ascending
Log_OC.w(TAG, "Unknown sort order, defaulting to alphabetical-ascending!");
sortByName(true);
break;
}
}
private class SyncBroadcastReceiver extends BroadcastReceiver {

View File

@ -22,14 +22,14 @@ package com.owncloud.android.ui.activity;
import android.accounts.Account;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Environment;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.ActionBar;
import android.view.Menu;
import android.view.MenuItem;
@ -47,12 +47,16 @@ import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.ui.dialog.ConfirmationDialogFragment;
import com.owncloud.android.ui.dialog.ConfirmationDialogFragment.ConfirmationDialogFragmentListener;
import com.owncloud.android.ui.dialog.IndeterminateProgressDialog;
import com.owncloud.android.ui.dialog.SortingOrderDialogFragment;
import com.owncloud.android.ui.fragment.ExtendedListFragment;
import com.owncloud.android.ui.fragment.LocalFileListFragment;
import com.owncloud.android.utils.FileStorageUtils;
import java.io.File;
import static com.owncloud.android.db.PreferenceManager.getSortAscending;
import static com.owncloud.android.db.PreferenceManager.getSortOrder;
/**
* Displays local files and let the user choose what of them wants to upload
@ -60,8 +64,10 @@ import java.io.File;
*/
public class UploadFilesActivity extends FileActivity implements
LocalFileListFragment.ContainerActivity, ActionBar.OnNavigationListener,
OnClickListener, ConfirmationDialogFragmentListener {
OnClickListener, ConfirmationDialogFragmentListener, SortingOrderDialogFragment.OnSortingOrderListener {
private static final String SORT_ORDER_DIALOG_TAG = "SORT_ORDER_DIALOG";
private ArrayAdapter<String> mDirectories;
private File mCurrentDir = null;
private boolean mSelectAll = false;
@ -207,27 +213,16 @@ public class UploadFilesActivity extends FileActivity implements
// Read sorting order, default to sort by name ascending
Integer sortOrder = PreferenceManager.getSortOrder(this);
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(R.string.actionbar_sort_title)
.setSingleChoiceItems(R.array.menu_items_sort_by_options, sortOrder,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
switch (which){
case 0:
mFileListFragment.sortByName(true);
break;
case 1:
mFileListFragment.sortByDate(false);
break;
case 2:
mFileListFragment.sortBySize(false);
break;
}
FragmentManager fm = getSupportFragmentManager();
FragmentTransaction ft = fm.beginTransaction();
ft.addToBackStack(null);
SortingOrderDialogFragment mSortingOrderDialogFragment = SortingOrderDialogFragment.newInstance(
getSortOrder(this),
getSortAscending(this)
);
mSortingOrderDialogFragment.show(ft, SORT_ORDER_DIALOG_TAG);
dialog.dismiss();
}
});
builder.create().show();
break;
}
case R.id.action_switch_view: {
@ -248,6 +243,33 @@ public class UploadFilesActivity extends FileActivity implements
return retval;
}
@Override
public void onSortingOrderChosen(int selection) {
switch (selection) {
case SortingOrderDialogFragment.BY_NAME_ASC:
mFileListFragment.sortByName(true);
break;
case SortingOrderDialogFragment.BY_NAME_DESC:
mFileListFragment.sortByName(false);
break;
case SortingOrderDialogFragment.BY_MODIFICATION_DATE_ASC:
mFileListFragment.sortByDate(true);
break;
case SortingOrderDialogFragment.BY_MODIFICATION_DATE_DESC:
mFileListFragment.sortByDate(false);
break;
case SortingOrderDialogFragment.BY_SIZE_ASC:
mFileListFragment.sortBySize(true);
break;
case SortingOrderDialogFragment.BY_SIZE_DESC:
mFileListFragment.sortBySize(false);
break;
default: // defaulting to alphabetical-ascending
Log_OC.w(TAG, "Unknown sort order, defaulting to alphabetical-ascending!");
mFileListFragment.sortByName(true);
break;
}
}
@Override
public boolean onNavigationItemSelected(int itemPosition, long itemId) {

View File

@ -0,0 +1,261 @@
/**
* Nextcloud Android client application
*
* @author Andy Scherzinger
* Copyright (C) 2017 Andy Scherzinger
* Copyright (C) 2017 Nextcloud
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* 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 AFFERO GENERAL PUBLIC LICENSE for more details.
*
* 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/>.
*/
package com.owncloud.android.ui.dialog;
import android.app.Dialog;
import android.graphics.Typeface;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;
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;
import com.owncloud.android.utils.DisplayUtils;
/**
* Dialog to show and choose the sorting order for the file listing.
*/
public class SortingOrderDialogFragment extends DialogFragment {
private final static String TAG = SortingOrderDialogFragment.class.getSimpleName();
private static final String KEY_SORT_ORDER = "SORT_ORDER";
private static final String KEY_ASCENDING = "ASCENDING";
public static final int BY_NAME_ASC = 0;
public static final int BY_NAME_DESC = 1;
public static final int BY_MODIFICATION_DATE_ASC = 2;
public static final int BY_MODIFICATION_DATE_DESC = 3;
public static final int BY_SIZE_ASC = 4;
public static final int BY_SIZE_DESC = 5;
private View mView = null;
private ImageButton mSortByNameAscendingButton = null;
private ImageButton mSortByNameDescendingButton = null;
private ImageButton mSortBySizeAscendingButton = null;
private ImageButton mSortBySizeDescendingButton = null;
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;
public static SortingOrderDialogFragment newInstance(int sortOrder, boolean ascending) {
SortingOrderDialogFragment dialogFragment = new SortingOrderDialogFragment();
Bundle args = new Bundle();
args.putInt(KEY_SORT_ORDER, sortOrder);
args.putBoolean(KEY_ASCENDING, ascending);
dialogFragment.setArguments(args);
dialogFragment.setStyle(STYLE_NORMAL, R.style.Theme_ownCloud_Dialog);
return dialogFragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// keep the state of the fragment on configuration changes
setRetainInstance(true);
mView = null;
mSortOrder = getArguments().getInt(KEY_SORT_ORDER, BY_NAME_ASC);
mSortAscending = getArguments().getBoolean(KEY_ASCENDING, true);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
Log_OC.d(TAG, "onCreateView, savedInstanceState is " + savedInstanceState);
mView = inflater.inflate(R.layout.sorting_order_fragment, container, false);
setupDialogElements(mView);
setupListeners(mView);
return mView;
}
/**
* find all relevant UI elements and set their values.
*
* @param view the parent view
*/
private void setupDialogElements(View view) {
// find/saves UI elements
mSortByNameAscendingButton = (ImageButton) view.findViewById(R.id.sortByNameAscending);
mSortByNameDescendingButton = (ImageButton) view.findViewById(R.id.sortByNameDescending);
mSortByModificationDateAscendingButton = (ImageButton) view.findViewById(R.id.sortByModificationDateAscending);
mSortByModificationDateDescendingButton = (ImageButton) view.findViewById(R.id.sortByModificationDateDescending);
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);
mSortByModificationDateDescendingButton.setTag(BY_MODIFICATION_DATE_DESC);
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();
}
/**
* tints the icon reflecting the actual sorting choice in the apps primary color.
*/
private void setupActiveOrderSelection() {
if (mSortAscending) {
switch (mSortOrder) {
case 0:
colorActiveSortingIconAndText(mSortByNameAscendingButton,
mSortByNameAscendingText);
break;
case 1:
colorActiveSortingIconAndText(mSortByModificationDateAscendingButton,
mSortByModificationDateAscendingText);
break;
case 2:
colorActiveSortingIconAndText(mSortBySizeAscendingButton,
mSortBySizeAscendingText);
break;
default: //do nothing
Log_OC.w(TAG, "Unknown sort order " + mSortOrder);
break;
}
} else {
switch (mSortOrder) {
case 0:
colorActiveSortingIconAndText(mSortByNameDescendingButton,
mSortByNameDescendingText);
break;
case 1:
colorActiveSortingIconAndText(mSortByModificationDateDescendingButton,
mSortByModificationDateDescendingText);
break;
case 2:
colorActiveSortingIconAndText(mSortBySizeDescendingButton,
mSortBySizeDescendingText);
break;
default: //do nothing
Log_OC.w(TAG, "Unknown sort order " + mSortOrder);
break;
}
}
}
/**
* Sets the text color and tint the icon of given text view and image button.
*
* @param imageButton the image button, the icon to be tinted
* @param textView the text view, the text color to be set
*/
private void colorActiveSortingIconAndText(ImageButton imageButton, TextView textView) {
int color = getResources().getColor(R.color.color_accent);
DisplayUtils.colorImageButton(imageButton, color);
textView.setTextColor(color);
textView.setTypeface(Typeface.DEFAULT_BOLD);
}
/**
* setup all listeners.
*
* @param view the parent view
*/
private void setupListeners(View view) {
view.findViewById(R.id.cancel).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
dismiss();
}
});
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
@NonNull
public Dialog onCreateDialog(Bundle savedInstanceState) {
return super.onCreateDialog(savedInstanceState);
}
@Override
public void onDestroyView() {
Log_OC.d(TAG, "destroy SortingOrderDialogFragment view");
if (getDialog() != null && getRetainInstance()) {
getDialog().setDismissMessage(null);
}
super.onDestroyView();
}
private class OnSortingOrderClickListener implements View.OnClickListener {
@Override
public void onClick(View v) {
dismissAllowingStateLoss();
((SortingOrderDialogFragment.OnSortingOrderListener) getActivity()).onSortingOrderChosen((int) v.getTag());
}
}
public interface OnSortingOrderListener {
void onSortingOrderChosen(int selection);
}
}

View File

@ -43,6 +43,7 @@ import android.text.SpannableStringBuilder;
import android.text.format.DateUtils;
import android.text.style.StyleSpan;
import android.view.View;
import android.widget.ImageButton;
import android.widget.ProgressBar;
import android.widget.SeekBar;
@ -321,6 +322,17 @@ public class DisplayUtils {
}
}
/**
* sets the tinting of the given ImageButton's icon to color_accent.
*
* @param imageButton the image button who's icon should be colored
*/
public static void colorImageButton(ImageButton imageButton, @ColorInt int color) {
if (imageButton != null) {
imageButton.setColorFilter(color, PorterDuff.Mode.SRC_ATOP);
}
}
/**
* sets the coloring of the given progress bar to color_accent.
*

Binary file not shown.

After

Width:  |  Height:  |  Size: 958 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 976 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 739 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 836 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 919 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -0,0 +1,266 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Nextcloud Android client application
Copyright (C) 2017 Andy Scherzinger
Copyright (C) 2017 Nextcloud
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
License as published by the Free Software Foundation; either
version 3 of the License, or any later version.
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 AFFERO GENERAL PUBLIC LICENSE for more details.
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:minWidth="300dp"
android:orientation="vertical">
<TextView
android:id="@+id/header"
style="@style/Base.DialogWindowTitle.AppCompat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/standard_margin"
android:text="@string/sort_by"/>
<ScrollView
android:id="@+id/scrollableSortings"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
<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"/>
<TextView
android:id="@+id/sortByNameAZText"
android:layout_width="wrap_content"
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"/>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
<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="wrap_content"
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"/>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/standard_half_margin">
<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="wrap_content"
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"/>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
<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="wrap_content"
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"/>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/standard_half_margin">
<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="wrap_content"
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"/>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
<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="wrap_content"
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"/>
</TableRow>
</TableLayout>
</ScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right">
<android.support.v7.widget.AppCompatButton
android:id="@+id/cancel"
style="@style/Button.Borderless"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/common_cancel"/>
</LinearLayout>
</LinearLayout>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>