Advertisement
Guest User

Untitled

a guest
Jul 31st, 2021
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 0.37 KB | None | 0 0
  1. class Button : Clickable, Focusable {
  2.     override fun click() = println("I was clicked!")
  3.     override fun showOff() {
  4.         super<Clickable>.showOff()
  5.         super<Focusable>.showOff()
  6.     }
  7. }
  8.  
  9. fun main() {
  10.     Button().showOff()
  11.     Button().click()
  12.     Button().setFocus(false)
  13.  
  14.     val b = Button()
  15.     b.showOff()
  16.     b.click()
  17.     b.setFocus(false)
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement