Answers for "recyclerview viewholder example kotlin tutorial"

1

recyclerview dependency

implementation 'com.android.support:recyclerview-v7:23.1.1'
Posted by: Guest on May-24-2020
0

recyclerview onCreateViewHolder kotlin

override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
        // Inflate the custom view from xml layout file
        val v: View = LayoutInflater.from(parent?.context)
            .inflate(R.layout.custom_view, parent, false)

        // Return the view holder
        return ViewHolder(
            v
        )
    }


    override fun onBindViewHolder(holder: ViewHolder, position: Int) {
        // Display the current user full name and location in view holder custom view
        holder?.name?.text = list.get(position).description

    }
Posted by: Guest on August-04-2020

Code answers related to "recyclerview viewholder example kotlin tutorial"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language