File tree Expand file tree Collapse file tree
java/com/itsaky/androidide/adapters Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,21 +40,21 @@ constructor(val actions: List<MainScreenAction> = emptyList()) :
4040
4141 fun getAction (index : Int ) = actions[index]
4242
43- override fun onBindViewHolder (holder : VH , position : Int ) {
43+ override fun onBindViewHolder (holder : VH , position : Int ) {
4444 val action = getAction(index = position)
4545 val binding = holder.binding
4646
47- binding.root.apply {
48- setText(action.text)
49- setIconResource(action.icon)
50- setOnClickListener {
51- action.onClick?.invoke(action, it)
52- }
53- action.onLongClick?.let { onLongClick ->
54- setOnLongClickListener {
55- onLongClick(action, it)
47+ binding.actionButton.apply {
48+ setText(action.text)
49+ setIconResource(action.icon)
50+ setOnClickListener {
51+ action.onClick?.invoke(action, it)
52+ }
53+ action.onLongClick?.let { onLongClick ->
54+ setOnLongClickListener {
55+ onLongClick(action, it)
56+ }
5657 }
57- }
5858 }
59- }
59+ }
6060}
Original file line number Diff line number Diff line change 3434 android : layout_height =" 56dp"
3535 android : elevation =" 0dp"
3636 android : ellipsize =" end"
37+ android : id =" @+id/actionButton"
3738 android : singleLine =" true"
3839 android : textAlignment =" textStart"
3940 android : textColor =" ?attr/colorOnBackground"
You can’t perform that action at this time.
0 commit comments