pull/32/head
gedoor 6 years ago
parent 50f620abaf
commit 0044cad2f6
  1. 14
      app/src/main/java/io/legado/app/ui/sourceedit/SourceEditAdapter.kt
  2. 11
      app/src/main/res/layout/item_source_edit.xml

@ -1,13 +1,17 @@
package io.legado.app.ui.sourceedit package io.legado.app.ui.sourceedit
import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import io.legado.app.R
class SourceEditAdapter : RecyclerView.Adapter<SourceEditAdapter.MyViewHolder>() { class SourceEditAdapter : RecyclerView.Adapter<SourceEditAdapter.MyViewHolder>() {
var sourceEditEntities:ArrayList<SourceEditEntity> = ArrayList()
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): MyViewHolder { 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) { override fun onBindViewHolder(holder: MyViewHolder, position: Int) {
@ -15,10 +19,16 @@ class SourceEditAdapter : RecyclerView.Adapter<SourceEditAdapter.MyViewHolder>()
} }
override fun getItemCount(): Int { 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 MyViewHolder(view: View) : RecyclerView.ViewHolder(view) {
} }
class SourceEditEntity {
var key:String?=null
var value:String?=null
var hint:String?=null
}
} }

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<io.legado.app.lib.theme.view.ATETextInputLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/textInputLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<io.legado.app.lib.theme.view.ATEEditText
android:id="@+id/editText"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</io.legado.app.lib.theme.view.ATETextInputLayout>
Loading…
Cancel
Save