RecyclerView inside a RemoteView

Pedro Massango

Is there any way to set and update a RecyclerView inside a RemoteView? I want to show a RecyclerView inside a notification. I already set the custom view inside a notification, but I'm unable to set data in the RecyclerView, see here:

// my playout passed here have a Recycler View
// How to findViewById there and set my data?
val contentView = RemoteViews(packageName, R.layout.notification_layout)
val mBuilder = NotificationCompat.Builder(this)
                    .setSmallIcon(R.mipmap.ic_launcher)
                    .setContent(contentView)
jantursky

No, you can't. The notification has fixed max size, and even if you could send your custom RemoteView, there isn't option for using ListView or RecyclerView and filling them with Adapter.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Related Related

HotTag

Archive