-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathP8.kt
31 lines (27 loc) · 1.11 KB
/
P8.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
31
package com.example.myapplication
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.ImageButton
import android.widget.Toast
class MainActivity4 : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main4)
val ibtn1 = findViewById<ImageButton>(R.id.ibtn1)
val ibtn2 = findViewById<ImageButton>(R.id.ibtn2)
val ibtn3 = findViewById<ImageButton>(R.id.ibtn3)
val ibtn4 = findViewById<ImageButton>(R.id.ibtn4)
ibtn1.setOnClickListener(){
Toast.makeText(this,"Image button 1 Clicked !!!",Toast.LENGTH_SHORT).show()
}
ibtn2.setOnClickListener(){
Toast.makeText(this,"Image button 2 Clicked !!!",Toast.LENGTH_SHORT).show()
}
ibtn3.setOnClickListener(){
Toast.makeText(this,"Image button 3 Clicked !!!",Toast.LENGTH_SHORT).show()
}
ibtn4.setOnClickListener(){
Toast.makeText(this,"Image button 4 Clicked !!!",Toast.LENGTH_SHORT).show()
}
}
}