Add base icon for stopped bridge state.
This commit is contained in:
parent
ac26c0d721
commit
e1895caa9d
3 changed files with 100 additions and 3 deletions
|
@ -66,15 +66,16 @@ public class ProgramakerBridgeService extends Service {
|
|||
NotificationCompat.Builder builder = new NotificationCompat
|
||||
.Builder(this, ProgramakerBridgeService.BridgeStatusNotificationChannel)
|
||||
.setContentTitle(title)
|
||||
.setSmallIcon(R.drawable.ic_vector_icon)
|
||||
.setPriority(NotificationCompat.PRIORITY_DEFAULT);
|
||||
|
||||
|
||||
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 {
|
||||
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();
|
||||
|
|
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>
|
Loading…
Add table
Add a link
Reference in a new issue