Last active
June 15, 2018 16:18
-
-
Save bangiqi/a164ab8e801159cfbcca9439aabaa055 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 | |
} | |
} | |
class ViewHolder (view: View) : RecyclerView.ViewHolder(view){ | |
val tvNamaBulanHijriyah = view.tv_nama_blnhijriah | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment