Browse Source

Added Messages to fragment alarm

ms_master_copie
Bastian Kohler 1 year ago
parent
commit
5df6b32fc3

+ 6
- 2
app/src/main/java/com/example/ueberwachungssystem/MainActivity.java View File

@@ -27,6 +27,9 @@ import com.example.ueberwachungssystem.Detection.DetectorService;

@ExperimentalGetImage
public class MainActivity extends AppCompatActivity {
//StringBuffer
private StringBuffer messageBuffer = new StringBuffer();

//Fragmente
private Fragment aktuellesFragment;
private Fragment1 fragment1;
@@ -164,7 +167,8 @@ public class MainActivity extends AppCompatActivity {
public void onDetection(@NonNull StringBuffer stringBuffer) {
Log.d("onDetection", stringBuffer.toString()); //Für oli hier Textview einbauen
num++;
zeigeFragment(fragment1.erstellen(stringBuffer.toString()));
messageBuffer = stringBuffer;
zeigeFragment(fragment1.erstellen(messageBuffer.toString()));
}
});
}
@@ -175,7 +179,7 @@ public class MainActivity extends AppCompatActivity {

public void onClickZeigeFragment1(View view) {
Button button = (Button) view;
zeigeFragment(fragment1.erstellen("Hier stehen dann die Alarme"));
zeigeFragment(fragment1.erstellen(messageBuffer.toString()));
}

public void onClickZeigeFragment2(View view) {

Loading…
Cancel
Save