-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathViewHolder.kt
30 lines (27 loc) · 978 Bytes
/
ViewHolder.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package com.example.theplanning1
import android.view.View
import android.widget.TextView
import androidx.recyclerview.widget.ItemTouchHelper
import androidx.recyclerview.widget.RecyclerView
import kotlinx.android.synthetic.main.plan_do.*
import kotlinx.android.synthetic.main.scroll_row.view.*
class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
//メモ
var memo:TextView? = null
//登録時刻
var time:TextView? = null
//金額表示View
var accounting_money:TextView? = null
init {
//ビューホルダーのプロパティとレイアウトのViewの対応
memo = itemView.memo
time = itemView.time
accounting_money = itemView.accounting_money
}
//会計の時以外は金額表示するLinearLayoutを削除する
fun setVisible(boolean: Boolean){
if(!boolean){
itemView.accounting_layout.visibility = View.GONE
}
}
}