0

I have the following issue, which makes a custom notification with a light gray background. I found a solution over here which requires to changed the targetSdkVersion to 14. This solution works fine, but It disables the menu button.

Does anyone as a better solution? is there a way to reenable the menu?

enter image description here

Community
  • 1
  • 1
Kirill Kulakov
  • 10,035
  • 9
  • 50
  • 67

1 Answers1

0

The quick fix for this problem hard code black color for API 14+

if ( Build.VERSION.SDK_INT >= 14 )
  contentView.setInt(R.id.custom_notification, "setBackgroundColor", 0xff151515);

A much neater way to solve this problem is to use the native Notification builder with a big icon when the device is running sdk 14+.

Kirill Kulakov
  • 10,035
  • 9
  • 50
  • 67