Add base icon for stopped bridge state.
This commit is contained in:
parent
ac26c0d721
commit
e1895caa9d
@ -66,15 +66,16 @@ public class ProgramakerBridgeService extends Service {
|
|||||||
NotificationCompat.Builder builder = new NotificationCompat
|
NotificationCompat.Builder builder = new NotificationCompat
|
||||||
.Builder(this, ProgramakerBridgeService.BridgeStatusNotificationChannel)
|
.Builder(this, ProgramakerBridgeService.BridgeStatusNotificationChannel)
|
||||||
.setContentTitle(title)
|
.setContentTitle(title)
|
||||||
.setSmallIcon(R.drawable.ic_vector_icon)
|
|
||||||
.setPriority(NotificationCompat.PRIORITY_DEFAULT);
|
.setPriority(NotificationCompat.PRIORITY_DEFAULT);
|
||||||
|
|
||||||
|
|
||||||
if (stopped) {
|
if (stopped) {
|
||||||
builder.addAction(R.drawable.ic_start, getString(R.string.start_bridge), startPendingIntent);
|
builder.addAction(R.drawable.ic_start, getString(R.string.start_bridge), startPendingIntent)
|
||||||
|
.setSmallIcon(R.drawable.ic_vector_stopped_icon);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
builder.addAction(R.drawable.ic_cancel, getString(R.string.stop_bridge), stopPendingIntent);
|
builder.addAction(R.drawable.ic_cancel, getString(R.string.stop_bridge), stopPendingIntent)
|
||||||
|
.setSmallIcon(R.drawable.ic_vector_icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
Notification notification = builder.build();
|
Notification notification = builder.build();
|
||||||
|
16
app/src/main/res/drawable/ic_vector_stopped_icon.xml
Normal file
16
app/src/main/res/drawable/ic_vector_stopped_icon.xml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<vector android:alpha="0.99" android:autoMirrored="true"
|
||||||
|
android:height="328.6dp" android:viewportHeight="328.6"
|
||||||
|
android:viewportWidth="322" android:width="322dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="#00000000"
|
||||||
|
android:pathData="M90.79,152.763 L287.19,286.563 173.29,25.493c0,0 -12.3,-23.91 -26,0.37 -13.6,24.3 -56.5,126.9 -56.5,126.9z"
|
||||||
|
android:strokeAlpha="1" android:strokeColor="#000000"
|
||||||
|
android:strokeLineCap="butt" android:strokeLineJoin="miter" android:strokeWidth="30.2362"/>
|
||||||
|
<path android:fillColor="#00000000"
|
||||||
|
android:pathData="M32.25,290.863 L132.09,230.763 74.8,191.163Z"
|
||||||
|
android:strokeAlpha="1" android:strokeColor="#000000"
|
||||||
|
android:strokeLineCap="butt" android:strokeLineJoin="miter" android:strokeWidth="30.2362"/>
|
||||||
|
<path android:fillColor="#000000"
|
||||||
|
android:pathData="M-14.73,211.691l338.429,-119.798l12.181,33.237l-338.429,119.798z"
|
||||||
|
android:strokeColor="#ff00ff" android:strokeLineCap="square"
|
||||||
|
android:strokeLineJoin="miter" android:strokeWidth="0"/>
|
||||||
|
</vector>
|
80
asset-src/ic_vector_stopped_icon.svg
Normal file
80
asset-src/ic_vector_stopped_icon.svg
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
<?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"
|
||||||
|
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
|
||||||
|
sodipodi:docname="ic_vector_stopped_icon.svg"
|
||||||
|
viewBox="0 0 322 328.6"
|
||||||
|
height="328.6"
|
||||||
|
width="322"
|
||||||
|
id="svg2693"
|
||||||
|
version="1.1">
|
||||||
|
<metadata
|
||||||
|
id="metadata2699">
|
||||||
|
<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="defs2697" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
fit-margin-bottom="0"
|
||||||
|
fit-margin-right="0"
|
||||||
|
fit-margin-left="0"
|
||||||
|
fit-margin-top="0"
|
||||||
|
inkscape:current-layer="g2701"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:window-y="20"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:cy="145.1"
|
||||||
|
inkscape:cx="194.7"
|
||||||
|
inkscape:zoom="0.9615"
|
||||||
|
showgrid="false"
|
||||||
|
id="namedview2695"
|
||||||
|
inkscape:window-height="746"
|
||||||
|
inkscape:window-width="1364"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
guidetolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
objecttolerance="10"
|
||||||
|
borderopacity="1"
|
||||||
|
bordercolor="#666666"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
inkscape:document-rotation="0" />
|
||||||
|
<g
|
||||||
|
transform="translate(-14.41,-8.837)"
|
||||||
|
id="g2701"
|
||||||
|
inkscape:label="Image"
|
||||||
|
inkscape:groupmode="layer">
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cccsc"
|
||||||
|
id="path3270"
|
||||||
|
d="M 105.2,161.6 301.6,295.4 187.7,34.33 c 0,0 -12.3,-23.91 -26,0.37 -13.6,24.3 -56.5,126.9 -56.5,126.9 z"
|
||||||
|
style="fill:none;stroke:#000000;stroke-width:30.2362;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cccc"
|
||||||
|
id="path3312"
|
||||||
|
d="M 46.66,299.7 146.5,239.6 89.21,200 Z"
|
||||||
|
style="fill:none;stroke:#000000;stroke-width:30.2362;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
<rect
|
||||||
|
transform="matrix(0.9427,-0.3337,0.3441,0.9389,0,0)"
|
||||||
|
y="207.8"
|
||||||
|
x="-76.19"
|
||||||
|
height="35.4"
|
||||||
|
width="359"
|
||||||
|
id="rect936"
|
||||||
|
style="fill:#000000;stroke:#ff00ff;stroke-width:0;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:1.6;stroke-dasharray:none;paint-order:fill markers stroke" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.7 KiB |
Loading…
Reference in New Issue
Block a user