MainActivity.kt 949 Bytes
Newer Older
Anon's avatar
Anon committed
1 2
package com.github.antweb.donkey

Anon's avatar
Anon committed
3
import android.content.Intent
Anon's avatar
Anon committed
4 5 6
import android.os.Bundle
import android.widget.Button
import android.widget.TextView
Anon's avatar
Anon committed
7
import androidx.appcompat.app.AppCompatActivity
Anon's avatar
Anon committed
8

Anon's avatar
Anon committed
9
private const val TAG = "MainActivity"
Anon's avatar
Anon committed
10

Anon's avatar
Anon committed
11
class MainActivity : AppCompatActivity() {
Anon's avatar
Anon committed
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26

    private lateinit var tvConnection: TextView
    private lateinit var tvValue: TextView
    private lateinit var buttonConnect: Button

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        tvValue = findViewById(R.id.text_value)
        tvConnection = findViewById(R.id.text_connection_status)
        tvConnection.text = "STATE_DISCONNECTED"

        buttonConnect = findViewById(R.id.button_connect)
        buttonConnect.setOnClickListener {
Anon's avatar
Anon committed
27 28 29
            val intent = Intent(this, ScanActivity::class.java)
            startActivity(intent)
        }
Anon's avatar
Anon committed
30 31
    }
}