add login and board_list #26

Manually merged
norangebit merged 38 commits from feature_integrate_login into develop 2020-01-14 19:53:09 +00:00
Showing only changes of commit 2b060f7d38 - Show all commits

View File

@ -1,6 +1,7 @@
package it.unisannio.ding.ids.wedroid.app.view.adapter
import android.content.Context
import android.content.Intent
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
@ -33,14 +34,21 @@ class BoardsListAdapter internal constructor(
override fun onBindViewHolder(holder: BoardViewHolder, position: Int) {
val board = boards[position]
holder.itemView.setOnClickListener {
// TODO start board activity
}
holder.boardTitle.text = board.title
holder.itemView.setOnClickListener {
val intent = Intent(it.context, TODO())
intent.putExtra(BOARD_ID, board.id)
it.context.startActivity(intent)
}
}
internal fun setBoards(boards: List<Board>) {
this.boards = boards
notifyDataSetChanged()
}
companion object {
const val BOARD_ID = "BOARD_ID"
}
}