-
Notifications
You must be signed in to change notification settings - Fork 0
/
CanteenMain.kt
59 lines (42 loc) · 1.6 KB
/
CanteenMain.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package com.example.iot_assignment
import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.ImageView
import android.widget.TextView
import androidx.cardview.widget.CardView
class CanteenMain : AppCompatActivity() {
lateinit var module1: CardView
lateinit var module2: CardView
lateinit var module3: CardView
lateinit var module4: CardView
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_canteen_main)
module1 = findViewById(R.id.module1)
module2 = findViewById(R.id.module2)
module3 = findViewById(R.id.module3)
module1.setOnClickListener{
val intent = Intent(this, SmartEntrance::class.java)
startActivity(intent)
}
module2.setOnClickListener {
val intent = Intent(this, SeatCounter::class.java)
startActivity(intent)
}
module3.setOnClickListener {
val intent = Intent(this, SmartFireAlarm::class.java)
startActivity(intent)
}
// module4.setOnClickListener {
// val intent = Intent(this, OrderCalling::class.java)
// startActivity(intent)
// }
val toolbar: TextView = findViewById(R.id.toolbar_title)
toolbar.setText("Smart Canteen Module")
val back: ImageView = findViewById(R.id.arrow_back_icon)
back.setOnClickListener {
onBackPressed()
}
}
}