pull/36/head
kunfei 5 years ago
parent 89512c0db8
commit 0d127074c9
  1. 4
      app/src/main/java/io/legado/app/ui/rss/source/manage/RssSourceAdapter.kt
  2. 2
      app/src/main/res/layout/item_rss_source.xml

@ -6,13 +6,17 @@ import io.legado.app.base.adapter.ItemViewHolder
import io.legado.app.base.adapter.SimpleRecyclerAdapter import io.legado.app.base.adapter.SimpleRecyclerAdapter
import io.legado.app.data.entities.RssSource import io.legado.app.data.entities.RssSource
import io.legado.app.help.ItemTouchCallback import io.legado.app.help.ItemTouchCallback
import kotlinx.android.synthetic.main.item_rss_source.view.*
class RssSourceAdapter(context: Context, val callBack: CallBack) : class RssSourceAdapter(context: Context, val callBack: CallBack) :
SimpleRecyclerAdapter<RssSource>(context, R.layout.item_rss_source), SimpleRecyclerAdapter<RssSource>(context, R.layout.item_rss_source),
ItemTouchCallback.OnItemTouchCallbackListener { ItemTouchCallback.OnItemTouchCallbackListener {
override fun convert(holder: ItemViewHolder, item: RssSource, payloads: MutableList<Any>) { override fun convert(holder: ItemViewHolder, item: RssSource, payloads: MutableList<Any>) {
with(holder.itemView) {
cb_source.text = item.sourceName
}
} }

@ -9,7 +9,7 @@
android:padding="16dp"> android:padding="16dp">
<io.legado.app.lib.theme.view.ATECheckBox <io.legado.app.lib.theme.view.ATECheckBox
android:id="@+id/cb_book_source" android:id="@+id/cb_source"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"

Loading…
Cancel
Save