How to create notification icon badge on Android apps (like iPhone)

后端 未结 3 920
萌比男神i
萌比男神i 2020-12-09 12:43

I am very new to programming and would like to know what is the best way to go about creating a notification icon badge similar to the ones on the iPhone apps. This would be

3条回答
  •  渐次进展
    2020-12-09 13:43

    Are you talking about a graphical icon? I created a transparent PNG using the gimp and pass that drawable id as the 1st argument to the Notification constructor.

    Notification notification = new Notification(R.drawable.someicon,title,System.currentTimeMillis())
    

提交回复
热议问题