Reputation: 7733
How to have this blink effect on my notification icon during a download file, like that:
MY ANSWER
Just use this native drawable android.R.drawable.stat_sys_download
mBuilder.setContentTitle(title)
.setContentText(filename)
.setSmallIcon(android.R.drawable.stat_sys_download);
Upvotes: 0
Views: 1092
Reputation: 1083
Try using an animation drawable.
For example:
<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="@drawable/frame1On" android:duration="1000" />
<item android:drawable="@drawable/frame2Off" android:duration="1000" />
</animation-list>
Where frame1On on is the image highlighted, and frame2Off is the image greyed out. Add more frames if necessary.
Upvotes: 1