Skip to content

Commit 1319837

Browse files
committed
Better notification (closes #15)
1 parent 878e145 commit 1319837

9 files changed

Lines changed: 3508 additions & 6 deletions

File tree

Graphics/Notification.ai

Lines changed: 3503 additions & 0 deletions
Large diffs are not rendered by default.

Graphics/Notification.png

10.8 KB
Loading

app/src/main/java/com/gianlu/aria2android/Aria2/BinService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ private void startBin(@NonNull StartConfig config) {
7474
.setShowWhen(false)
7575
.setAutoCancel(false)
7676
.setOngoing(true)
77-
.setSmallIcon(R.mipmap.ic_launcher)
77+
.setSmallIcon(R.drawable.ic_notification)
7878
.setContentIntent(PendingIntent.getActivity(this, 5756, new Intent(this, MainActivity.class), PendingIntent.FLAG_UPDATE_CURRENT))
7979
.setContentText("aria2c is currently running");
8080

518 Bytes
Loading
384 Bytes
Loading
687 Bytes
Loading
991 Bytes
Loading
1.31 KB
Loading

app/src/main/res/layout/custom_notification.xml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@
33
android:layout_width="match_parent"
44
android:layout_height="92dp"
55
android:orientation="horizontal"
6-
android:paddingEnd="16dp"
7-
android:paddingStart="16dp">
6+
android:paddingStart="8dp"
7+
android:paddingEnd="8dp">
88

99
<ImageView
10-
android:layout_width="56dp"
11-
android:layout_height="56dp"
10+
android:layout_width="48dp"
11+
android:layout_height="48dp"
1212
android:layout_gravity="center_vertical"
1313
android:layout_marginEnd="8dp"
14-
android:padding="2dp"
1514
android:scaleType="fitCenter"
1615
android:src="@mipmap/ic_launcher" />
1716

0 commit comments

Comments
 (0)