Version 3 working
This commit is contained in:
parent
edcf555b5b
commit
e54322e3e2
@ -12,8 +12,11 @@ import android.content.ServiceConnection;
|
|||||||
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;
|
||||||
@ -85,13 +88,35 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}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…
x
Reference in New Issue
Block a user