那就加个图标好啦
This commit is contained in:
parent
2a822f1f6a
commit
87be4975fe
@ -46,7 +46,8 @@ public class ProgressNotificationUtil {
|
||||
|
||||
return new NotificationCompat.Builder(mContext, channelId).setAutoCancel(true)
|
||||
.setContentTitle(title)
|
||||
.setContentText(content);
|
||||
.setContentText(content)
|
||||
.setSmallIcon(R.drawable.ic_downloading);
|
||||
|
||||
}
|
||||
|
||||
@ -75,7 +76,7 @@ public class ProgressNotificationUtil {
|
||||
|
||||
public static void showNotificationProgressApkDown(Context mContext
|
||||
, int progress) {
|
||||
final NotificationCompat.Builder builder = getNotificationBuilder(mContext, "正在下载", "悠游云驾", "yunjia");
|
||||
final NotificationCompat.Builder builder = getNotificationBuilder(mContext, "正在下载", "更新", "upgrade");
|
||||
builder.setOnlyAlertOnce(true);
|
||||
builder.setDefaults(Notification.FLAG_ONLY_ALERT_ONCE);
|
||||
builder.setProgress(100, progress, false);
|
||||
|
9
android/src/main/res/drawable/ic_downloading.xml
Normal file
9
android/src/main/res/drawable/ic_downloading.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="222.07031dp"
|
||||
android:height="200dp"
|
||||
android:viewportWidth="1137"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:pathData="M1080.89,1024L56.89,1024a56.89,56.89 0,0 1,-56.89 -56.89L0,682.67h113.78v227.56h910.22v-227.56h113.78v284.44a56.89,56.89 0,0 1,-56.89 56.89zM893.55,358a56.89,56.89 0,0 0,-80.44 0L625.78,545.34L625.78,56.89a56.89,56.89 0,1 0,-113.78 0v488.45l-187.34,-187.34a56.89,56.89 0,0 0,-80.44 80.44l284.44,284.44a56.89,56.89 0,0 0,80.55 0l284.44,-284.44a56.89,56.89 0,0 0,-0.11 -80.44z"
|
||||
android:fillColor="#54626C"/>
|
||||
</vector>
|
Loading…
x
Reference in New Issue
Block a user