SHARE
TWEET

Untitled

a guest Jun 12th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. open class BaseRecyclerViewHolder(@LayoutRes layoutRes: Int, viewGroup: ViewGroup) : RecyclerView.ViewHolder(inflate(layoutRes, viewGroup)) { // Use the private companion function inflate() for getting a view instance.
  2.     companion object {
  3.         fun inflate(@LayoutRes layoutRes: Int, viewGroup: ViewGroup): View {
  4.             return LayoutInflater.from(viewGroup.context).inflate(layoutRes, viewGroup, false)
  5.         }
  6.     }
  7. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top