/** * * @param remoteViews notification's old remoteViews * @param remoteview notification's old remoteViews view * @param oldRemoteView notification's new remoteViews view */ public void setPendIntent(RemoteViews remoteViews, View remoteview, View oldRemoteView) { if (findPendIntents() > 0) { Iterator<Map.Entry<Integer, PendingIntent>> set = clickIntents.entrySet().iterator(); List<RectInfo> list = new ArrayList<>(); int index = 0; VLog.v(TAG, "start find intent"); while (set.hasNext()) { Map.Entry<Integer, PendingIntent> e = set.next(); View view = oldRemoteView.findViewById(e.getKey()); if (view != null) { Rect rect = getRect(view); list.add(new RectInfo(rect, e.getValue(), index)); index++; } } VLog.v(TAG, "find:" + list); if (remoteview instanceof ViewGroup) { setIntentByViewGroup(remoteViews, (ViewGroup) remoteview, list); } } }
final PendIntentCompat pendIntentCompat = new PendIntentCompat(contentView); final int layoutId; if (!click || pendIntentCompat.findPendIntents() <= 0) { layoutId = R.layout.custom_notification_lite; } else {
/** * * @param remoteViews notification's old remoteViews * @param remoteview notification's old remoteViews view * @param oldRemoteView notification's new remoteViews view */ public void setPendIntent(RemoteViews remoteViews, View remoteview, View oldRemoteView) { if (findPendIntents() > 0) { Iterator<Map.Entry<Integer, PendingIntent>> set = clickIntents.entrySet().iterator(); List<RectInfo> list = new ArrayList<>(); int index = 0; VLog.v(TAG, "start find intent"); while (set.hasNext()) { Map.Entry<Integer, PendingIntent> e = set.next(); View view = oldRemoteView.findViewById(e.getKey()); if (view != null) { Rect rect = getRect(view); list.add(new RectInfo(rect, e.getValue(), index)); index++; } } VLog.v(TAG, "find:" + list); if (remoteview instanceof ViewGroup) { setIntentByViewGroup(remoteViews, (ViewGroup) remoteview, list); } } }
/** * * @param remoteViews notification's old remoteViews * @param remoteview notification's old remoteViews view * @param oldRemoteView notification's new remoteViews view */ public void setPendIntent(RemoteViews remoteViews, View remoteview, View oldRemoteView) { if (findPendIntents() > 0) { Iterator<Map.Entry<Integer, PendingIntent>> set = clickIntents.entrySet().iterator(); List<RectInfo> list = new ArrayList<>(); int index = 0; VLog.v(TAG, "start find intent"); while (set.hasNext()) { Map.Entry<Integer, PendingIntent> e = set.next(); View view = oldRemoteView.findViewById(e.getKey()); if (view != null) { Rect rect = getRect(view); list.add(new RectInfo(rect, e.getValue(), index)); index++; } } VLog.v(TAG, "find:" + list); if (remoteview instanceof ViewGroup) { setIntentByViewGroup(remoteViews, (ViewGroup) remoteview, list); } } }
final PendIntentCompat pendIntentCompat = new PendIntentCompat(contentView); final int layoutId; if (!click || pendIntentCompat.findPendIntents() <= 0) { layoutId = R.layout.custom_notification_lite; } else {
final PendIntentCompat pendIntentCompat = new PendIntentCompat(contentView); final int layoutId; if (!click || pendIntentCompat.findPendIntents() <= 0) { layoutId = R.layout.custom_notification_lite; } else {