Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

add recyclerview in fragment

recyclerView1.apply {
            // set a LinearLayoutManager to handle Android
            // RecyclerView behavior
            layoutManager = LinearLayoutManager(activity)
            // set the custom adapter to the RecyclerView
            val notificationobjects : MutableList<Notification> = mutableListOf<Notification>()
            notificationobjects.add(Notification("Zainab Al Khalifa", "Grade-I"))
             recyclerView1.adapter = NotificationAdapter(notificationobjects)

        }
 
PREVIOUS NEXT
Tagged: #add #recyclerview #fragment
ADD COMMENT
Topic
Name
5+5 =