Skip to content

Instantly share code, notes, and snippets.

@aqua30
Last active November 8, 2022 08:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aqua30/63a83481243901888e1c31793da7fb9a to your computer and use it in GitHub Desktop.
Save aqua30/63a83481243901888e1c31793da7fb9a to your computer and use it in GitHub Desktop.
class MemberListViewHolder(mContext: Context, itemView:View):RecyclerView.ViewHolder(itemView){
lateinit var userPreference: Preference<LoginResponse>
init{
super.itemView
ButterKnife.bind(this,itemView)
inject(context)
}
private fun inject(context: Context) {
val entryPoint = EntryPointAccessors.fromActivity(
context as FragmentActivity,
UserListViewHolderEntryPoint::class.java
)
userPreference = entryPoint.loginPref
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment