小编Kri*_*s88的帖子

我无法设置大视图样式

我无法使用大视图样式创建通知.支持库问题?我的代码在Eclipse中没问题(没有错误),但通知只显示了contentTitle,ContentText,图标......就是这样!我的通知中没有额外的行...出了什么问题?非常感谢你的回复 .这是代码......

@Override
protected void onMessage(Context arg0, Intent arg1) {
    // TODO Auto-generated method stub
    //Log.d("onMessage", String.valueOf(arg1));
    //Log.d("onMessage", "Receive a message");
    // Get the data from intent and send to notification bar
    String message = arg1.getExtras().getString("message");
    generateNotification3(arg0, message);
}


private static void generateNotification3(Context context, String message) {    
    NotificationCompat.Builder mbuilder =
            new NotificationCompat.Builder(context)
            .setSmallIcon(R.drawable.ic_launcher)
            .setContentTitle("lolo")
            .setContentText("text")
            .setDefaults(Notification.DEFAULT_ALL) // requires VIBRATE permission
            /*
             * Sets the big view "big text" style and supplies the
             * text (the user's reminder message) that will …
Run Code Online (Sandbox Code Playgroud)

android-notifications

5
推荐指数
1
解决办法
4384
查看次数

标签 统计

android-notifications ×1