當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。