diff --git a/app/src/main/java/io/legado/app/ui/sourceedit/SourceEditAdapter.kt b/app/src/main/java/io/legado/app/ui/sourceedit/SourceEditAdapter.kt index 58102960b..6c468b9be 100644 --- a/app/src/main/java/io/legado/app/ui/sourceedit/SourceEditAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/sourceedit/SourceEditAdapter.kt @@ -1,13 +1,17 @@ package io.legado.app.ui.sourceedit +import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView +import io.legado.app.R class SourceEditAdapter : RecyclerView.Adapter() { + var sourceEditEntities:ArrayList = ArrayList() + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): MyViewHolder { - TODO("not implemented") //To change body of created functions use File | Settings | File Templates. + return MyViewHolder(LayoutInflater.from(parent.context).inflate(R.layout.item_source_edit, parent, false)) } override fun onBindViewHolder(holder: MyViewHolder, position: Int) { @@ -15,10 +19,16 @@ class SourceEditAdapter : RecyclerView.Adapter() } override fun getItemCount(): Int { - TODO("not implemented") //To change body of created functions use File | Settings | File Templates. + return sourceEditEntities.size } class MyViewHolder(view: View) : RecyclerView.ViewHolder(view) { } + + class SourceEditEntity { + var key:String?=null + var value:String?=null + var hint:String?=null + } } \ No newline at end of file diff --git a/app/src/main/res/layout/item_source_edit.xml b/app/src/main/res/layout/item_source_edit.xml new file mode 100644 index 000000000..8db3ee929 --- /dev/null +++ b/app/src/main/res/layout/item_source_edit.xml @@ -0,0 +1,11 @@ + + + + + \ No newline at end of file