From 0044cad2f67fbd67b2ab93725bd14836909099e3 Mon Sep 17 00:00:00 2001 From: gedoor Date: Fri, 7 Jun 2019 18:33:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../legado/app/ui/sourceedit/SourceEditAdapter.kt | 14 ++++++++++++-- app/src/main/res/layout/item_source_edit.xml | 11 +++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 app/src/main/res/layout/item_source_edit.xml 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