Pending Action - Expand notification on touch

混江龙づ霸主 提交于 2019-12-04 04:31:36

问题


I use setCustomBigContentView for notification (load style from xml ):

    mBuilder = new NotificationCompat.Builder(this);
    mBuilder.setShowWhen(false);
    mBuilder.setDefaults(Notification.DEFAULT_ALL);
    mBuilder.setVisibility(NotificationCompat.VISIBILITY_PUBLIC);
    mBuilder.setSmallIcon(R.drawable.play_btn_2x);
    mBuilder.setContentText("no in use this");
    mBuilder.setLargeIcon(icon);
    mBuilder.setPriority(Notification.PRIORITY_MAX);
    mBuilder.setContent(contentNotifySmall); 
    //mBuilder.setAutoCancel(false);
    mBuilder.setCustomBigContentView(contentNotify);

When some telephone have system top priority app like ( anti virus or task cleaners ) there is no possible for self expand (notify need to be on top) . This is ok . But only way to expand notify is two finger scroll , long touch scroll down , tap - second action scroll down .

Every example with pending action is who to open activity .

I need pending action how to expand from small to big view notification on simple touch event.

来源:https://stackoverflow.com/questions/42527534/pending-action-expand-notification-on-touch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!