[+] Start activity on menu click
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
package com.welie.blessedexample
|
||||
package org.hydev.wearsync
|
||||
|
||||
import android.Manifest
|
||||
import android.annotation.SuppressLint
|
||||
@@ -25,7 +25,6 @@ import kotlinx.coroutines.flow.consumeAsFlow
|
||||
import org.hydev.wearsync.bles.BluetoothHandler
|
||||
import org.hydev.wearsync.bles.ObservationUnit
|
||||
import org.hydev.wearsync.databinding.ActivityScanBinding
|
||||
import org.hydev.wearsync.snack
|
||||
import timber.log.Timber
|
||||
import java.text.DateFormat
|
||||
import java.text.SimpleDateFormat
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.hydev.wearsync
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
@@ -40,6 +41,7 @@ class MainActivity : AppCompatActivity()
|
||||
{
|
||||
// Inflate the menu; this adds items to the action bar if it is present.
|
||||
menuInflater.inflate(R.menu.menu_main, menu)
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -52,7 +54,7 @@ class MainActivity : AppCompatActivity()
|
||||
{
|
||||
R.id.action_settings -> true
|
||||
R.id.action_scan -> {
|
||||
|
||||
startActivity(Intent(this, ActivityScan::class.java))
|
||||
true
|
||||
}
|
||||
else -> super.onOptionsItemSelected(item)
|
||||
|
||||
Reference in New Issue
Block a user