diff --git a/app/build.gradle b/app/build.gradle
index 3e72e09..27b27c1 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -6,7 +6,7 @@ android {
compileSdkVersion 29
defaultConfig {
applicationId "io.github.chronosx88.yggdrasil"
- minSdkVersion 21
+ minSdkVersion 22
targetSdkVersion 29
versionCode 1
versionName "1.0"
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 4e5b87b..1080956 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -24,10 +24,8 @@
-
-
\ No newline at end of file
diff --git a/app/src/main/java/io/github/chronosx88/yggdrasil/MainActivity.kt b/app/src/main/java/io/github/chronosx88/yggdrasil/MainActivity.kt
index 49e3421..60b380a 100644
--- a/app/src/main/java/io/github/chronosx88/yggdrasil/MainActivity.kt
+++ b/app/src/main/java/io/github/chronosx88/yggdrasil/MainActivity.kt
@@ -4,48 +4,55 @@ import android.app.Activity
import android.content.Intent
import android.net.VpnService
import android.os.Bundle
-import android.widget.Button
+import android.util.Log
+import android.widget.RadioGroup
import androidx.appcompat.app.AppCompatActivity
class MainActivity : AppCompatActivity() {
- private var isYggStarted = false
+ companion object {
+ private const val TAG="Yggdrasil";
+ private const val VPN_REQUEST_CODE = 0x0F
+ }
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
+ val connectRadioGroup = findViewById(R.id.connectRadioGroup)
+ connectRadioGroup.setOnCheckedChangeListener(
+ RadioGroup.OnCheckedChangeListener { group, checkedId ->
+ when (checkedId) {
+ R.id.disconnectButton -> stopVpn()
+ R.id.connectButton -> startVpn()
+ else -> { // Note the block
+ //print("x is neither 1 nor 2")
+ }
+ }
+ })
+ }
- val connectButton = findViewById
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index 69b2233..be67cc1 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -1,6 +1,12 @@
- #008577
- #00574B
+ #555555
+ #343334
#D81B60
+ #ffffff
+ #83cf03
+ #343334
+ #555555
+ #666666
+ #777777
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 4bebd1e..6413abd 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1,4 +1,5 @@
Yggdrasil
Connect
+ Disconnect
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index e18f895..1c56072 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -1,7 +1,7 @@
-