レイアウトのリモート ビューをキャッシュできるかどうかを知る必要がありますか?
もしそうなら、キャッシュをキャッシュまたはクリーンアップする方法はありますか?ここに例はありますか?グーグルで試してみましたレイアウトリモートビューをキャッシュする方法の例が見つかりません
たとえば、この通知の進行状況をキャッシュする方法!
お時間をいただきありがとうございます
updateTask = this;
//setup notification ID and information
Random r = new Random();
NOTIFICATION_ID = r.nextInt(80-65) + 1;
NOTIFICATION_ID++;
int icon = R.drawable.icon;
long when = System.currentTimeMillis();
notification = new Notification(icon, getString(R.string.app_name), when);
contentView = new RemoteViews(getPackageName(), R.layout.custom_notification);
contentView.setTextViewText(R.id.text, "cool"+NOTIFICATION_ID);
notification.contentView = contentView;
notification.flags |= Notification.FLAG_NO_CLEAR;
notification.flags |= Notification.FLAG_ONGOING_EVENT;
Intent notificationIntent = new Intent();
notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
notificationIntent.setAction(Intent.ACTION_MAIN);
PendingIntent contentIntent = PendingIntent.getActivity(BabupMain.this, 0, notificationIntent, 0);
notification.contentIntent = contentIntent;
mNotificationManager.notify(NOTIFICATION_ID, notification);