【问题标题】:Push Notification Icon推送通知图标
【发布时间】:2015-05-17 01:08:32
【问题描述】:

我正在尝试更改默认通知图标并得到以下结果:

如何去掉图片右上角的白圈?

public class ParseReceiver extends ParsePushBroadcastReceiver {

@Override
protected Bitmap getLargeIcon(Context context, Intent intent) {
    Bitmap icon = BitmapFactory.decodeResource(context.getResources(), R.drawable.ic_launcher);
    return icon;
   }
}

另一个问题:

如何将通知栏中的白色图像圈更改为彩色?

【问题讨论】:

  • 显示您的启动器图标
  • 我的图标是第一张带有日本国旗的图标。我也希望它在状态栏中着色。

标签: android parse-platform notifications icons push


【解决方案1】:

右下角的圆圈和统计栏中的圆圈均由“小图标”而非大图标控制。

您可以通过覆盖 ParseReceiver 中的 getSmallIcon 来设置它,或者更简单的方法是添加

<meta-data android:name="com.parse.push.notification_icon" android:resource="@drawable/push_icon"/>

到您的AndroidManifest.xml 文件。

【讨论】:

    猜你喜欢
    • 2017-07-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-24
    • 2014-09-21
    • 2021-01-25
    相关资源
    最近更新 更多