diff --git a/software/android/app/src/main/java/com/rookiedev/hexapod/MainActivity.kt b/software/android/app/src/main/java/com/rookiedev/hexapod/MainActivity.kt index 3163833..2e7efbb 100644 --- a/software/android/app/src/main/java/com/rookiedev/hexapod/MainActivity.kt +++ b/software/android/app/src/main/java/com/rookiedev/hexapod/MainActivity.kt @@ -2,34 +2,45 @@ package com.rookiedev.hexapod import android.content.Intent import android.net.InetAddresses.isNumericAddress -import androidx.appcompat.app.AppCompatActivity import android.os.Bundle -import android.widget.Button -import android.widget.Toast -import com.google.android.material.textfield.TextInputEditText import android.text.Editable - import android.text.TextWatcher import android.text.method.LinkMovementMethod +import android.widget.Button import android.widget.TextView +import androidx.appcompat.app.AppCompatActivity +import com.google.android.material.textfield.TextInputEditText import com.google.android.material.textfield.TextInputLayout +import java.lang.String +import kotlin.CharSequence +import kotlin.Int +import kotlin.apply +import kotlin.toString class MainActivity : AppCompatActivity() { + private val SHAREDPREFSNAME = "com.rookiedev.hexapod_preferences" + private val SHAREDPREFSIP = "IP" + private val SHAREDPREFSPORT = "PORT" + + private lateinit var ipInput:TextInputEditText + private lateinit var portInput:TextInputEditText override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) - val ipInput = findViewById(R.id.ip_input) - val portInput = findViewById(R.id.port_input) + ipInput = findViewById(R.id.ip_input) + portInput = findViewById(R.id.port_input) val buttonConnect = findViewById