Browse Source

Version 4.1 with new PopUpClass

ms_service_copie
Miguel Siebenhaar 1 year ago
parent
commit
5007623acc
1 changed files with 9 additions and 1 deletions
  1. 9
    1
      app/src/main/java/com/example/ueberwachungssystem/PopUpClass.java

+ 9
- 1
app/src/main/java/com/example/ueberwachungssystem/PopUpClass.java View File

@@ -15,6 +15,8 @@ public class PopUpClass {
PermissionRequest permission;
TextView PopUpText;

Button buttonEdit;


public PopUpClass(MainActivity mainActivity) {
this.mainActivity = mainActivity;
@@ -47,7 +49,7 @@ public class PopUpClass {

PopUpText = popupView.findViewById(R.id.titleText);

Button buttonEdit = popupView.findViewById(R.id.RechteAnfordern);
buttonEdit = popupView.findViewById(R.id.RechteAnfordern);
buttonEdit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -70,19 +72,25 @@ public class PopUpClass {
public void RechtePrüfen(){
StringBuilder Text = permission.rechtePruefen();
PopUpText.setText(Text);
buttonEdit.setVisibility(View.VISIBLE);

}
public void RechteAnfordern(){
permission.rechteAnfordern();
StringBuilder Text = permission.rechtePruefen();
PopUpText.setText(Text);

}
public void Sensoren(){
PopUpText.setText("Es können 3 verschiedene Sensoren verwendet werden \n -1. Beschleunigungssensor\n -2. Mikrofon\n -3. Kamera");
buttonEdit.setVisibility(View.GONE);
}
public void Impressum(){
PopUpText.setText("Die Ueberwachungsapp wurde im Rahmen eines Praktikums der TH-Nürnberg programmiert");
buttonEdit.setVisibility(View.GONE);
}
public void DetectionTotal(int num) {
PopUpText.setText("Total Detektions:" +num);
buttonEdit.setVisibility(View.GONE);
}
}

Loading…
Cancel
Save