我写的是
noti.contentview=new remoteviews(...)
noti.setonclickpendingintent(....)
这个跟appwidget类似,应该没问题的啊。
noti的时候按钮可以显示出来
但点不到,点击下去是整个notification。于是我想到listview item添加按钮后也是这种情况
于是我把notification的layout的按钮外面的layout设置focusable=false clickabled=false
但还是不行啊这个到底要怎么办才行呢
noti.contentview=new remoteviews(...)
noti.setonclickpendingintent(....)
这个跟appwidget类似,应该没问题的啊。
noti的时候按钮可以显示出来
但点不到,点击下去是整个notification。于是我想到listview item添加按钮后也是这种情况
于是我把notification的layout的按钮外面的layout设置focusable=false clickabled=false
但还是不行啊这个到底要怎么办才行呢
是
noti.contentviews.setonclickpendingintent(...)
R.id.notice_cancel, receiveMsmIntent());
再在 private PendingIntent receiveMsmIntent() {
onCancelled(); Intent intent = new Intent(); PendingIntent contentIntent = PendingIntent.getActivity(DownService.this, 0,
intent, 0); // mReceiveSms.clear(); return contentIntent;
}
onCancelled();里写你