-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
no hilt module needed, moved quick adapter to core_droidjet
- Loading branch information
ansh sachdeva
committed
Sep 11, 2021
1 parent
28e41b1
commit f359da9
Showing
11 changed files
with
32 additions
and
112 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
27 changes: 27 additions & 0 deletions
27
...roidjet/src/main/java/work/curioustools/curiousutils/core_droidjet/custom/QuickAdapter.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package work.curioustools.curiousutils.core_droidjet.custom | ||
|
||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import androidx.recyclerview.widget.RecyclerView | ||
|
||
//todo convert to vb// move to curiousutils | ||
class QuickAdapter<T> ( | ||
private val items:List<T>, | ||
private val layoutRes : Int, | ||
private val onBind: (itemView: View, item:T) -> Unit | ||
): RecyclerView.Adapter<QuickAdapter.QuickVH>() { | ||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): QuickVH { | ||
return QuickVH( | ||
LayoutInflater.from(parent.context).inflate(layoutRes, parent, false) | ||
) | ||
} | ||
|
||
override fun onBindViewHolder(holder: QuickVH, position: Int) { | ||
onBind.invoke(holder.itemView,items[position]) | ||
} | ||
|
||
override fun getItemCount() = items.size | ||
|
||
class QuickVH(v: View): RecyclerView.ViewHolder(v) | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
...ilt/src/main/java/work/curioustools/curiousutils/core_droidjet_hilt/BaseHiltActivityVB.kt
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
...ilt/src/main/java/work/curioustools/curiousutils/core_droidjet_hilt/BaseHiltFragmentVB.kt
This file was deleted.
Oops, something went wrong.
This file contains 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