Browse Source

Version 3 working

ms_service_copie
Miguel Siebenhaar 1 year ago
parent
commit
e54322e3e2

+ 32
- 7
app/src/main/java/com/example/ueberwachungssystem/MainActivity.java View File

import android.os.Bundle; import android.os.Bundle;
import android.os.IBinder; import android.os.IBinder;
import android.util.Log; import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.Toast;
import android.widget.ToggleButton; import android.widget.ToggleButton;


import com.example.ueberwachungssystem.Detection.Accelerometer; import com.example.ueberwachungssystem.Detection.Accelerometer;
} }
} }
}); });







}else{
Toast.makeText(getApplicationContext(),"Bitte Zugriffsrechte gewähren",Toast.LENGTH_SHORT).show();
}
}
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.options_menu, menu);
return true;
}
public boolean onOptionsItemSelected(MenuItem item) {
Toast.makeText(this, "Selected Item: " + item.getTitle(), Toast.LENGTH_SHORT).show();
PopUpClass popUpClass;
switch (item.getItemId()) {
case R.id.Rechteverwaltung:
popUpClass = new PopUpClass(MainActivity.this);
popUpClass.showPopupWindow(inputImageView);
popUpClass.RechtePrüfen();
return true;
case R.id.Sensoren:
popUpClass = new PopUpClass(MainActivity.this);
popUpClass.showPopupWindow(inputImageView);
popUpClass.Sensoren();
return true;
case R.id.Impressum:
popUpClass = new PopUpClass(MainActivity.this);
popUpClass.showPopupWindow(inputImageView);
popUpClass.Impressum();
return true;
default:
return super.onOptionsItemSelected(item);
} }
} }



Loading…
Cancel
Save