diff --git a/app/src/main/java/com/mylloon/mobidl/MainActivity.kt b/app/src/main/java/com/mylloon/mobidl/MainActivity.kt index 5fe484f..5996602 100644 --- a/app/src/main/java/com/mylloon/mobidl/MainActivity.kt +++ b/app/src/main/java/com/mylloon/mobidl/MainActivity.kt @@ -2,20 +2,26 @@ package com.mylloon.mobidl import android.Manifest +import android.annotation.SuppressLint import android.content.Context +import android.content.Intent +import android.content.SharedPreferences import android.content.pm.PackageManager -import androidx.appcompat.app.AppCompatActivity import android.os.Bundle +import android.os.Handler +import android.os.Looper +import android.text.Editable +import android.text.TextWatcher +import android.view.Menu +import android.view.MenuItem import android.widget.Button import android.widget.EditText -import android.text.Editable - -import android.text.TextWatcher -import android.view.MenuItem -import android.view.Menu import android.widget.Toast +import androidx.appcompat.app.AppCompatActivity import androidx.core.content.ContextCompat -import android.content.SharedPreferences +import android.content.pm.PackageInfo +import android.net.Uri +import android.widget.TextView class MainActivity : AppCompatActivity() { @@ -30,7 +36,7 @@ class MainActivity : AppCompatActivity() { companion object { private var instance: MainActivity? = null - fun applicationContext() : Context { + fun applicationContext(): Context { return instance!!.applicationContext } } @@ -44,44 +50,6 @@ class MainActivity : AppCompatActivity() { super.onCreate(savedInstanceState) prefs = getSharedPreferences("com.mylloon.MobiDL", MODE_PRIVATE) - fun loginPage() { - setContentView(R.layout.activity_login) // show login page - - val userInput = findViewById(R.id.usernameInput) - val passwordInput = findViewById(R.id.passwordInput) - val buttonInput = findViewById