Skip to content

Commit

Permalink
no hilt module needed, moved quick adapter to core_droidjet
Browse files Browse the repository at this point in the history
  • Loading branch information
ansh sachdeva committed Sep 11, 2021
1 parent 28e41b1 commit f359da9
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 112 deletions.
1 change: 0 additions & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ buildscript {
compileSdkVersion = 30
targetSdkVersion = 30
minSdkVersion = 21
versionCode = 16
versionName = "2021.09.16" //VERSION_NAME: YYYY.MM.VERSION_CODE
versionCode = 17
versionName = "2021.09.17" //VERSION_NAME: YYYY.MM.VERSION_CODE
groupId = "work.curioustools.curiousUtils"


Expand Down
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)
}
1 change: 0 additions & 1 deletion core_droidjet_hilt/.gitignore

This file was deleted.

21 changes: 0 additions & 21 deletions core_droidjet_hilt/build.gradle

This file was deleted.

Empty file.
21 changes: 0 additions & 21 deletions core_droidjet_hilt/proguard-rules.pro

This file was deleted.

5 changes: 0 additions & 5 deletions core_droidjet_hilt/src/main/AndroidManifest.xml

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 3 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ include ':core_droidjet'
include ':core_jdk'
include ':third_party_exoplayer'
include ':third_party_network'
include ':core_droidjet_hilt'
//todo move to main package for easier access:
// lib::all: for all libraries
// lib::core for core droidjet and core jdk

0 comments on commit f359da9

Please sign in to comment.