Skip to content

Instantly share code, notes, and snippets.

View arrazyfathan's full-sized avatar
🗒️
Daily journal

Ar Razy Fathan Rabbani arrazyfathan

🗒️
Daily journal
View GitHub Profile
@arrazyfathan
arrazyfathan / BaseListAdapter.kt
Created September 30, 2023 15:17
Reusable ListAdapter for simple list.
abstract class BaseListAdapter<T, VB : ViewBinding>(
private val bindingInflater: (LayoutInflater, ViewGroup, Boolean) -> VB,
diffUtil: DiffUtil.ItemCallback<T>,
) : ListAdapter<T, BaseListAdapter<T, VB>.ViewHolder>(diffUtil) {
inner class ViewHolder(val binding: VB, val context: Context) :
RecyclerView.ViewHolder(binding.root) {
fun bind(item: T, position: Int) {
bindItem(item, binding, position, context)
}
@arrazyfathan
arrazyfathan / AdbCommands
Created August 10, 2023 04:13 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader