Created
June 15, 2018 17:28
-
-
Save bangiqi/74713620cfbc721f0c51f797640cedb3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BulanHijriyahAdapter(val items: ArrayList<String>, val context: Context) : RecyclerView.Adapter<ViewHolder>() { | |
override fun onBindViewHolder(holder: ViewHolder, position: Int) { | |
holder?.tvNamaBulanHijriyah?.text = items.get(position) | |
} | |
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { | |
return ViewHolder(LayoutInflater.from(context).inflate(R.layout.bulan_hijriyah_list_item, parent, false)) | |
} | |
override fun getItemCount(): Int { | |
return items.size | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment