Skip to content

Instantly share code, notes, and snippets.

@ibrahim4851
Created May 22, 2021 11:46
Show Gist options
  • Save ibrahim4851/2154c67e857e383bf49cffc0900437e4 to your computer and use it in GitHub Desktop.
Save ibrahim4851/2154c67e857e383bf49cffc0900437e4 to your computer and use it in GitHub Desktop.
MainActivityVolley
private lateinit var getarray: Button
private lateinit var getobject: Button
private lateinit var postobject: Button
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
getarray = findViewById(R.id.getarray)
getobject = findViewById(R.id.getobject)
postobject = findViewById(R.id.postobject)
click()
}
fun click(){
getarray.setOnClickListener {
val intent = Intent(this, GetArray::class.java)
startActivity(intent)
}
getobject.setOnClickListener {
val intent = Intent(this, GetObject::class.java)
startActivity(intent)
}
postobject.setOnClickListener {
val intent = Intent(this, PostObject::class.java)
startActivity(intent)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment