mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-22 20:31:16 +00:00
added a proper notification icon
This commit is contained in:
parent
c3d4a1cfdc
commit
d7285f1d7c
7 changed files with 118 additions and 2 deletions
116
graphics/ic_stat_notify_full.svg
Normal file
116
graphics/ic_stat_notify_full.svg
Normal file
|
@ -0,0 +1,116 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
|
||||||
|
<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: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"
|
||||||
|
viewBox="0 0 117.3 117.3"
|
||||||
|
enable-background="new 0 0 117.3 117.3"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:version="0.48.5 r10040"
|
||||||
|
width="100%"
|
||||||
|
height="100%"
|
||||||
|
sodipodi:docname="ic_stat_notify_full.svg"
|
||||||
|
inkscape:export-filename="/home/monk/code/syncthing-android/src/main/res/drawable-xxhdpi/ic_stat_notify.png"
|
||||||
|
inkscape:export-xdpi="55.242966"
|
||||||
|
inkscape:export-ydpi="55.242966"><metadata
|
||||||
|
id="metadata40"><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="defs38"><linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#SVGID_1_"
|
||||||
|
id="linearGradient3129"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
x1="58.666"
|
||||||
|
y1="117.332"
|
||||||
|
x2="58.666"
|
||||||
|
y2="0" /><linearGradient
|
||||||
|
y2="0"
|
||||||
|
x2="58.666"
|
||||||
|
y1="117.332"
|
||||||
|
x1="58.666"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
id="SVGID_1_"><stop
|
||||||
|
id="stop6"
|
||||||
|
style="stop-color:#0882C8"
|
||||||
|
offset="0" /><stop
|
||||||
|
id="stop8"
|
||||||
|
style="stop-color:#26B6DB"
|
||||||
|
offset="1" /></linearGradient></defs><sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1366"
|
||||||
|
inkscape:window-height="742"
|
||||||
|
id="namedview36"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="0.5"
|
||||||
|
inkscape:cx="28.669984"
|
||||||
|
inkscape:cy="55.246875"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="26"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="Layer_1" /><circle
|
||||||
|
stroke-miterlimit="10"
|
||||||
|
cx="58.700001"
|
||||||
|
cy="58.5"
|
||||||
|
r="43.700001"
|
||||||
|
id="circle14"
|
||||||
|
sodipodi:cx="58.700001"
|
||||||
|
sodipodi:cy="58.5"
|
||||||
|
sodipodi:rx="43.700001"
|
||||||
|
sodipodi:ry="43.700001"
|
||||||
|
style="fill:none;stroke:#ffffff;stroke-width:7.99999979;stroke-miterlimit:10;stroke-dasharray:none" /><path
|
||||||
|
style="fill:#ffffff"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path18"
|
||||||
|
d="m 93.733343,50.633305 c 6.266651,2.133328 13.066637,-1.199997 15.199967,-7.466648 2.13332,-6.266651 -1.2,-13.066634 -7.46665,-15.199962 -6.266654,-2.133328 -13.066637,1.199997 -15.199965,7.466648 -2.133328,6.266651 1.199997,13.066634 7.466648,15.199962 z" /><line
|
||||||
|
style="fill:none;stroke:#ffffff;stroke-width:7.99999979;stroke-miterlimit:10;stroke-dasharray:none"
|
||||||
|
id="line20"
|
||||||
|
y2="64.400002"
|
||||||
|
x2="67.5"
|
||||||
|
y1="39.400002"
|
||||||
|
x1="97.599998"
|
||||||
|
stroke-miterlimit="10" /><path
|
||||||
|
style="fill:#ffffff"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path24"
|
||||||
|
d="m 74.60003,90.733336 c -0.533332,6.533317 4.266656,12.399974 10.933306,13.066634 6.66665,0.53333 12.399969,-4.266656 13.066634,-10.933306 C 99.133302,86.333347 94.333314,80.466695 87.666664,79.80003 81.000014,79.266698 75.133362,84.066686 74.60003,90.733336 z" /><line
|
||||||
|
style="fill:none;stroke:#ffffff;stroke-width:7.99999979;stroke-miterlimit:10;stroke-dasharray:none"
|
||||||
|
id="line26"
|
||||||
|
y2="64.400002"
|
||||||
|
x2="67.5"
|
||||||
|
y1="91.800003"
|
||||||
|
x1="86.5"
|
||||||
|
stroke-miterlimit="10" /><path
|
||||||
|
d="m 57.483358,70.91665 c 3.599991,5.599986 11.066639,7.199982 16.533292,3.599991 C 79.616636,70.91665 81.216633,63.450002 77.616641,57.983349 74.01665,52.383363 66.550003,50.783367 61.08335,54.383358 55.483364,57.850016 53.883367,65.316664 57.483359,70.91665 z"
|
||||||
|
id="path28"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
style="fill:#ffffff" /><path
|
||||||
|
style="fill:#ffffff"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path32"
|
||||||
|
d="M 22.733318,58.833359 C 16.999999,55.500034 9.666684,57.366696 6.333359,62.966682 c -3.333325,5.733319 -1.466663,13.066634 4.133323,16.399959 5.733319,3.333325 13.066634,1.466663 16.399959,-4.133323 3.333325,-5.599986 1.466663,-12.933301 -4.133323,-16.399959 z" /><line
|
||||||
|
style="fill:none;stroke:#ffffff;stroke-width:7.99999979;stroke-miterlimit:10;stroke-dasharray:none"
|
||||||
|
id="line34"
|
||||||
|
y2="64.400002"
|
||||||
|
x2="67.5"
|
||||||
|
y1="69.099998"
|
||||||
|
x1="16.6"
|
||||||
|
stroke-miterlimit="10" /></svg>
|
After Width: | Height: | Size: 4.7 KiB |
|
@ -384,7 +384,7 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
Notification n = new NotificationCompat.Builder(mContext)
|
Notification n = new NotificationCompat.Builder(mContext)
|
||||||
.setContentTitle(mContext.getString(R.string.restart_title))
|
.setContentTitle(mContext.getString(R.string.restart_title))
|
||||||
.setContentText(mContext.getString(R.string.restart_notification_text))
|
.setContentText(mContext.getString(R.string.restart_notification_text))
|
||||||
.setSmallIcon(R.drawable.ic_launcher)
|
.setSmallIcon(R.drawable.ic_stat_notify)
|
||||||
.setContentIntent(pi)
|
.setContentIntent(pi)
|
||||||
.build();
|
.build();
|
||||||
n.flags |= Notification.FLAG_ONLY_ALERT_ONCE | Notification.FLAG_AUTO_CANCEL;
|
n.flags |= Notification.FLAG_ONLY_ALERT_ONCE | Notification.FLAG_AUTO_CANCEL;
|
||||||
|
|
|
@ -197,7 +197,7 @@ public class SyncthingService extends Service {
|
||||||
this, getApplicationInfo().dataDir + "/" + BINARY_NAME)).start();
|
this, getApplicationInfo().dataDir + "/" + BINARY_NAME)).start();
|
||||||
Notification n = new NotificationCompat.Builder(this)
|
Notification n = new NotificationCompat.Builder(this)
|
||||||
.setContentTitle(getString(R.string.syncthing_active))
|
.setContentTitle(getString(R.string.syncthing_active))
|
||||||
.setSmallIcon(R.drawable.ic_launcher)
|
.setSmallIcon(R.drawable.ic_stat_notify)
|
||||||
.setOngoing(true)
|
.setOngoing(true)
|
||||||
.setPriority(NotificationCompat.PRIORITY_MIN)
|
.setPriority(NotificationCompat.PRIORITY_MIN)
|
||||||
.setContentIntent(PendingIntent.getActivity(this, 0,
|
.setContentIntent(PendingIntent.getActivity(this, 0,
|
||||||
|
|
BIN
src/main/res/drawable-hdpi/ic_stat_notify.png
Normal file
BIN
src/main/res/drawable-hdpi/ic_stat_notify.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 861 B |
BIN
src/main/res/drawable-mdpi/ic_stat_notify.png
Normal file
BIN
src/main/res/drawable-mdpi/ic_stat_notify.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 680 B |
BIN
src/main/res/drawable-xhdpi/ic_stat_notify.png
Normal file
BIN
src/main/res/drawable-xhdpi/ic_stat_notify.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
src/main/res/drawable-xxhdpi/ic_stat_notify.png
Normal file
BIN
src/main/res/drawable-xxhdpi/ic_stat_notify.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2 KiB |
Loading…
Reference in a new issue