문제

The expanded notifications introduced in Jelly Bean allows adding actions. The actions appear as buttons in a row. If I wanted to modify this with my own custom view I would consider a remoteview.

Do expanded notifications allow for remoteviews? I can only find examples of remoteviews being used in simple notifications before the expanded notifications existed.

도움이 되었습니까?

해결책

It appears that http://codeversed.com/expandable-notifications-android/ has the answer in the Custom View at the end.

So what if the rich notification styles don’t provide you with the layout you need? Easy, just create your own layout and pass it to the builder. One little fact to retain is that notifications use remote views, which means you need to create a layout using a RemoteView. Below is exactly how you would need to create this custom RemoteView.

notification.bigContentView = expandedView;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top