Support dynamic icon

This commit is contained in:
Matt Low 2020-01-15 23:19:19 +04:00
parent 0e906479d1
commit e4e0d0c1b0
4 changed files with 101 additions and 33 deletions

View File

@ -4,37 +4,18 @@
android:viewportWidth="108" android:viewportWidth="108"
android:viewportHeight="108"> android:viewportHeight="108">
<path <path
android:pathData="M22,48.667l2.987,0l0,10.667l-2.987,0z" android:pathData="M72.76,69.051A24,24 0,0 1,46.166 76.177,24 24,0 0,1 30.375,53.624 24,24 0,0 1,46.166 31.072,24 24,0 0,1 72.76,38.197L54.375,53.624Z"
android:fillColor="#000000" android:strokeAlpha="1"
android:strokeColor="#00000000" android:strokeWidth="0.74999523"
android:fillColor="#ffff00"
android:strokeColor="#ffff00"
android:fillAlpha="1"/> android:fillAlpha="1"/>
<path <path
android:pathData="M26.907,52.72l2.987,0l0,6.613l-2.987,0z" android:pathData="M51,35.75L60,35.75A1.5,3 0,0 1,61.5 38.75L61.5,39.75A1.5,3 0,0 1,60 42.75L51,42.75A1.5,3 0,0 1,49.5 39.75L49.5,38.75A1.5,3 0,0 1,51 35.75z"
android:fillColor="#000000" android:strokeAlpha="1"
android:strokeColor="#00000000" android:strokeWidth="0"
android:fillAlpha="1"/> android:fillColor="#1a1a1a"
<path android:strokeColor="#1a1a1a"
android:pathData="M26.907,48.667l2.987,0l0,2.56l-2.987,0z" android:fillAlpha="1"
android:fillColor="#000000" android:strokeLineCap="butt"/>
android:strokeColor="#00000000"
android:fillAlpha="1"/>
<path
android:pathData="M31.813,48.667L31.813,52.72 31.813,55.067 31.813,56.767 31.813,59.333l2.992,0 2.117,0c1.654,0 2.998,-1.481 2.998,-3.307 0,-1.826 -1.344,-3.307 -2.998,-3.307l-2.117,0L34.805,48.667ZM34.805,55.067l1.269,0c0.469,0 0.848,0.384 0.848,0.853 0,0.469 -0.379,0.847 -0.848,0.847l-1.269,0z"
android:fillColor="#000000"
android:strokeColor="#00000000"
android:fillAlpha="1"/>
<path
android:pathData="m44.192,48.667c-1.65,0 -2.992,1.481 -2.992,3.307 0,0.023 -0,0.044 0,0.067 0,0.004 -0,0.009 0,0.013l0,3.893c-0.001,0.027 0,0.053 0,0.08 0,1.826 1.341,3.307 2.992,3.307l2.112,0 0.247,0 2.739,0 0.247,0 2.112,0c1.651,0 2.992,-1.481 2.992,-3.307 0,-1.826 -1.341,-3.307 -2.992,-3.307l-1.199,0 -0.48,0 -2.372,0l0,2.347l2.372,0 0.48,0 0.353,0c0.468,0 0.846,0.384 0.846,0.853 0,0.469 -0.378,0.847 -0.846,0.847l-0.833,0 -0.433,0 -0.247,0 -2.739,0 -0.247,0 -0.433,0 -0.833,0c-0.459,0 -0.832,-0.363 -0.846,-0.82l0,-3.893 0,-0.013c0.021,-0.45 0.391,-0.807 0.846,-0.807l0.833,0 0.433,0 1.293,0l0,0.007L54.207,51.24L54.207,48.667l-4.917,0 -1.692,0 -1.293,0 -2.112,0z"
android:fillColor="#e74a45"
android:strokeColor="#00000000"
android:fillAlpha="1"/>
<path
android:pathData="M56.133,48.667L56.133,51.238l5.406,0 1.859,0 1.105,0 0.43,0 0.827,0c0.452,0 0.82,0.356 0.84,0.806l0,0.013 0,3.891c-0.014,0.456 -0.384,0.819 -0.84,0.819l-0.827,0 -0.43,0 -1.899,0 -1.065,0 -2.442,0L59.098,52.724L56.133,52.724l0,4.044 0,1.752 0,0.813l5.406,0 1.065,0 1.899,0 2.098,0c1.639,0 2.971,-1.48 2.971,-3.305 0,-0.027 0.001,-0.053 0,-0.08L69.573,52.058c0,-0.004 -0,-0.009 0,-0.013 0,-0.022 0,-0.044 0,-0.067 0,-1.825 -1.332,-3.305 -2.971,-3.305l-2.098,0 -1.105,0l0,-0.007L56.133,48.667Z"
android:fillColor="#e74a45"
android:strokeColor="#00000000"
android:fillAlpha="1"/>
<path
android:pathData="M69.572,48.667L73.72,48.667L77.787,52.733 81.853,48.667l4.147,0l-5.333,5.333 5.333,5.333L81.853,59.333L77.787,55.267 73.72,59.333l-4.147,0l5.333,-5.333z"
android:fillColor="#e74a45"
android:strokeColor="#00000000"/>
</vector> </vector>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<color name="ic_background_color">#FFFFFFFF</color> <color name="ic_background_color">#000000FF</color>
</resources> </resources>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<string name="app_name">pac-dude</string> <string name="app_name">Pac-Dude</string>
</resources> </resources>

87
icon_foreground.svg Normal file
View File

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<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"
width="108pt"
height="108pt"
viewBox="0 0 108 108"
version="1.1"
id="svg4773"
inkscape:version="0.92.4 5da689c313, 2019-01-14"
sodipodi:docname="icon_foreground.svg">
<defs
id="defs4767" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="3.1365865"
inkscape:cx="-4.5326821"
inkscape:cy="69.711018"
inkscape:document-units="pt"
inkscape:current-layer="layer1"
showgrid="true"
units="pt"
objecttolerance="1"
gridtolerance="1"
inkscape:window-width="1900"
inkscape:window-height="1039"
inkscape:window-x="10"
inkscape:window-y="31"
inkscape:window-maximized="0"
scale-x="0.35278">
<inkscape:grid
type="xygrid"
id="grid4807"
dotted="false"
snapvisiblegridlinesonly="false" />
</sodipodi:namedview>
<metadata
id="metadata4770">
<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>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-258.9)">
<path
style="opacity:1;fill:#ffff00;fill-opacity:1;stroke:#ffff00;stroke-width:0.74999523;stroke-opacity:1"
id="path4538-6"
sodipodi:type="arc"
sodipodi:cx="54.374847"
sodipodi:cy="312.52429"
sodipodi:rx="23.999851"
sodipodi:ry="23.999851"
sodipodi:start="0.6981317"
sodipodi:end="5.5850536"
d="M 72.7598,327.9511 A 23.999851,23.999851 0 0 1 46.166415,335.07678 23.999851,23.999851 0 0 1 30.374996,312.52429 23.999851,23.999851 0 0 1 46.166415,289.97181 23.999851,23.999851 0 0 1 72.7598,297.09748 L 54.374847,312.52429 Z" />
<rect
style="opacity:1;fill:#1a1a1a;fill-opacity:1;stroke:#1a1a1a;stroke-width:0;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4828"
width="11.999926"
height="6.9999561"
x="49.499874"
y="294.65024"
rx="1.4999907"
ry="2.9999814" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB