Default notification background color

前端 未结 2 525
情歌与酒
情歌与酒 2020-12-18 07:13

I have a custom notification that uses a LinearLayout that contains an ImageView and a TextView. Before Android 4.0 all I needed to d

相关标签:
2条回答
  • 2020-12-18 08:02

    This appears to be a bug in Android 4.0.3. See bug report for updates: http://code.google.com/p/android/issues/detail?id=23863&thanks=23863&ts=1325611036

    0 讨论(0)
  • 2020-12-18 08:09

    I also have a custom notification and found that the background color was also gray on ice cream sandwich. I see this with other apps too, like WeatherBug.

    I had no targetSdkVersion in my manifest. I found that by adding targetSdkVersion="14" to the manifest the problem is fixed. The background is now the appropriate color for each android version.

    <uses-sdk android:minSdkVersion="7" android:targetSdkVersion="14" />
    

    Edit: Google confirms this is the correct approach. See #16 at https://code.google.com/p/android/issues/detail?id=23863&thanks=23863&ts=1325611036

    0 讨论(0)
提交回复
热议问题