Better HN
topnewbestaskshowjobs
Log inSign up

ibrahimyilmaz7

6 karma · joined Aug 10, 2020 (6y ago) · 8 submissions

Submissions

comment 6y ago · link · parent

Hi Android Fellas, pagingDataAdapterOf builder function for PagingDataAdapter,which is alpha now, has been introduced in the version 1.2.0 of kiel. github: https://github.com/ibrahimyilmaz/kiel

Example usage: ```Kotlin private val adapter = pagingDataAdapterOf<EntityListItem> { diff( areItemsTheSame = { old, new -> old.entityData.id == new.entityData.id }, areContentsTheSame = { old, new -> old == new } ) register( layoutResource = R.layout.item_entity, viewHolder = ::EntityListItemViewHolder, onBindBindViewHolder = { viewHolder, _, item -> viewHolder.itemView.setOnClickListener { viewModel.select(item) } viewHolder.binding.entityTitleTextView.text = item.title

                 viewHolder.binding.entityRemoveRelationAction.isVisible = item.isRemoveAvailable
                 if (item.isRemoveAvailable) {
                     viewHolder.binding.entityRemoveRelationAction.setOnClickListener {
                         viewModel.removeRelation(item)
                     }
                 }
             }
         )
     }
``` Any feedback, idea or PR is always welcome Sincerely Ibra

2.

`pagingDataAdapterOf` builder function for `PagingDataAdapter` in Kiel 1.2.0(github.com ↗)

1 points · by ibrahimyilmaz7 · 6y ago · 1 comment

comment 6y ago · link · parent

Let's build better and clean recycler view adapter with Kiel.

https://medium.com/@cs.ibrahimyilmaz/build-better-and-clean-...

4.

Build Better RecyclerView Adapter with Kiel(github.com ↗)

1 points · by ibrahimyilmaz7 · 6y ago · 1 comment

comment 6y ago · link · parent

Kiel ist eine schöne stadt und die gefällt mir!

comment 6y ago · link · parent

Agree with you! and also having unnecessary delegation for simple things! So that's why there is Kiel. Any review/issue/PR are welcome.

comment 6y ago · link · parent

Kiel is a RecyclerView.Adapter with a minimalist and convenient Kotlin DSL which provides utility on top of Android's normal RecyclerView.Adapter.

8.

Show HN: Kiel – Minimalist Kotlin DSL for RecyclerView.Adapter(github.com ↗)

18 points · by ibrahimyilmaz7 · 6y ago · 7 comments