Commit 249bb7a9 authored by Kristof Wilhelm Heck's avatar Kristof Wilhelm Heck

Added Activitys and xmls for new eintrag case v0.1

Added functionality to switch between some activitys
parent 94d9c797
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
......
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
......
......@@ -9,6 +9,14 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".add_zeitraum">
</activity>
<activity android:name=".add_symptome">
</activity>
<activity android:name=".add_person">
</activity>
<activity android:name=".add_ort">
</activity>
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
......
package com.example.ce2coronatagebuch;
import android.content.Intent;
import android.view.View;
import android.widget.Button;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
public class MainActivity extends AppCompatActivity implements View.OnClickListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button buttonAddEintrag = (Button) findViewById(R.id.buttonAddEintrag);
buttonAddEintrag.setOnClickListener(this);
}
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.buttonAddEintrag:
Intent intentNewPerson = new Intent(this, add_person.class);
startActivity(intentNewPerson);
}
}
}
\ No newline at end of file
package com.example.ce2coronatagebuch;
import android.content.Intent;
import android.view.View;
import android.widget.Button;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class add_ort extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add_ort);
}
}
\ No newline at end of file
package com.example.ce2coronatagebuch;
import android.content.Intent;
import android.view.View;
import android.widget.Button;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class add_person extends AppCompatActivity implements View.OnClickListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add_person);
Button buttonAddPerson = (Button) findViewById(R.id.buttonAddPerson);
buttonAddPerson.setOnClickListener(this);
Button buttonAddSymptome = (Button) findViewById(R.id.buttonAddSymptome);
buttonAddSymptome.setOnClickListener(this);
Button buttonAddOrt2 = (Button) findViewById(R.id.buttonAddOrt2);
buttonAddOrt2.setOnClickListener(this);
}
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.buttonAddPerson:
Intent intentNewPerson = new Intent(this, add_person.class);
startActivity(intentNewPerson);
break;
case R.id.buttonAddSymptome:
Intent intentNewSymptome = new Intent(this, add_symptome.class);
startActivity(intentNewSymptome);
break;
case R.id.buttonAddOrt2:
Intent intentNewOrt = new Intent(this, add_ort.class);
startActivity(intentNewOrt);
break;
}
}
}
\ No newline at end of file
package com.example.ce2coronatagebuch;
import android.content.Intent;
import android.view.View;
import android.widget.Button;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class add_symptome extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add_symptome);
}
}
\ No newline at end of file
package com.example.ce2coronatagebuch;
import android.content.Intent;
import android.view.View;
import android.widget.Button;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class add_zeitraum extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add_zeitraum);
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".add_ort">
<Button
android:text="Zeit hinzufügen"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/buttonAddZeit"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent"
android:layout_marginBottom="184dp"/>
<TextView
android:text="add_ort"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView4"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent" android:layout_marginTop="162dp"
app:layout_constraintEnd_toEndOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".add_person">
<Button
android:text="Ort hinzufügen"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/buttonAddOrt2"
android:layout_marginTop="21dp"
app:layout_constraintTop_toBottomOf="@+id/buttonAddPerson" android:layout_marginEnd="2dp"
android:layout_marginRight="2dp" app:layout_constraintEnd_toEndOf="@+id/buttonAddPerson"/>
<Button
android:text="Symptome hinzufügen"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/buttonAddSymptome"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent"
android:layout_marginBottom="218dp"/>
<Button
android:text="Nächste Person"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/buttonAddPerson"
app:layout_constraintStart_toStartOf="@+id/buttonAddSymptome"
android:layout_marginTop="16dp" android:layout_marginLeft="22dp" android:layout_marginStart="22dp"
app:layout_constraintTop_toBottomOf="@+id/buttonAddSymptome"/>
<TextView
android:text="add_person"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView2"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent" android:layout_marginTop="123dp"
app:layout_constraintEnd_toEndOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".add_symptome">
<Button
android:text="Nächste Person"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/buttonAddPerson2"
app:layout_constraintTop_toBottomOf="@+id/textView3"
android:layout_marginBottom="26dp" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@+id/buttonAddOrt" app:layout_constraintStart_toStartOf="parent"/>
<TextView
android:text="add_symptome"
android:layout_width="101dp"
android:layout_height="0dp" android:id="@+id/textView3"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" android:layout_marginTop="136dp"
android:layout_marginBottom="284dp" app:layout_constraintBottom_toTopOf="@+id/buttonAddPerson2"/>
<Button
android:text="Ort hinzufügen"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/buttonAddOrt"
app:layout_constraintStart_toStartOf="@+id/buttonAddPerson2"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintTop_toBottomOf="@+id/buttonAddPerson2"
android:layout_marginBottom="164dp"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".add_zeitraum">
<Button
android:text="Fertisch!"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/buttonFertig"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent"
android:layout_marginBottom="189dp"/>
<TextView
android:text="add_zeitraum"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView5"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent" android:layout_marginTop="190dp"
app:layout_constraintEnd_toEndOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -7,12 +7,24 @@
android:layout_height="match_parent"
tools:context=".MainActivity">
<TextView
android:text="fck rona"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
android:layout_height="wrap_content" android:id="@+id/textView"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent" android:layout_marginTop="158dp"
app:layout_constraintEnd_toEndOf="parent"/>
<Button
android:text="Tagebuch"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/buttonGetTagebuch"
android:layout_marginEnd="16dp" android:layout_marginRight="16dp"
android:layout_marginBottom="13dp" app:layout_constraintEnd_toEndOf="@+id/buttonAddEintrag"
app:layout_constraintBottom_toTopOf="@+id/buttonAddEintrag"/>
<Button
android:text="Neuer Eintrag"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/buttonAddEintrag"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent"
android:layout_marginBottom="157dp"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment