当前位置: 首页>>代码示例>>Java>>正文


Java NotificationCompat.BigPictureStyle方法代码示例

本文整理汇总了Java中android.support.v4.app.NotificationCompat.BigPictureStyle方法的典型用法代码示例。如果您正苦于以下问题:Java NotificationCompat.BigPictureStyle方法的具体用法?Java NotificationCompat.BigPictureStyle怎么用?Java NotificationCompat.BigPictureStyle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.support.v4.app.NotificationCompat的用法示例。


在下文中一共展示了NotificationCompat.BigPictureStyle方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: showBigNotification

import android.support.v4.app.NotificationCompat; //导入方法依赖的package包/类
private void showBigNotification(Bitmap bitmap, NotificationCompat.Builder mBuilder, int icon, String title, String message, String timeStamp, PendingIntent resultPendingIntent) {
    NotificationCompat.BigPictureStyle bigPictureStyle = new NotificationCompat.BigPictureStyle();
    bigPictureStyle.setBigContentTitle(title);
    bigPictureStyle.setSummaryText(Html.fromHtml(message).toString());
    bigPictureStyle.bigPicture(bitmap);
    Notification notification;
    notification = mBuilder.setSmallIcon(icon).setTicker(title).setWhen(0)
            .setAutoCancel(true)
            .setContentTitle(title)
            .setContentIntent(resultPendingIntent)
            .setStyle(bigPictureStyle)
            .setWhen(getTimeMilliSec(timeStamp))
            .setSmallIcon(R.drawable.logo)
            .setLargeIcon(BitmapFactory.decodeResource(mContext.getResources(), icon))
            .setContentText(message)
            .build();

    NotificationManager notificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
    notificationManager.notify(Config.NOTIFICATION_ID_BIG_IMAGE, notification);
}
 
开发者ID:anandwana001,项目名称:Tech-Jalsa,代码行数:21,代码来源:NotificationUtils.java

示例2: showBigNotification

import android.support.v4.app.NotificationCompat; //导入方法依赖的package包/类
private void showBigNotification(Bitmap bitmap, NotificationCompat.Builder mBuilder, int icon, String title, String message, String timeStamp, PendingIntent resultPendingIntent, Uri alarmSound) {
    NotificationCompat.BigPictureStyle bigPictureStyle = new NotificationCompat.BigPictureStyle();
    bigPictureStyle.setBigContentTitle(title);
    bigPictureStyle.setSummaryText(Html.fromHtml(message).toString());
    bigPictureStyle.bigPicture(bitmap);
    Notification notification;
    notification = mBuilder.setSmallIcon(icon).setTicker(title).setWhen(0)
            .setAutoCancel(true)
            .setContentTitle(title)
            .setContentIntent(resultPendingIntent)
            .setSound(alarmSound)
            .setStyle(bigPictureStyle)
            .setWhen(DateUtils.currentTimeInMiles())
            .setSmallIcon(R.mipmap.ic_launcher)
            .setLargeIcon(BitmapFactory.decodeResource(mContext.getResources(), icon))
            .setContentText(message)
            .build();

    NotificationManager notificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
    notificationManager.notify(ApplicationProps.NOTIFICATION_ID_BIG_IMAGE, notification);
}
 
开发者ID:StringflowServer,项目名称:Beach-Android,代码行数:22,代码来源:NotificationUtils.java

示例3: showBigNotification

import android.support.v4.app.NotificationCompat; //导入方法依赖的package包/类
private void showBigNotification(Bitmap bitmap, NotificationCompat.Builder builder, int icon, String title, String message, String timeStamp, PendingIntent resultPendingIntent) {
    NotificationCompat.BigPictureStyle bigPictureStyle = new NotificationCompat.BigPictureStyle();
    bigPictureStyle.setBigContentTitle(title);
    bigPictureStyle.setSummaryText(Html.fromHtml(message).toString());
    bigPictureStyle.bigPicture(bitmap);
    Notification notification = builder.setSmallIcon(icon).setTicker(title).setWhen(0)
            .setAutoCancel(true)
            .setContentTitle(title)
            .setContentIntent(resultPendingIntent)
            .setStyle(bigPictureStyle)
            .setWhen(getTimeMilliSec(timeStamp))
            .setSmallIcon(R.mipmap.iconcp)
            .setLargeIcon(BitmapFactory.decodeResource(context.getResources(), icon))
            .setContentText(message)
            .build();
    NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
    notificationManager.notify(Config.NOTIFICATION_ID, notification);
}
 
开发者ID:akshah1997,项目名称:OSTMiniProject,代码行数:19,代码来源:NotificationUtils.java

示例4: showBigNotification

import android.support.v4.app.NotificationCompat; //导入方法依赖的package包/类
private void showBigNotification(Bitmap bitmap, NotificationCompat.Builder mBuilder, int icon, String title, String message, String timeStamp, PendingIntent resultPendingIntent, Uri alarmSound) {
    NotificationCompat.BigPictureStyle bigPictureStyle = new NotificationCompat.BigPictureStyle();
    bigPictureStyle.setBigContentTitle(title);
    bigPictureStyle.setSummaryText(Html.fromHtml(message).toString());
    bigPictureStyle.bigPicture(bitmap);
    Notification notification;
    notification = mBuilder.setSmallIcon(icon).setTicker(title).setWhen(0)
            .setAutoCancel(true)
            .setContentTitle(title)
            .setContentIntent(resultPendingIntent)
            .setSound(alarmSound)
            .setStyle(bigPictureStyle)
            .setWhen(getTimeMilliSec(timeStamp))
            .setSmallIcon(R.drawable.ic_launcher)
            .setLargeIcon(BitmapFactory.decodeResource(mContext.getResources(), icon))
            .setContentText(message)
            .build();

    NotificationManager notificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
    notificationManager.notify(AppPrefs.NOTIFICATION_ID_BIG_IMAGE, notification);
}
 
开发者ID:NarendraSickarwar,项目名称:FirebasePost,代码行数:22,代码来源:NotifactionUtil.java

示例5: BigPicture

import android.support.v4.app.NotificationCompat; //导入方法依赖的package包/类
public BigPicture() {
    style = new NotificationCompat.BigPictureStyle();
}
 
开发者ID:boybeak,项目名称:NotificationStyles,代码行数:4,代码来源:BigPicture.java

示例6: makeBigPicture

import android.support.v4.app.NotificationCompat; //导入方法依赖的package包/类
public static NotificationCompat.BigPictureStyle makeBigPicture(Bitmap bitmap) {
    return new NotificationCompat.BigPictureStyle().bigPicture(bitmap);
}
 
开发者ID:czy1121,项目名称:NotificationDemo,代码行数:4,代码来源:NotifyUtil.java


注:本文中的android.support.v4.app.NotificationCompat.BigPictureStyle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。