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



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

//Fragmente //Fragmente
private Fragment aktuellesFragment; private Fragment aktuellesFragment;
private Fragment1 fragment1; private Fragment1 fragment1;
public void onDetection(@NonNull StringBuffer stringBuffer) { public void onDetection(@NonNull StringBuffer stringBuffer) {
Log.d("onDetection", stringBuffer.toString()); //Für oli hier Textview einbauen Log.d("onDetection", stringBuffer.toString()); //Für oli hier Textview einbauen
num++; num++;
zeigeFragment(fragment1.erstellen(stringBuffer.toString()));
messageBuffer = stringBuffer;
zeigeFragment(fragment1.erstellen(messageBuffer.toString()));
} }
}); });
} }


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


public void onClickZeigeFragment2(View view) { public void onClickZeigeFragment2(View view) {

Loading…
Cancel
Save