diff --git a/MobileAuthApp/app/src/main/java/com/tarkvaraprojekt/mobileauthapp/MainActivity.kt b/MobileAuthApp/app/src/main/java/com/tarkvaraprojekt/mobileauthapp/MainActivity.kt
index bc93c57..6b4c940 100644
--- a/MobileAuthApp/app/src/main/java/com/tarkvaraprojekt/mobileauthapp/MainActivity.kt
+++ b/MobileAuthApp/app/src/main/java/com/tarkvaraprojekt/mobileauthapp/MainActivity.kt
@@ -4,6 +4,9 @@ import android.nfc.NfcAdapter
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
+import android.view.Menu
+import android.view.MenuItem
+import android.widget.Toast
import androidx.navigation.NavController
import androidx.navigation.fragment.NavHostFragment
import com.tarkvaraprojekt.mobileauthapp.databinding.ActivityMainBinding
@@ -17,8 +20,29 @@ class MainActivity : AppCompatActivity() {
val binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(binding.root)
+ setSupportActionBar(binding.toolbar)
+
val navHostFragment = supportFragmentManager.findFragmentById(R.id.nav_host_fragment) as NavHostFragment
navigationController = navHostFragment.navController
}
+ override fun onCreateOptionsMenu(menu: Menu?): Boolean {
+ menuInflater.inflate(R.menu.menu, menu)
+ return true
+ }
+
+ override fun onOptionsItemSelected(item: MenuItem) = when (item.itemId) {
+ R.id.menu_language_option -> {
+ Toast.makeText(this, getString(R.string.menu_action_unavailable), Toast.LENGTH_SHORT)
+ .show()
+ true
+ }
+ R.id.menu_settings_option -> {
+ Toast.makeText(this, getString(R.string.menu_action_unavailable), Toast.LENGTH_SHORT)
+ .show()
+ true
+ }
+ else -> super.onOptionsItemSelected(item)
+ }
+
}
\ No newline at end of file
diff --git a/MobileAuthApp/app/src/main/res/drawable/ic_baseline_language_24.xml b/MobileAuthApp/app/src/main/res/drawable/ic_baseline_language_24.xml
new file mode 100644
index 0000000..3f70646
--- /dev/null
+++ b/MobileAuthApp/app/src/main/res/drawable/ic_baseline_language_24.xml
@@ -0,0 +1,10 @@
+