pull/32/head
parent
fcdbc98d23
commit
634b989b3c
@ -1,2 +1,22 @@ |
||||
package io.legado.app.ui.changesource |
||||
|
||||
import android.content.Context |
||||
import io.legado.app.R |
||||
import io.legado.app.base.adapter.ItemViewHolder |
||||
import io.legado.app.base.adapter.SimpleRecyclerAdapter |
||||
import io.legado.app.data.entities.SearchBook |
||||
import kotlinx.android.synthetic.main.item_change_source.view.* |
||||
|
||||
|
||||
class ChangeSourceAdapter(context: Context) : SimpleRecyclerAdapter<SearchBook>(context, R.layout.item_change_source) { |
||||
|
||||
|
||||
override fun convert(holder: ItemViewHolder, item: SearchBook, payloads: MutableList<Any>) { |
||||
holder.itemView.apply { |
||||
tv_origin.text = item.originName |
||||
tv_last.text = item.latestChapterTitle |
||||
} |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,18 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
android:orientation="vertical"> |
||||
|
||||
<TextView |
||||
android:id="@+id/tv_origin" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:singleLine="true" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/tv_last" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:singleLine="true" /> |
||||
</LinearLayout> |
Loading…
Reference in new issue