First work on new key view toolbar

This commit is contained in:
Dominik Schürmann 2015-02-25 02:35:09 +01:00
parent 2b609b8144
commit 56d38dd68b
33 changed files with 599 additions and 930 deletions

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="M9,22A1,1 0 0,1 8,21V18H4A2,2 0 0,1 2,16V4C2,2.89 2.9,2 4,2H20A2,2 0 0,1 22,4V16A2,2 0 0,1 20,18H13.9L10.2,21.71C10,21.9 9.75,22 9.5,22V22H9M5,5V7H19V5H5M5,9V11H13V9H5M5,13V15H15V13H5Z" /></svg>

After

Width:  |  Height:  |  Size: 479 B

View File

@ -0,0 +1,60 @@
<?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="24"
height="24"
viewBox="0 0 24 24"
id="svg2"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="ic_action_encrypt_file.svg">
<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="1918"
inkscape:window-height="1179"
id="namedview6"
showgrid="false"
inkscape:zoom="9.8333333"
inkscape:cx="12.40678"
inkscape:cy="11.79661"
inkscape:window-x="0"
inkscape:window-y="19"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<path
d="M 8.098305,7.8033898 H 3.5245762 C 2.6784365,7.8033898 2,8.4818262 2,9.3279662 V 18.475424 A 1.5245762,1.5245762 0 0 0 3.5245762,20 H 15.721185 a 1.5245762,1.5245762 0 0 0 1.524577,-1.524576 v -7.622882 c 0,-0.846139 -0.686059,-1.5245758 -1.524577,-1.5245758 H 9.6228815 L 8.098305,7.8033898 z"
id="path4"
inkscape:connector-curvature="0"
style="fill:#ffffff" />
<path
id="path3076"
d="m 18.101695,9.4661021 a 0.95762709,0.95762709 0 0 0 0.957627,-0.9576273 c 0,-0.531483 -0.430932,-0.957627 -0.957627,-0.957627 a 0.95762709,0.95762709 0 0 0 -0.957628,0.957627 0.95762709,0.95762709 0 0 0 0.957628,0.9576273 m 2.872881,-4.3093223 a 0.95762709,0.95762709 0 0 1 0.957627,0.957627 V 10.902542 A 0.95762709,0.95762709 0 0 1 20.974576,11.86017 H 15.228813 A 0.95762709,0.95762709 0 0 1 14.271186,10.902542 V 6.1144068 c 0,-0.531483 0.430933,-0.957627 0.957627,-0.957627 h 0.478814 v -0.957627 a 2.3940678,2.3940678 0 0 1 2.394068,-2.3940676 2.3940678,2.3940678 0 0 1 2.394067,2.3940676 v 0.957627 h 0.478814 m -2.872881,-2.394068 a 1.4364407,1.4364407 0 0 0 -1.436441,1.436441 v 0.957627 h 2.872881 v -0.957627 a 1.4364407,1.4364407 0 0 0 -1.43644,-1.436441 z"
inkscape:connector-curvature="0"
style="fill:#ffffff" />
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -0,0 +1,60 @@
<?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="24"
height="24"
viewBox="0 0 24 24"
id="svg2"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="ic_action_encrypt_text.svg">
<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="1918"
inkscape:window-height="1179"
id="namedview6"
showgrid="false"
inkscape:zoom="9.8333333"
inkscape:cx="12.61017"
inkscape:cy="11.79661"
inkscape:window-x="0"
inkscape:window-y="19"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<path
id="path3076"
d="m 18.101695,9.4661021 a 0.95762709,0.95762709 0 0 0 0.957627,-0.9576273 c 0,-0.531483 -0.430932,-0.957627 -0.957627,-0.957627 a 0.95762709,0.95762709 0 0 0 -0.957628,0.957627 0.95762709,0.95762709 0 0 0 0.957628,0.9576273 m 2.872881,-4.3093223 a 0.95762709,0.95762709 0 0 1 0.957627,0.957627 V 10.902542 A 0.95762709,0.95762709 0 0 1 20.974576,11.86017 H 15.228813 A 0.95762709,0.95762709 0 0 1 14.271186,10.902542 V 6.1144068 c 0,-0.531483 0.430933,-0.957627 0.957627,-0.957627 h 0.478814 v -0.957627 a 2.3940678,2.3940678 0 0 1 2.394068,-2.3940676 2.3940678,2.3940678 0 0 1 2.394067,2.3940676 v 0.957627 h 0.478814 m -2.872881,-2.394068 a 1.4364407,1.4364407 0 0 0 -1.436441,1.436441 v 0.957627 h 2.872881 v -0.957627 a 1.4364407,1.4364407 0 0 0 -1.43644,-1.436441 z"
inkscape:connector-curvature="0"
style="fill:#ffffff" />
<path
d="M 7.0423722,23.016949 A 0.72033898,0.72033898 0 0 1 6.3220339,22.29661 V 20.135593 H 3.4406779 A 1.440678,1.440678 0 0 1 1.9999994,18.694915 v -8.644068 c 0,-0.799576 0.6483057,-1.4406776 1.4406785,-1.4406776 H 14.966101 a 1.440678,1.440678 0 0 1 1.440678,1.4406776 v 8.644068 a 1.440678,1.440678 0 0 1 -1.440678,1.440678 h -4.394068 l -2.6652535,2.672458 c -0.144068,0.136864 -0.3241529,0.208898 -0.5042377,0.208898 v 0 H 7.0423722 M 4.1610172,10.771185 v 1.440678 H 14.245762 V 10.771185 H 4.1610172 m 0,2.881357 v 1.440677 H 9.923728 V 13.652542 H 4.1610172 m 0,2.881355 v 1.440678 H 11.364406 V 16.533897 H 4.1610172 z"
id="path4-3"
inkscape:connector-curvature="0"
style="fill:#ffffff" />
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -1,826 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) -->
<svg
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
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:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="48px"
height="48px"
viewBox="0 0 48 48"
enable-background="new 0 0 48 48"
xml:space="preserve"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="ic_action_qr_code.svg"><metadata
id="metadata231"><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="defs229"><linearGradient
id="linearGradient4069"
osb:paint="solid"><stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop4071" /></linearGradient>
<clipPath
id="SVGID_61_"><use
height="1052.3622"
width="744.09448"
y="0"
x="0"
style="overflow:visible"
xlink:href="#SVGID_60_"
overflow="visible"
id="use374" /></clipPath><clipPath
id="clipPath4193"><use
height="1052.3622"
width="744.09448"
y="0"
x="0"
style="overflow:visible"
xlink:href="#SVGID_60_"
overflow="visible"
id="use4195" /></clipPath><clipPath
id="clipPath4197"><use
height="1052.3622"
width="744.09448"
y="0"
x="0"
style="overflow:visible"
xlink:href="#SVGID_60_"
overflow="visible"
id="use4199" /></clipPath><defs
id="defs370"><rect
height="96"
width="96"
y="2723.54"
x="280.80499"
id="SVGID_60_" /></defs><clipPath
id="clipPath4204"><use
id="use4206"
overflow="visible"
xlink:href="#SVGID_60_"
style="overflow:visible"
x="0"
y="0"
width="744.09448"
height="1052.3622" /></clipPath></defs><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2558"
inkscape:window-height="1419"
id="namedview227"
showgrid="false"
inkscape:zoom="33.823274"
inkscape:cx="28.208613"
inkscape:cy="27.105695"
inkscape:window-x="0"
inkscape:window-y="19"
inkscape:window-maximized="1"
inkscape:current-layer="Layer_1" />
<path
id="path376"
d="m 341.16,2774.61 c 0,6.84 -5.543,12.385 -12.379,12.385 -6.84,0 -12.388,-5.545 -12.388,-12.385 0,-6.836 5.548,-12.381 12.388,-12.381 6.836,0 12.379,5.545 12.379,12.381"
clip-path="url(#SVGID_61_)"
inkscape:connector-curvature="0"
style="fill:#333333;opacity:0.6"
transform="matrix(0.42353916,0,0,0.42353916,-118.77231,-1156.4378)" /><path
id="path378"
d="m 362.412,2750.991 h -22.85 v -2.568 -3.051 h -21.309 v 3.051 2.568 c 0,0 -2.291,-0.037 -4.234,0 -1.943,0.032 -4.135,0.76 -4.135,0.76 l -14.708,4.752 c 0,0 0.034,2.062 0,3.537 -0.039,1.473 0,34.598 0,34.598 v 3.08 c 0,0 67.155,-0.01 67.235,0 0.084,0.01 0,-1.379 0,-3.08 v -40.566 -3.081 z m -33.631,41.713 c -9.998,0 -18.097,-8.102 -18.097,-18.092 0,-9.992 8.099,-18.096 18.097,-18.096 9.99,0 18.092,8.104 18.092,18.096 0,9.991 -8.102,18.092 -18.092,18.092"
clip-path="url(#SVGID_61_)"
inkscape:connector-curvature="0"
style="fill:#333333;opacity:0.6"
transform="matrix(0.42353916,0,0,0.42353916,-118.77231,-1156.4378)" /><polygon
id="polygon380"
points="308.727,2747.183 308.727,2748.132 308.727,2749.421 297.969,2753.065 297.969,2748.132 297.969,2747.183 "
clip-path="url(#SVGID_61_)"
style="fill:#333333;opacity:0.6"
transform="matrix(0.42353916,0,0,0.42353916,-118.77231,-1156.4378)" /><rect
style="fill-opacity:1;stroke:none;opacity:1;fill:#f2f2f2"
id="rect3233"
width="21.671467"
height="21.582771"
x="20.961897"
y="21.184147" /><g
id="g3200"><rect
x="23.795828"
y="23.795828"
width="0.94412446"
height="2.8319604"
id="rect25"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="24.739952"
y="23.795828"
width="0.94412446"
height="2.8319604"
id="rect39"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="25.684488"
y="23.795828"
width="0.94371146"
height="2.8319604"
id="rect55"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="23.795828"
y="37.011505"
width="0.94412446"
height="2.8319604"
id="rect33"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="24.739952"
y="37.011505"
width="0.94412446"
height="2.8319604"
id="rect49"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="25.684488"
y="37.011505"
width="0.94371146"
height="2.8319604"
id="rect61"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
width="0.94371146"
height="6.6080451"
id="rect5"
style="opacity:0.6;fill:#333333;fill-opacity:1"
x="21.907991"
y="21.907991" /><rect
x="22.851704"
width="0.94412446"
height="0.94371146"
id="rect13"
style="opacity:0.6;fill:#333333;fill-opacity:1"
y="21.907991" /><rect
x="22.851704"
y="27.571913"
width="0.94412446"
height="0.94412446"
id="rect15"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="23.795828"
width="0.94412446"
height="0.94371146"
id="rect23"
style="opacity:0.6;fill:#333333;fill-opacity:1"
y="21.907991" /><rect
x="23.795828"
y="27.571913"
width="0.94412446"
height="0.94412446"
id="rect27"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="24.739952"
width="0.94412446"
height="0.94371146"
id="rect37"
style="opacity:0.6;fill:#333333;fill-opacity:1"
y="21.907991" /><rect
x="24.739952"
y="27.571913"
width="0.94412446"
height="0.94412446"
id="rect41"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="25.684488"
width="0.94371146"
height="0.94371146"
id="rect53"
style="opacity:0.6;fill:#333333;fill-opacity:1"
y="21.907991" /><rect
x="25.684488"
y="27.571913"
width="0.94371146"
height="0.94412446"
id="rect57"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="26.628201"
width="0.94371146"
height="0.94371146"
id="rect65"
style="opacity:0.6;fill:#333333;fill-opacity:1"
y="21.907991" /><rect
x="26.628201"
y="27.571913"
width="0.94371146"
height="0.94412446"
id="rect67"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="27.571913"
width="0.94412446"
height="6.6080451"
id="rect75"
style="opacity:0.6;fill:#333333;fill-opacity:1"
y="21.907991" /><rect
y="35.124081"
width="0.94371146"
height="6.6080451"
id="rect11"
style="opacity:0.6;fill:#333333;fill-opacity:1"
x="21.907991" /><rect
x="22.851704"
y="35.124081"
width="0.94412446"
height="0.94371146"
id="rect19"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="22.851704"
y="40.788002"
width="0.94412446"
height="0.94412446"
id="rect21"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="23.795828"
y="35.124081"
width="0.94412446"
height="0.94371146"
id="rect31"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="23.795828"
y="40.788002"
width="0.94412446"
height="0.94412446"
id="rect35"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="24.739952"
y="35.124081"
width="0.94412446"
height="0.94371146"
id="rect47"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="24.739952"
y="40.788002"
width="0.94412446"
height="0.94412446"
id="rect51"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="25.684488"
y="35.124081"
width="0.94371146"
height="0.94371146"
id="rect59"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="25.684488"
y="40.788002"
width="0.94371146"
height="0.94412446"
id="rect63"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="26.628201"
y="35.124081"
width="0.94371146"
height="0.94371146"
id="rect71"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="26.628201"
y="40.788002"
width="0.94371146"
height="0.94412446"
id="rect73"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="27.571913"
y="35.124081"
width="0.94412446"
height="6.6080451"
id="rect83"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="37.011505"
y="23.795828"
width="0.9445374"
height="2.8319604"
id="rect163"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="37.956043"
y="23.795828"
width="0.94371146"
height="2.8319604"
id="rect177"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="38.900169"
y="23.795828"
width="0.9445374"
height="2.8319604"
id="rect191"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="35.124081"
width="0.94371146"
height="6.6080451"
id="rect141"
style="opacity:0.6;fill:#333333;fill-opacity:1"
y="21.907991" /><rect
x="36.067795"
width="0.94371146"
height="0.94371146"
id="rect151"
style="opacity:0.6;fill:#333333;fill-opacity:1"
y="21.907991" /><rect
x="36.067795"
y="27.571913"
width="0.94371146"
height="0.94412446"
id="rect153"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="37.011505"
width="0.9445374"
height="0.94371146"
id="rect161"
style="opacity:0.6;fill:#333333;fill-opacity:1"
y="21.907991" /><rect
x="37.011505"
y="27.571913"
width="0.9445374"
height="0.94412446"
id="rect165"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="37.956043"
width="0.94371146"
height="0.94371146"
id="rect175"
style="opacity:0.6;fill:#333333;fill-opacity:1"
y="21.907991" /><rect
x="37.956043"
y="27.571913"
width="0.94371146"
height="0.94412446"
id="rect179"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="38.900169"
width="0.9445374"
height="0.94371146"
id="rect189"
style="opacity:0.6;fill:#333333;fill-opacity:1"
y="21.907991" /><rect
x="38.900169"
y="27.571913"
width="0.9445374"
height="0.94412446"
id="rect193"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="39.844704"
width="0.9432984"
height="0.94371146"
id="rect203"
style="opacity:0.6;fill:#333333;fill-opacity:1"
y="21.907991" /><rect
x="39.844704"
y="27.571913"
width="0.9432984"
height="0.94412446"
id="rect205"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="40.788002"
width="0.94412446"
height="6.6080451"
id="rect217"
style="opacity:0.6;fill:#333333;fill-opacity:1"
y="21.907991" /><rect
y="29.459747"
width="0.94371146"
height="1.8882489"
id="rect7"
style="opacity:0.6;fill:#333333;fill-opacity:1"
x="21.907991" /><rect
x="22.851704"
y="33.235832"
width="0.94412446"
height="0.9445374"
id="rect17"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="23.795828"
y="30.403872"
width="0.94412446"
height="2.8315473"
id="rect29"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="24.739952"
y="30.403872"
width="0.94412446"
height="0.94412446"
id="rect43"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="24.739952"
y="32.292122"
width="0.94412446"
height="1.8882489"
id="rect45"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="26.628201"
y="31.347998"
width="0.94371146"
height="0.94412446"
id="rect69"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="27.571913"
y="29.459747"
width="0.94412446"
height="0.94412446"
id="rect77"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="27.571913"
y="31.347998"
width="0.94412446"
height="0.94412446"
id="rect79"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="27.571913"
y="33.235832"
width="0.94412446"
height="0.9445374"
id="rect81"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="28.516037"
y="30.403872"
width="0.94412446"
height="1.8882489"
id="rect85"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="29.460161"
y="22.851704"
width="0.94412446"
height="2.8319604"
id="rect87"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="29.460161"
y="27.571913"
width="0.94412446"
height="7.5521693"
id="rect89"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="29.460161"
y="40.788002"
width="0.94412446"
height="0.94412446"
id="rect91"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="30.404285"
width="0.94371146"
height="0.94371146"
id="rect93"
style="opacity:0.6;fill:#333333;fill-opacity:1"
y="21.907991" /><rect
x="30.404285"
y="25.684076"
width="0.94371146"
height="0.94412446"
id="rect95"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="30.404285"
y="32.292122"
width="0.94371146"
height="2.8319604"
id="rect97"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="30.404285"
y="36.067795"
width="0.94371146"
height="0.94371146"
id="rect99"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="30.404285"
y="37.956043"
width="0.94371146"
height="3.7760847"
id="rect101"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="31.347998"
y="24.739952"
width="0.94412446"
height="0.94371146"
id="rect103"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="31.347998"
y="29.459747"
width="0.94412446"
height="2.8319604"
id="rect107"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="32.292122"
width="0.94371146"
height="0.94371146"
id="rect113"
style="opacity:0.6;fill:#333333;fill-opacity:1"
y="21.907991" /><rect
x="32.292122"
y="28.516037"
width="0.94371146"
height="0.94371146"
id="rect117"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="32.292122"
y="31.347998"
width="0.94371146"
height="0.94412446"
id="rect119"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="32.292122"
y="34.18037"
width="0.94371146"
height="0.94371146"
id="rect121"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="32.292122"
y="36.067795"
width="0.94371146"
height="0.94371146"
id="rect123"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="32.292122"
y="40.788002"
width="0.94371146"
height="0.94412446"
id="rect125"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="33.235832"
y="22.851704"
width="0.94412446"
height="1.8882489"
id="rect127"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="33.235832"
y="25.684076"
width="0.94412446"
height="5.6643338"
id="rect129"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="33.235832"
y="34.18037"
width="0.94412446"
height="4.7197962"
id="rect131"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="34.179958"
y="33.235832"
width="0.94412446"
height="1.8882489"
id="rect135"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="34.179958"
y="36.067795"
width="0.94412446"
height="0.94371146"
id="rect137"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="34.179958"
y="40.788002"
width="0.94412446"
height="0.94412446"
id="rect139"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="35.124081"
y="31.347998"
width="0.94371146"
height="0.94412446"
id="rect145"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="35.124081"
y="38.900169"
width="0.94371146"
height="0.9445374"
id="rect149"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="36.067795"
y="30.403872"
width="0.94371146"
height="2.8315473"
id="rect155"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="36.067795"
y="36.067795"
width="0.94371146"
height="1.8882489"
id="rect157"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="37.011505"
y="33.235832"
width="0.9445374"
height="0.9445374"
id="rect169"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="37.011505"
y="35.124081"
width="0.9445374"
height="1.8874229"
id="rect171"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="37.011505"
y="37.956043"
width="0.9445374"
height="3.7760847"
id="rect173"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="37.956043"
y="29.459747"
width="0.94371146"
height="0.94412446"
id="rect181"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="37.956043"
y="31.347998"
width="0.94371146"
height="1.8874229"
id="rect183"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="37.956043"
y="36.067795"
width="0.94371146"
height="0.94371146"
id="rect185"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="37.956043"
y="39.844704"
width="0.94371146"
height="0.9432984"
id="rect187"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="38.900169"
y="29.459747"
width="0.9445374"
height="3.7760847"
id="rect195"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="38.900169"
y="34.18037"
width="0.9445374"
height="0.94371146"
id="rect197"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="38.900169"
y="36.067795"
width="0.9445374"
height="0.94371146"
id="rect199"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="38.900169"
y="37.956043"
width="0.9445374"
height="2.8311343"
id="rect201"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="39.844704"
y="29.459747"
width="0.9432984"
height="0.94412446"
id="rect207"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="39.844704"
y="31.347998"
width="0.9432984"
height="2.8319604"
id="rect209"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="39.844704"
y="35.124081"
width="0.9432984"
height="0.94371146"
id="rect211"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="39.844704"
y="40.788002"
width="0.9432984"
height="0.94412446"
id="rect215"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="40.788002"
y="32.292122"
width="0.94412446"
height="0.94371146"
id="rect219"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="40.788002"
y="36.067795"
width="0.94412446"
height="1.8882489"
id="rect223"
style="opacity:0.6;fill:#333333;fill-opacity:1" /><rect
x="40.788002"
y="38.900169"
width="0.94412446"
height="0.9445374"
id="rect225"
style="opacity:0.6;fill:#333333;fill-opacity:1" /></g></svg>

Before

Width:  |  Height:  |  Size: 20 KiB

View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns"
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"
width="100px"
height="100px"
viewBox="0 0 100 100"
version="1.1"
id="svg2"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="ic_action_verified_cutout.svg">
<metadata
id="metadata16">
<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>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1918"
inkscape:window-height="1179"
id="namedview14"
showgrid="false"
inkscape:zoom="2.36"
inkscape:cx="51.694916"
inkscape:cy="50"
inkscape:window-x="0"
inkscape:window-y="19"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<!-- Generator: Sketch 3.0.4 (8053) - http://www.bohemiancoding.com/sketch -->
<title
id="title4">signature-verified-cutout</title>
<desc
id="desc6">Created with Sketch.</desc>
<defs
id="defs8" />
<g
id="Page-1"
sketch:type="MSPage"
transform="matrix(0.83321313,0,0,0.83321313,8.5695807,8.551208)"
style="fill:#ffffff;stroke:none">
<g
id="signature-verified-cutout"
sketch:type="MSArtboardGroup"
transform="translate(0.110156,0)"
style="fill:#ffffff">
<path
d="M 50,97 C 75.957383,97 97,75.957383 97,50 97,24.042617 75.957383,3 50,3 24.042617,3 3,24.042617 3,50 3,75.957383 24.042617,97 50,97 z M 46.273291,77.5085 20,57.830916 27.91844,47.63497 43.309686,59.515226 70.31112,23 80.867825,30.778219 46.273291,77.5085 z"
sketch:type="MSShapeGroup"
id="path12"
inkscape:connector-curvature="0"
style="fill:#ffffff" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -39,7 +39,7 @@ SRC_DIR=./drawables/
# xhdpi: 64x64 # xhdpi: 64x64
# xxhdpi: 96x96 # xxhdpi: 96x96
for NAME in "ic_action_nfc" "ic_action_qr_code" "ic_action_safeslinger" "ic_action_search_cloud" "ic_cloud_search_24px" for NAME in "ic_action_nfc" "ic_action_qr_code" "ic_action_safeslinger" "ic_action_search_cloud" "ic_cloud_search_24px" "ic_action_encrypt_file" "ic_action_encrypt_text" "ic_action_verified_cutout"
do do
echo $NAME echo $NAME
inkscape -w 32 -h 32 -e "$MDPI_DIR/$NAME.png" "$SRC_DIR/$NAME.svg" inkscape -w 32 -h 32 -e "$MDPI_DIR/$NAME.png" "$SRC_DIR/$NAME.svg"

View File

@ -778,13 +778,13 @@ public class KeyListFragment extends LoaderFragment
// Note: order is important! // Note: order is important!
if (isRevoked) { if (isRevoked) {
KeyFormattingUtils.setStatusImage(getActivity(), h.mStatus, null, KeyFormattingUtils.STATE_REVOKED, true); KeyFormattingUtils.setStatusImage(getActivity(), h.mStatus, null, KeyFormattingUtils.STATE_REVOKED, R.color.bg_gray);
h.mStatus.setVisibility(View.VISIBLE); h.mStatus.setVisibility(View.VISIBLE);
h.mSlinger.setVisibility(View.GONE); h.mSlinger.setVisibility(View.GONE);
h.mMainUserId.setTextColor(context.getResources().getColor(R.color.bg_gray)); h.mMainUserId.setTextColor(context.getResources().getColor(R.color.bg_gray));
h.mMainUserIdRest.setTextColor(context.getResources().getColor(R.color.bg_gray)); h.mMainUserIdRest.setTextColor(context.getResources().getColor(R.color.bg_gray));
} else if (isExpired) { } else if (isExpired) {
KeyFormattingUtils.setStatusImage(getActivity(), h.mStatus, null, KeyFormattingUtils.STATE_EXPIRED, true); KeyFormattingUtils.setStatusImage(getActivity(), h.mStatus, null, KeyFormattingUtils.STATE_EXPIRED, R.color.bg_gray);
h.mStatus.setVisibility(View.VISIBLE); h.mStatus.setVisibility(View.VISIBLE);
h.mSlinger.setVisibility(View.GONE); h.mSlinger.setVisibility(View.GONE);
h.mMainUserId.setTextColor(context.getResources().getColor(R.color.bg_gray)); h.mMainUserId.setTextColor(context.getResources().getColor(R.color.bg_gray));

View File

@ -21,6 +21,7 @@ package org.sufficientlysecure.keychain.ui;
import android.annotation.TargetApi; import android.annotation.TargetApi;
import android.content.Intent; import android.content.Intent;
import android.database.Cursor; import android.database.Cursor;
import android.graphics.Bitmap;
import android.net.Uri; import android.net.Uri;
import android.nfc.NdefMessage; import android.nfc.NdefMessage;
import android.nfc.NdefRecord; import android.nfc.NdefRecord;
@ -35,17 +36,20 @@ import android.provider.ContactsContract;
import android.support.v4.app.LoaderManager; import android.support.v4.app.LoaderManager;
import android.support.v4.content.CursorLoader; import android.support.v4.content.CursorLoader;
import android.support.v4.content.Loader; import android.support.v4.content.Loader;
import android.support.v4.view.ViewPager;
import android.support.v7.app.ActionBar; import android.support.v7.app.ActionBar;
import android.support.v7.widget.Toolbar;
import android.view.Gravity;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageButton;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import com.astuetz.PagerSlidingTabStrip; import com.getbase.floatingactionbutton.FloatingActionButton;
import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R; import org.sufficientlysecure.keychain.R;
@ -54,9 +58,9 @@ import org.sufficientlysecure.keychain.pgp.KeyRing;
import org.sufficientlysecure.keychain.provider.KeychainContract; import org.sufficientlysecure.keychain.provider.KeychainContract;
import org.sufficientlysecure.keychain.provider.ProviderHelper; import org.sufficientlysecure.keychain.provider.ProviderHelper;
import org.sufficientlysecure.keychain.service.KeychainIntentServiceHandler; import org.sufficientlysecure.keychain.service.KeychainIntentServiceHandler;
import org.sufficientlysecure.keychain.ui.adapter.PagerTabStripAdapter;
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils; import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
import org.sufficientlysecure.keychain.ui.util.Notify; import org.sufficientlysecure.keychain.ui.util.Notify;
import org.sufficientlysecure.keychain.ui.widget.AspectRatioImageView;
import org.sufficientlysecure.keychain.util.ContactHelper; import org.sufficientlysecure.keychain.util.ContactHelper;
import org.sufficientlysecure.keychain.util.ExportHelper; import org.sufficientlysecure.keychain.util.ExportHelper;
import org.sufficientlysecure.keychain.util.Log; import org.sufficientlysecure.keychain.util.Log;
@ -72,10 +76,16 @@ public class ViewKeyActivity extends BaseActivity implements
protected Uri mDataUri; protected Uri mDataUri;
private LinearLayout mStatusLayout; private TextView mName;
private TextView mStatusText; private TextView mStatusText;
private ImageView mStatusImage; private ImageView mStatusImage;
private View mStatusDivider; private RelativeLayout mBigToolbar;
private ImageButton mActionEncryptFile;
private ImageButton mActionEncryptText;
private ImageButton mActionVerify;
private FloatingActionButton mFab;
private AspectRatioImageView mPhoto;
// NFC // NFC
private NfcAdapter mNfcAdapter; private NfcAdapter mNfcAdapter;
@ -93,19 +103,18 @@ public class ViewKeyActivity extends BaseActivity implements
mExportHelper = new ExportHelper(this); mExportHelper = new ExportHelper(this);
mProviderHelper = new ProviderHelper(this); mProviderHelper = new ProviderHelper(this);
// let the actionbar look like Android's contact app setTitle(null);
ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setIcon(android.R.color.transparent);
actionBar.setHomeButtonEnabled(true);
mStatusLayout = (LinearLayout) findViewById(R.id.view_key_status_layout); mName = (TextView) findViewById(R.id.view_key_name);
mStatusText = (TextView) findViewById(R.id.view_key_status_text); mStatusText = (TextView) findViewById(R.id.view_key_status);
mStatusImage = (ImageView) findViewById(R.id.view_key_status_image); mStatusImage = (ImageView) findViewById(R.id.view_key_status_image);
mStatusDivider = findViewById(R.id.view_key_status_divider); mBigToolbar = (RelativeLayout) findViewById(R.id.toolbar_big);
mActionEncryptFile = (ImageButton) findViewById(R.id.view_key_action_encrypt_files);
Intent intent = getIntent(); mActionEncryptText = (ImageButton) findViewById(R.id.view_key_action_encrypt_text);
mActionVerify = (ImageButton) findViewById(R.id.view_key_action_verify);
mFab = (FloatingActionButton) findViewById(R.id.fab);
mPhoto = (AspectRatioImageView) findViewById(R.id.view_key_photo);
mDataUri = getIntent().getData(); mDataUri = getIntent().getData();
if (mDataUri == null) { if (mDataUri == null) {
@ -329,25 +338,32 @@ public class ViewKeyActivity extends BaseActivity implements
} }
}; };
static final String[] UNIFIED_PROJECTION = new String[]{ // These are the rows that we will retrieve.
static final String[] PROJECTION = new String[]{
KeychainContract.KeyRings._ID, KeychainContract.KeyRings._ID,
KeychainContract.KeyRings.MASTER_KEY_ID, KeychainContract.KeyRings.MASTER_KEY_ID,
KeychainContract.KeyRings.USER_ID, KeychainContract.KeyRings.USER_ID,
KeychainContract.KeyRings.IS_REVOKED, KeychainContract.KeyRings.IS_REVOKED,
KeychainContract.KeyRings.EXPIRY, KeychainContract.KeyRings.EXPIRY,
KeychainContract.KeyRings.VERIFIED,
KeychainContract.KeyRings.HAS_ANY_SECRET,
KeychainContract.KeyRings.FINGERPRINT
}; };
static final int INDEX_UNIFIED_MASTER_KEY_ID = 1;
static final int INDEX_UNIFIED_USER_ID = 2; static final int INDEX_MASTER_KEY_ID = 1;
static final int INDEX_UNIFIED_IS_REVOKED = 3; static final int INDEX_USER_ID = 2;
static final int INDEX_UNIFIED_EXPIRY = 4; static final int INDEX_IS_REVOKED = 3;
static final int INDEX_EXPIRY = 4;
static final int INDEX_VERIFIED = 5;
static final int INDEX_HAS_ANY_SECRET = 6;
static final int INDEX_FINGERPRINT = 7;
@Override @Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) { public Loader<Cursor> onCreateLoader(int id, Bundle args) {
switch (id) { switch (id) {
case LOADER_ID_UNIFIED: { case LOADER_ID_UNIFIED: {
Uri baseUri = KeychainContract.KeyRings.buildUnifiedKeyRingUri(mDataUri); Uri baseUri = KeychainContract.KeyRings.buildUnifiedKeyRingUri(mDataUri);
return new CursorLoader(this, baseUri, UNIFIED_PROJECTION, null, null, null); return new CursorLoader(this, baseUri, PROJECTION, null, null, null);
} }
default: default:
@ -370,36 +386,91 @@ public class ViewKeyActivity extends BaseActivity implements
case LOADER_ID_UNIFIED: { case LOADER_ID_UNIFIED: {
if (data.moveToFirst()) { if (data.moveToFirst()) {
// get name, email, and comment from USER_ID // get name, email, and comment from USER_ID
String[] mainUserId = KeyRing.splitUserId(data.getString(INDEX_UNIFIED_USER_ID)); String[] mainUserId = KeyRing.splitUserId(data.getString(INDEX_USER_ID));
if (mainUserId[0] != null) { if (mainUserId[0] != null) {
setTitle(mainUserId[0]); mName.setText(mainUserId[0]);
} else { } else {
setTitle(R.string.user_id_no_name); mName.setText(R.string.user_id_no_name);
} }
// get key id from MASTER_KEY_ID String fingerprint = KeyFormattingUtils.convertFingerprintToHex(data.getBlob(INDEX_FINGERPRINT));
long masterKeyId = data.getLong(INDEX_UNIFIED_MASTER_KEY_ID);
getSupportActionBar().setSubtitle(KeyFormattingUtils.beautifyKeyIdWithPrefix(this, masterKeyId));
boolean isRevoked = data.getInt(INDEX_UNIFIED_IS_REVOKED) > 0; boolean isSecret = data.getInt(INDEX_HAS_ANY_SECRET) != 0;
boolean isExpired = !data.isNull(INDEX_UNIFIED_EXPIRY) boolean isRevoked = data.getInt(INDEX_IS_REVOKED) > 0;
&& new Date(data.getLong(INDEX_UNIFIED_EXPIRY) * 1000).before(new Date()); boolean isExpired = !data.isNull(INDEX_EXPIRY)
&& new Date(data.getLong(INDEX_EXPIRY) * 1000).before(new Date());
boolean isVerified = data.getInt(INDEX_VERIFIED) > 0;
// Note: order is important // Note: order is important
int color;
if (isRevoked) { if (isRevoked) {
mStatusText.setText(R.string.view_key_revoked); mStatusText.setText(R.string.view_key_revoked);
KeyFormattingUtils.setStatusImage(this, mStatusImage, mStatusText, KeyFormattingUtils.STATE_REVOKED); mStatusImage.setVisibility(View.VISIBLE);
mStatusDivider.setVisibility(View.VISIBLE); KeyFormattingUtils.setStatusImage(this, mStatusImage, mStatusText, KeyFormattingUtils.STATE_REVOKED, R.color.icons);
mStatusLayout.setVisibility(View.VISIBLE); color = getResources().getColor(R.color.android_red_light);
mActionEncryptFile.setVisibility(View.INVISIBLE);
mActionEncryptText.setVisibility(View.INVISIBLE);
mActionVerify.setVisibility(View.INVISIBLE);
mFab.setVisibility(View.INVISIBLE);
} else if (isExpired) { } else if (isExpired) {
mStatusText.setText(R.string.view_key_expired); mStatusText.setText(R.string.view_key_expired);
KeyFormattingUtils.setStatusImage(this, mStatusImage, mStatusText, KeyFormattingUtils.STATE_EXPIRED); mStatusImage.setVisibility(View.VISIBLE);
mStatusDivider.setVisibility(View.VISIBLE); KeyFormattingUtils.setStatusImage(this, mStatusImage, mStatusText, KeyFormattingUtils.STATE_EXPIRED, R.color.icons);
mStatusLayout.setVisibility(View.VISIBLE); color = getResources().getColor(R.color.android_red_light);
mActionEncryptFile.setVisibility(View.INVISIBLE);
mActionEncryptText.setVisibility(View.INVISIBLE);
mActionVerify.setVisibility(View.INVISIBLE);
mFab.setVisibility(View.INVISIBLE);
} else if (isSecret) {
mStatusText.setText(R.string.view_key_my_key);
mStatusImage.setVisibility(View.INVISIBLE);
color = getResources().getColor(R.color.primary);
mActionEncryptFile.setVisibility(View.VISIBLE);
mActionEncryptText.setVisibility(View.VISIBLE);
mActionVerify.setVisibility(View.INVISIBLE);
mFab.setVisibility(View.INVISIBLE); // TODO
} else { } else {
mStatusDivider.setVisibility(View.GONE); mActionEncryptFile.setVisibility(View.VISIBLE);
mStatusLayout.setVisibility(View.GONE); mActionEncryptText.setVisibility(View.VISIBLE);
if (isVerified) {
mStatusText.setText(R.string.view_key_verified);
mStatusImage.setVisibility(View.VISIBLE);
KeyFormattingUtils.setStatusImage(this, mStatusImage, mStatusText, KeyFormattingUtils.STATE_VERIFIED, R.color.icons);
color = getResources().getColor(R.color.primary);
AsyncTask<String, Void, Bitmap> photoTask =
new AsyncTask<String, Void, Bitmap>() {
protected Bitmap doInBackground(String... fingerprint) {
return ContactHelper.photoFromFingerprint(getContentResolver(), fingerprint[0]);
}
protected void onPostExecute(Bitmap photo) {
mPhoto.setImageBitmap(photo);
mPhoto.setVisibility(View.VISIBLE);
}
};
photoTask.execute(fingerprint);
mActionVerify.setVisibility(View.INVISIBLE);
mFab.setVisibility(View.INVISIBLE);
} else {
mStatusText.setText(R.string.view_key_unverified);
mStatusImage.setVisibility(View.VISIBLE);
KeyFormattingUtils.setStatusImage(this, mStatusImage, mStatusText, KeyFormattingUtils.STATE_UNVERIFIED, R.color.icons);
color = getResources().getColor(R.color.android_orange_light);
mActionVerify.setVisibility(View.VISIBLE);
mFab.setVisibility(View.VISIBLE);
}
} }
mToolbar.setBackgroundColor(color);
mStatusBar.setBackgroundColor(color);
mBigToolbar.setBackgroundColor(color);
break; break;
} }

View File

@ -175,9 +175,9 @@ public class ImportKeysAdapter extends ArrayAdapter<ImportKeysListEntry> {
} }
if (entry.isRevoked()) { if (entry.isRevoked()) {
KeyFormattingUtils.setStatusImage(getContext(), holder.status, null, KeyFormattingUtils.STATE_REVOKED, true); KeyFormattingUtils.setStatusImage(getContext(), holder.status, null, KeyFormattingUtils.STATE_REVOKED, R.color.bg_gray);
} else if (entry.isExpired()) { } else if (entry.isExpired()) {
KeyFormattingUtils.setStatusImage(getContext(), holder.status, null, KeyFormattingUtils.STATE_EXPIRED, true); KeyFormattingUtils.setStatusImage(getContext(), holder.status, null, KeyFormattingUtils.STATE_EXPIRED, R.color.bg_gray);
} }
if (entry.isRevoked() || entry.isExpired()) { if (entry.isRevoked() || entry.isExpired()) {

View File

@ -133,11 +133,11 @@ abstract public class SelectKeyCursorAdapter extends CursorAdapter {
boolean enabled; boolean enabled;
if (cursor.getInt(mIndexIsRevoked) != 0) { if (cursor.getInt(mIndexIsRevoked) != 0) {
h.statusIcon.setVisibility(View.VISIBLE); h.statusIcon.setVisibility(View.VISIBLE);
KeyFormattingUtils.setStatusImage(mContext, h.statusIcon, null, KeyFormattingUtils.STATE_REVOKED, true); KeyFormattingUtils.setStatusImage(mContext, h.statusIcon, null, KeyFormattingUtils.STATE_REVOKED, R.color.bg_gray);
enabled = false; enabled = false;
} else if (cursor.getInt(mIndexIsExpiry) != 0) { } else if (cursor.getInt(mIndexIsExpiry) != 0) {
h.statusIcon.setVisibility(View.VISIBLE); h.statusIcon.setVisibility(View.VISIBLE);
KeyFormattingUtils.setStatusImage(mContext, h.statusIcon, null, KeyFormattingUtils.STATE_EXPIRED, true); KeyFormattingUtils.setStatusImage(mContext, h.statusIcon, null, KeyFormattingUtils.STATE_EXPIRED, R.color.bg_gray);
enabled = false; enabled = false;
} else { } else {
h.statusIcon.setVisibility(View.GONE); h.statusIcon.setVisibility(View.GONE);

View File

@ -162,7 +162,7 @@ public class UserIdsAdapter extends CursorAdapter implements AdapterView.OnItemC
if (isRevoked) { if (isRevoked) {
// set revocation icon (can this even be primary?) // set revocation icon (can this even be primary?)
KeyFormattingUtils.setStatusImage(mContext, vVerified, null, KeyFormattingUtils.STATE_REVOKED, true); KeyFormattingUtils.setStatusImage(mContext, vVerified, null, KeyFormattingUtils.STATE_REVOKED, R.color.bg_gray);
// disable revoked user ids // disable revoked user ids
vName.setEnabled(false); vName.setEnabled(false);
@ -184,13 +184,13 @@ public class UserIdsAdapter extends CursorAdapter implements AdapterView.OnItemC
int isVerified = cursor.getInt(INDEX_VERIFIED); int isVerified = cursor.getInt(INDEX_VERIFIED);
switch (isVerified) { switch (isVerified) {
case Certs.VERIFIED_SECRET: case Certs.VERIFIED_SECRET:
KeyFormattingUtils.setStatusImage(mContext, vVerified, null, KeyFormattingUtils.STATE_VERIFIED, false); KeyFormattingUtils.setStatusImage(mContext, vVerified, null, KeyFormattingUtils.STATE_VERIFIED, KeyFormattingUtils.DEFAULT_COLOR);
break; break;
case Certs.VERIFIED_SELF: case Certs.VERIFIED_SELF:
KeyFormattingUtils.setStatusImage(mContext, vVerified, null, KeyFormattingUtils.STATE_UNVERIFIED, false); KeyFormattingUtils.setStatusImage(mContext, vVerified, null, KeyFormattingUtils.STATE_UNVERIFIED, KeyFormattingUtils.DEFAULT_COLOR);
break; break;
default: default:
KeyFormattingUtils.setStatusImage(mContext, vVerified, null, KeyFormattingUtils.STATE_INVALID, false); KeyFormattingUtils.setStatusImage(mContext, vVerified, null, KeyFormattingUtils.STATE_INVALID, KeyFormattingUtils.DEFAULT_COLOR);
break; break;
} }
} }

View File

@ -377,6 +377,8 @@ public class KeyFormattingUtils {
((int) digest[2] + 256) % 256}; ((int) digest[2] + 256) % 256};
} }
public static final int DEFAULT_COLOR = -1;
public static final int STATE_REVOKED = 1; public static final int STATE_REVOKED = 1;
public static final int STATE_EXPIRED = 2; public static final int STATE_EXPIRED = 2;
public static final int STATE_VERIFIED = 3; public static final int STATE_VERIFIED = 3;
@ -393,20 +395,22 @@ public class KeyFormattingUtils {
} }
public static void setStatusImage(Context context, ImageView statusIcon, TextView statusText, int state) { public static void setStatusImage(Context context, ImageView statusIcon, TextView statusText, int state) {
setStatusImage(context, statusIcon, statusText, state, false); setStatusImage(context, statusIcon, statusText, state, KeyFormattingUtils.DEFAULT_COLOR);
} }
/** /**
* Sets status image based on constant * Sets status image based on constant
*/ */
public static void setStatusImage(Context context, ImageView statusIcon, TextView statusText, public static void setStatusImage(Context context, ImageView statusIcon, TextView statusText,
int state, boolean unobtrusive) { int state, int color) {
switch (state) { switch (state) {
/** GREEN: everything is good **/ /** GREEN: everything is good **/
case STATE_VERIFIED: { case STATE_VERIFIED: {
statusIcon.setImageDrawable( statusIcon.setImageDrawable(
context.getResources().getDrawable(R.drawable.status_signature_verified_cutout)); context.getResources().getDrawable(R.drawable.status_signature_verified_cutout));
int color = R.color.android_green_light; if (color == KeyFormattingUtils.DEFAULT_COLOR) {
color = R.color.android_green_light;
}
statusIcon.setColorFilter(context.getResources().getColor(color), statusIcon.setColorFilter(context.getResources().getColor(color),
PorterDuff.Mode.SRC_IN); PorterDuff.Mode.SRC_IN);
if (statusText != null) { if (statusText != null) {
@ -417,7 +421,9 @@ public class KeyFormattingUtils {
case STATE_ENCRYPTED: { case STATE_ENCRYPTED: {
statusIcon.setImageDrawable( statusIcon.setImageDrawable(
context.getResources().getDrawable(R.drawable.status_lock_closed)); context.getResources().getDrawable(R.drawable.status_lock_closed));
int color = R.color.android_green_light; if (color == KeyFormattingUtils.DEFAULT_COLOR) {
color = R.color.android_green_light;
}
statusIcon.setColorFilter(context.getResources().getColor(color), statusIcon.setColorFilter(context.getResources().getColor(color),
PorterDuff.Mode.SRC_IN); PorterDuff.Mode.SRC_IN);
if (statusText != null) { if (statusText != null) {
@ -429,7 +435,9 @@ public class KeyFormattingUtils {
case STATE_UNVERIFIED: { case STATE_UNVERIFIED: {
statusIcon.setImageDrawable( statusIcon.setImageDrawable(
context.getResources().getDrawable(R.drawable.status_signature_unverified_cutout)); context.getResources().getDrawable(R.drawable.status_signature_unverified_cutout));
int color = R.color.android_orange_light; if (color == KeyFormattingUtils.DEFAULT_COLOR) {
color = R.color.android_orange_light;
}
statusIcon.setColorFilter(context.getResources().getColor(color), statusIcon.setColorFilter(context.getResources().getColor(color),
PorterDuff.Mode.SRC_IN); PorterDuff.Mode.SRC_IN);
if (statusText != null) { if (statusText != null) {
@ -440,7 +448,9 @@ public class KeyFormattingUtils {
case STATE_UNKNOWN_KEY: { case STATE_UNKNOWN_KEY: {
statusIcon.setImageDrawable( statusIcon.setImageDrawable(
context.getResources().getDrawable(R.drawable.status_signature_unknown_cutout)); context.getResources().getDrawable(R.drawable.status_signature_unknown_cutout));
int color = R.color.android_orange_light; if (color == KeyFormattingUtils.DEFAULT_COLOR) {
color = R.color.android_orange_light;
}
statusIcon.setColorFilter(context.getResources().getColor(color), statusIcon.setColorFilter(context.getResources().getColor(color),
PorterDuff.Mode.SRC_IN); PorterDuff.Mode.SRC_IN);
if (statusText != null) { if (statusText != null) {
@ -452,9 +462,8 @@ public class KeyFormattingUtils {
case STATE_REVOKED: { case STATE_REVOKED: {
statusIcon.setImageDrawable( statusIcon.setImageDrawable(
context.getResources().getDrawable(R.drawable.status_signature_revoked_cutout)); context.getResources().getDrawable(R.drawable.status_signature_revoked_cutout));
int color = R.color.android_red_light; if (color == KeyFormattingUtils.DEFAULT_COLOR) {
if (unobtrusive) { color = R.color.android_red_light;
color = R.color.bg_gray;
} }
statusIcon.setColorFilter(context.getResources().getColor(color), statusIcon.setColorFilter(context.getResources().getColor(color),
PorterDuff.Mode.SRC_IN); PorterDuff.Mode.SRC_IN);
@ -466,9 +475,8 @@ public class KeyFormattingUtils {
case STATE_EXPIRED: { case STATE_EXPIRED: {
statusIcon.setImageDrawable( statusIcon.setImageDrawable(
context.getResources().getDrawable(R.drawable.status_signature_expired_cutout)); context.getResources().getDrawable(R.drawable.status_signature_expired_cutout));
int color = R.color.android_red_light; if (color == KeyFormattingUtils.DEFAULT_COLOR) {
if (unobtrusive) { color = R.color.android_red_light;
color = R.color.bg_gray;
} }
statusIcon.setColorFilter(context.getResources().getColor(color), statusIcon.setColorFilter(context.getResources().getColor(color),
PorterDuff.Mode.SRC_IN); PorterDuff.Mode.SRC_IN);
@ -480,7 +488,9 @@ public class KeyFormattingUtils {
case STATE_NOT_ENCRYPTED: { case STATE_NOT_ENCRYPTED: {
statusIcon.setImageDrawable( statusIcon.setImageDrawable(
context.getResources().getDrawable(R.drawable.status_lock_open)); context.getResources().getDrawable(R.drawable.status_lock_open));
int color = R.color.android_red_light; if (color == KeyFormattingUtils.DEFAULT_COLOR) {
color = R.color.android_red_light;
}
statusIcon.setColorFilter(context.getResources().getColor(color), statusIcon.setColorFilter(context.getResources().getColor(color),
PorterDuff.Mode.SRC_IN); PorterDuff.Mode.SRC_IN);
if (statusText != null) { if (statusText != null) {
@ -491,7 +501,9 @@ public class KeyFormattingUtils {
case STATE_NOT_SIGNED: { case STATE_NOT_SIGNED: {
statusIcon.setImageDrawable( statusIcon.setImageDrawable(
context.getResources().getDrawable(R.drawable.status_signature_unknown_cutout)); context.getResources().getDrawable(R.drawable.status_signature_unknown_cutout));
int color = R.color.android_red_light; if (color == KeyFormattingUtils.DEFAULT_COLOR) {
color = R.color.android_red_light;
}
statusIcon.setColorFilter(context.getResources().getColor(color), statusIcon.setColorFilter(context.getResources().getColor(color),
PorterDuff.Mode.SRC_IN); PorterDuff.Mode.SRC_IN);
if (statusText != null) { if (statusText != null) {
@ -502,7 +514,9 @@ public class KeyFormattingUtils {
case STATE_INVALID: { case STATE_INVALID: {
statusIcon.setImageDrawable( statusIcon.setImageDrawable(
context.getResources().getDrawable(R.drawable.status_signature_invalid_cutout)); context.getResources().getDrawable(R.drawable.status_signature_invalid_cutout));
int color = R.color.android_red_light; if (color == KeyFormattingUtils.DEFAULT_COLOR) {
color = R.color.android_red_light;
}
statusIcon.setColorFilter(context.getResources().getColor(color), statusIcon.setColorFilter(context.getResources().getColor(color),
PorterDuff.Mode.SRC_IN); PorterDuff.Mode.SRC_IN);
if (statusText != null) { if (statusText != null) {
@ -514,7 +528,9 @@ public class KeyFormattingUtils {
case STATE_UNAVAILABLE: { case STATE_UNAVAILABLE: {
statusIcon.setImageDrawable( statusIcon.setImageDrawable(
context.getResources().getDrawable(R.drawable.status_signature_invalid_cutout)); context.getResources().getDrawable(R.drawable.status_signature_invalid_cutout));
int color = R.color.bg_gray; if (color == KeyFormattingUtils.DEFAULT_COLOR) {
color = R.color.bg_gray;
}
statusIcon.setColorFilter(context.getResources().getColor(color), statusIcon.setColorFilter(context.getResources().getColor(color),
PorterDuff.Mode.SRC_IN); PorterDuff.Mode.SRC_IN);
if (statusText != null) { if (statusText != null) {

View File

@ -0,0 +1,138 @@
/*
* Copyright (C) 2015 Dominik Schürmann <dominik@dominikschuermann.de>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) 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 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/>.
*/
package org.sufficientlysecure.keychain.ui.widget;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.widget.ImageView;
import org.sufficientlysecure.keychain.R;
/**
* Maintains an aspect ratio based on either width or height. Disabled by default.
*
* from https://gist.github.com/JakeWharton/2856179
*/
public class AspectRatioImageView extends ImageView {
// NOTE: These must be kept in sync with the AspectRatioImageView attributes in attrs.xml.
public static final int MEASUREMENT_WIDTH = 0;
public static final int MEASUREMENT_HEIGHT = 1;
private static final float DEFAULT_ASPECT_RATIO = 1f;
private static final boolean DEFAULT_ASPECT_RATIO_ENABLED = false;
private static final int DEFAULT_DOMINANT_MEASUREMENT = MEASUREMENT_WIDTH;
private float aspectRatio;
private boolean aspectRatioEnabled;
private int dominantMeasurement;
public AspectRatioImageView(Context context) {
this(context, null);
}
public AspectRatioImageView(Context context, AttributeSet attrs) {
super(context, attrs);
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.AspectRatioImageView);
aspectRatio = a.getFloat(R.styleable.AspectRatioImageView_aspectRatio, DEFAULT_ASPECT_RATIO);
aspectRatioEnabled = a.getBoolean(R.styleable.AspectRatioImageView_aspectRatioEnabled,
DEFAULT_ASPECT_RATIO_ENABLED);
dominantMeasurement = a.getInt(R.styleable.AspectRatioImageView_dominantMeasurement,
DEFAULT_DOMINANT_MEASUREMENT);
a.recycle();
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
if (!aspectRatioEnabled) return;
int newWidth;
int newHeight;
switch (dominantMeasurement) {
case MEASUREMENT_WIDTH:
newWidth = getMeasuredWidth();
newHeight = (int) (newWidth * aspectRatio);
break;
case MEASUREMENT_HEIGHT:
newHeight = getMeasuredHeight();
newWidth = (int) (newHeight * aspectRatio);
break;
default:
throw new IllegalStateException("Unknown measurement with ID " + dominantMeasurement);
}
setMeasuredDimension(newWidth, newHeight);
}
/**
* Get the aspect ratio for this image view.
*/
public float getAspectRatio() {
return aspectRatio;
}
/**
* Set the aspect ratio for this image view. This will update the view instantly.
*/
public void setAspectRatio(float aspectRatio) {
this.aspectRatio = aspectRatio;
if (aspectRatioEnabled) {
requestLayout();
}
}
/**
* Get whether or not forcing the aspect ratio is enabled.
*/
public boolean getAspectRatioEnabled() {
return aspectRatioEnabled;
}
/**
* set whether or not forcing the aspect ratio is enabled. This will re-layout the view.
*/
public void setAspectRatioEnabled(boolean aspectRatioEnabled) {
this.aspectRatioEnabled = aspectRatioEnabled;
requestLayout();
}
/**
* Get the dominant measurement for the aspect ratio.
*/
public int getDominantMeasurement() {
return dominantMeasurement;
}
/**
* Set the dominant measurement for the aspect ratio.
*
* @see #MEASUREMENT_WIDTH
* @see #MEASUREMENT_HEIGHT
*/
public void setDominantMeasurement(int dominantMeasurement) {
if (dominantMeasurement != MEASUREMENT_HEIGHT && dominantMeasurement != MEASUREMENT_WIDTH) {
throw new IllegalArgumentException("Invalid measurement type.");
}
this.dominantMeasurement = dominantMeasurement;
requestLayout();
}
}

View File

@ -27,6 +27,7 @@ import android.util.AttributeSet;
import android.widget.ImageView; import android.widget.ImageView;
import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.provider.KeychainContract; import org.sufficientlysecure.keychain.provider.KeychainContract;
import org.sufficientlysecure.keychain.provider.KeychainDatabase; import org.sufficientlysecure.keychain.provider.KeychainDatabase;
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils; import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
@ -101,16 +102,16 @@ public class CertifyKeySpinner extends KeySpinner {
@Override @Override
boolean setStatus(Context context, Cursor cursor, ImageView statusView) { boolean setStatus(Context context, Cursor cursor, ImageView statusView) {
if (cursor.getInt(mIndexIsRevoked) != 0) { if (cursor.getInt(mIndexIsRevoked) != 0) {
KeyFormattingUtils.setStatusImage(getContext(), statusView, null, KeyFormattingUtils.STATE_REVOKED, true); KeyFormattingUtils.setStatusImage(getContext(), statusView, null, KeyFormattingUtils.STATE_REVOKED, R.color.bg_gray);
return false; return false;
} }
if (cursor.getInt(mIndexIsExpired) != 0) { if (cursor.getInt(mIndexIsExpired) != 0) {
KeyFormattingUtils.setStatusImage(getContext(), statusView, null, KeyFormattingUtils.STATE_EXPIRED, true); KeyFormattingUtils.setStatusImage(getContext(), statusView, null, KeyFormattingUtils.STATE_EXPIRED, R.color.bg_gray);
return false; return false;
} }
// don't invalidate the "None" entry, which is also null! // don't invalidate the "None" entry, which is also null!
if (cursor.getPosition() != 0 && cursor.isNull(mIndexHasCertify)) { if (cursor.getPosition() != 0 && cursor.isNull(mIndexHasCertify)) {
KeyFormattingUtils.setStatusImage(getContext(), statusView, null, KeyFormattingUtils.STATE_UNAVAILABLE, true); KeyFormattingUtils.setStatusImage(getContext(), statusView, null, KeyFormattingUtils.STATE_UNAVAILABLE, R.color.bg_gray);
return false; return false;
} }

View File

@ -26,6 +26,7 @@ import android.support.v4.content.Loader;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.widget.ImageView; import android.widget.ImageView;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.provider.KeychainContract; import org.sufficientlysecure.keychain.provider.KeychainContract;
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils; import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
@ -83,15 +84,15 @@ public class SignKeySpinner extends KeySpinner {
@Override @Override
boolean setStatus(Context context, Cursor cursor, ImageView statusView) { boolean setStatus(Context context, Cursor cursor, ImageView statusView) {
if (cursor.getInt(mIndexIsRevoked) != 0) { if (cursor.getInt(mIndexIsRevoked) != 0) {
KeyFormattingUtils.setStatusImage(getContext(), statusView, null, KeyFormattingUtils.STATE_REVOKED, true); KeyFormattingUtils.setStatusImage(getContext(), statusView, null, KeyFormattingUtils.STATE_REVOKED, R.color.bg_gray);
return false; return false;
} }
if (cursor.getInt(mIndexIsExpired) != 0) { if (cursor.getInt(mIndexIsExpired) != 0) {
KeyFormattingUtils.setStatusImage(getContext(), statusView, null, KeyFormattingUtils.STATE_EXPIRED, true); KeyFormattingUtils.setStatusImage(getContext(), statusView, null, KeyFormattingUtils.STATE_EXPIRED, R.color.bg_gray);
return false; return false;
} }
if (cursor.getInt(mIndexHasSign) == 0) { if (cursor.getInt(mIndexHasSign) == 0) {
KeyFormattingUtils.setStatusImage(getContext(), statusView, null, KeyFormattingUtils.STATE_UNAVAILABLE, true); KeyFormattingUtils.setStatusImage(getContext(), statusView, null, KeyFormattingUtils.STATE_UNAVAILABLE, R.color.bg_gray);
return false; return false;
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 623 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 751 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 836 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 976 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 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: 2.1 KiB

View File

@ -9,11 +9,22 @@
<RelativeLayout <RelativeLayout
android:id="@+id/toolbar_big" android:id="@+id/toolbar_big"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/big_toolbar" android:layout_height="@dimen/huge_toolbar"
android:elevation="4dp" android:elevation="4dp"
android:background="?attr/colorPrimary" android:background="?attr/colorPrimary"
android:orientation="horizontal"> android:orientation="horizontal">
<org.sufficientlysecure.keychain.ui.widget.AspectRatioImageView
android:id="@+id/view_key_photo"
app:aspectRatioEnabled="true"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/status_bar"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:src="@drawable/first_time_1" />
<ImageView <ImageView
android:id="@+id/status_bar" android:id="@+id/status_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -26,7 +37,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize" android:minHeight="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:overScrollMode="always" android:overScrollMode="always"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
@ -35,46 +45,84 @@
android:touchscreenBlocksFocus="false" /> android:touchscreenBlocksFocus="false" />
<LinearLayout <LinearLayout
android:layout_below="@+id/toolbar" android:id="@+id/name_layout"
android:layout_marginLeft="48dp" android:orientation="horizontal"
android:layout_marginRight="72dp" android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:layout_above="@+id/toolbar2"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<LinearLayout <ImageView
android:id="@+id/view_key_status_layout" android:id="@+id/view_key_status_image"
android:layout_width="wrap_content" android:layout_width="24dp"
android:visibility="invisible"
android:src="@drawable/status_signature_unverified_cutout"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center_vertical"
android:layout_marginTop="8dp" android:layout_marginLeft="2dp" />
android:layout_marginBottom="8dp"
android:orientation="horizontal">
<ImageView <LinearLayout
android:id="@+id/view_key_status_image" android:orientation="vertical"
android:layout_width="wrap_content" android:layout_marginLeft="8dp"
android:layout_height="wrap_content" /> android:layout_marginStart="8dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView <TextView
android:id="@+id/view_key_status_text" android:id="@+id/view_key_name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium" android:text=""
android:layout_gravity="center_vertical" android:textColor="@color/icons"
android:layout_marginLeft="8dp" /> android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/view_key_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textColor="@color/tab_text"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout> </LinearLayout>
<TextView
android:id="@+id/api_app_settings_app_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Name (set in-code)longlong"
android:textColor="@color/icons"
android:textAppearance="?android:attr/textAppearanceMedium"
android:paddingLeft="8dp"
android:layout_gravity="center_vertical" />
</LinearLayout> </LinearLayout>
<LinearLayout
android:id="@+id/toolbar2"
android:orientation="horizontal"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:minHeight="?attr/actionBarSize"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginLeft="32dp">
<ImageButton
android:id="@+id/view_key_action_encrypt_files"
android:layout_width="64dp"
android:layout_height="64dp"
style="?android:attr/borderlessButtonStyle"
android:src="@drawable/ic_action_encrypt_file" />
<ImageButton
android:id="@+id/view_key_action_encrypt_text"
android:layout_width="64dp"
android:layout_height="64dp"
style="?android:attr/borderlessButtonStyle"
android:src="@drawable/ic_action_encrypt_text" />
<ImageButton
android:id="@+id/view_key_action_verify"
android:layout_width="64dp"
android:layout_height="64dp"
android:visibility="invisible"
style="?android:attr/borderlessButtonStyle"
android:src="@drawable/ic_action_verified_cutout" />
</LinearLayout>
</RelativeLayout> </RelativeLayout>
<LinearLayout <LinearLayout

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/menu_key_view_refresh"
android:icon="@drawable/ic_refresh_white_24dp"
app:showAsAction="always"
android:title="@string/key_view_action_update" />
</menu>

View File

@ -7,4 +7,5 @@
<dimen name="statusbar_height">24dp</dimen> <dimen name="statusbar_height">24dp</dimen>
<!-- 120dp + statusbar_height --> <!-- 120dp + statusbar_height -->
<dimen name="big_toolbar">141dp</dimen> <dimen name="big_toolbar">141dp</dimen>
<dimen name="huge_toolbar">233dp</dimen>
</resources> </resources>

View File

@ -6,4 +6,13 @@
<attr name="unFoldedLabel" format="string" /> <attr name="unFoldedLabel" format="string" />
</declare-styleable> </declare-styleable>
<declare-styleable name="AspectRatioImageView">
<attr name="aspectRatio" format="float" />
<attr name="aspectRatioEnabled" format="boolean" />
<attr name="dominantMeasurement">
<enum name="width" value="0" />
<enum name="height" value="1" />
</attr>
</declare-styleable>
</resources> </resources>

View File

@ -3,4 +3,5 @@
<!-- on Android < 5, we do not color the status bar, thus 0dp! --> <!-- on Android < 5, we do not color the status bar, thus 0dp! -->
<dimen name="statusbar_height">0dp</dimen> <dimen name="statusbar_height">0dp</dimen>
<dimen name="big_toolbar">120dp</dimen> <dimen name="big_toolbar">120dp</dimen>
<dimen name="huge_toolbar">212dp</dimen>
</resources> </resources>

View File

@ -582,8 +582,11 @@
<string name="create_key_edit">"Change key configuration"</string> <string name="create_key_edit">"Change key configuration"</string>
<!-- View key --> <!-- View key -->
<string name="view_key_revoked">"This key has been revoked!"</string> <string name="view_key_revoked">"Revoked: Key must not be used anymore!"</string>
<string name="view_key_expired">"This key is expired!"</string> <string name="view_key_expired">"Expired: The contact needs to extend the keys validity!"</string>
<string name="view_key_my_key">"My Key"</string>
<string name="view_key_verified">"Verified Key"</string>
<string name="view_key_unverified">"Unverified: Scan QR Code to verify key!"</string>
<!-- Navigation Drawer --> <!-- Navigation Drawer -->
<string name="nav_keys">"Keys"</string> <string name="nav_keys">"Keys"</string>