Created
November 20, 2020 10:10
-
-
Save pramonow/bd4bc937ed883c96da08a9d3449bc54b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DemoActivity : AppCompatActivity(){ | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_demo) | |
//now we creating adapter and passing in a lambda method | |
var demoAdapter = DemoAdapter{ item -> doClick(item) } | |
} | |
//creating method to make it look simpler | |
fun doClick(item:Any) { | |
//do things related to activity | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment