pull/32/head
kunfei 5 years ago
parent 5b65702b26
commit ffdbf91b3c
  1. 14
      app/src/main/java/io/legado/app/ui/main/findbook/FindBookAdapter.kt

@ -74,6 +74,13 @@ class FindBookAdapter(private val scope: CoroutineScope, val callBack: CallBack)
val tv = LayoutInflater.from(context) val tv = LayoutInflater.from(context)
.inflate(R.layout.item_text, gl_child, false) .inflate(R.layout.item_text, gl_child, false)
tv.text_view.text = kind.title tv.text_view.text = kind.title
tv.text_view.onClick {
callBack.openExplore(
bookSource.bookSourceUrl,
kind.title,
kind.url
)
}
val rowSpecs = GridLayout.spec(rowNum, 1.0f) val rowSpecs = GridLayout.spec(rowNum, 1.0f)
val colSpecs = GridLayout.spec(columnNum, 1.0f) val colSpecs = GridLayout.spec(columnNum, 1.0f)
val params = GridLayout.LayoutParams(rowSpecs, colSpecs) val params = GridLayout.LayoutParams(rowSpecs, colSpecs)
@ -84,13 +91,6 @@ class FindBookAdapter(private val scope: CoroutineScope, val callBack: CallBack)
columnNum = 0 columnNum = 0
rowNum++ rowNum++
} }
tv.onClick {
callBack.openExplore(
bookSource.bookSourceUrl,
kind.title,
kind.url
)
}
} }
} }
}.onFinally { }.onFinally {

Loading…
Cancel
Save