Browse Source

Version 5.1 working with Fragment 3

ms_master_copie
Miguel Siebenhaar 1 year ago
parent
commit
741b46e713

+ 3
- 1
app/src/main/java/com/example/ueberwachungssystem/MainActivity.java View File

import com.example.ueberwachungssystem.Detection.DetectorService; import com.example.ueberwachungssystem.Detection.DetectorService;
import com.example.ueberwachungssystem.Fragments.Fragment3; import com.example.ueberwachungssystem.Fragments.Fragment3;


import java.util.OptionalInt;

@ExperimentalGetImage @ExperimentalGetImage
public class MainActivity extends AppCompatActivity implements Fragment3.OnImageViewReadyListener{ public class MainActivity extends AppCompatActivity implements Fragment3.OnImageViewReadyListener{
//StringBuffer //StringBuffer
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setTitle(this.getClass().getSimpleName());
setTitle("Supervision");
setContentView(R.layout.activity_main); setContentView(R.layout.activity_main);
Auswahl = findViewById(R.id.textAuswahl); Auswahl = findViewById(R.id.textAuswahl);
Auswahl.setText(auswahltext); Auswahl.setText(auswahltext);

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



} }
public void Sensoren(){ public void Sensoren(){
PopUpText.setText("Es können 3 verschiedene Sensoren verwendet werden \n -1. Beschleunigungssensor\n -2. Mikrofon\n -3. Kamera");
PopUpText.setText("Es können 3 verschiedene Sensoren verwendet werden \n -1. Beschleunigungssensor\n -2. Mikrofon\n -3. Kamera\n Diese können sowohl einzeln als auch alle zusammen verwendet werden");
buttonEdit.setVisibility(View.GONE); buttonEdit.setVisibility(View.GONE);
} }
public void Impressum(){ public void Impressum(){
PopUpText.setText("Die Ueberwachungsapp wurde im Rahmen eines Praktikums der TH-Nürnberg programmiert");
PopUpText.setText("Die Ueberwachungsapp wurde im Rahmen eines Praktikums der TH-Nürnberg programmiert \n Von: \n -Kohler Bastian\n -Kleinecke Oliver\n -Market Leon\n -Siebenhaar Miguel\n -Wolz Tobias ");
buttonEdit.setVisibility(View.GONE); buttonEdit.setVisibility(View.GONE);
} }
public void DetectionTotal(int num) { public void DetectionTotal(int num) {

+ 1
- 1
app/src/main/res/layout/activity_main.xml View File

android:layout_alignBottom="@+id/btnAufnahmen" android:layout_alignBottom="@+id/btnAufnahmen"
android:layout_toRightOf="@id/btnAufnahmen" android:layout_toRightOf="@id/btnAufnahmen"
android:layout_marginLeft="15dp" android:layout_marginLeft="15dp"
android:text="Life Vorschau"
android:text="Live Video"
android:onClick="onClickZeigeFragment3"/> android:onClick="onClickZeigeFragment3"/>


<FrameLayout <FrameLayout

+ 4
- 5
app/src/main/res/layout/fragment3.xml View File

<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:id="@+id/Video" android:id="@+id/Video"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_weight="1"
android:rotation="90"> android:rotation="90">
</ImageView> </ImageView>
<ImageView <ImageView
android:id="@+id/Video2" android:id="@+id/Video2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/Video"
android:layout_marginTop="70dp"
android:layout_weight="1"
android:rotation="-90"> android:rotation="-90">
</ImageView> </ImageView>


</RelativeLayout>
</LinearLayout>

+ 3
- 1
app/src/main/res/layout/popup_window.xml View File

android:paddingLeft="10dp" android:paddingLeft="10dp"
android:paddingRight="10dp" android:paddingRight="10dp"
android:gravity="center" android:gravity="center"
android:background="#A5ACB2">
android:background="#010C49">


<TextView <TextView
android:id="@+id/titleText" android:id="@+id/titleText"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="20sp" android:textSize="20sp"
android:textStyle="italic" android:textStyle="italic"
android:textColor="@color/white"
android:padding="10dp"/> android:padding="10dp"/>


<Button <Button
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:backgroundTint="@color/purple_500"
android:text="Rechte Anfordern" /> android:text="Rechte Anfordern" />





Loading…
Cancel
Save