diff --git a/APED/.idea/checkstyle-idea.xml b/APED/.idea/checkstyle-idea.xml
new file mode 100644
index 0000000..a1fd576
--- /dev/null
+++ b/APED/.idea/checkstyle-idea.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/APED/.idea/checkstyleidea-libs/readme.txt b/APED/.idea/checkstyleidea-libs/readme.txt
new file mode 100644
index 0000000..4b1560a
--- /dev/null
+++ b/APED/.idea/checkstyleidea-libs/readme.txt
@@ -0,0 +1,6 @@
+This folder contains libraries copied from the "APED" project.
+It is managed by the CheckStyle-IDEA IDE plugin.
+Do not modify this folder while the IDE is running.
+When the IDE is stopped, you may delete this folder at any time. It will be recreated as needed.
+In order to prevent the CheckStyle-IDEA IDE plugin from creating this folder,
+uncheck the "Copy libraries from project directory" option in the CheckStyle-IDEA settings dialog.
diff --git a/APED/.idea/codeStyles/Project.xml b/APED/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..4bec4ea
--- /dev/null
+++ b/APED/.idea/codeStyles/Project.xml
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ xmlns:android
+
+ ^$
+
+
+
+
+
+
+
+
+ xmlns:.*
+
+ ^$
+
+
+ BY_NAME
+
+
+
+
+
+
+ .*:id
+
+ http://schemas.android.com/apk/res/android
+
+
+
+
+
+
+
+
+ .*:name
+
+ http://schemas.android.com/apk/res/android
+
+
+
+
+
+
+
+
+ name
+
+ ^$
+
+
+
+
+
+
+
+
+ style
+
+ ^$
+
+
+
+
+
+
+
+
+ .*
+
+ ^$
+
+
+ BY_NAME
+
+
+
+
+
+
+ .*
+
+ http://schemas.android.com/apk/res/android
+
+
+ ANDROID_ATTRIBUTE_ORDER
+
+
+
+
+
+
+ .*
+
+ .*
+
+
+ BY_NAME
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/APED/.idea/codeStyles/codeStyleConfig.xml b/APED/.idea/codeStyles/codeStyleConfig.xml
new file mode 100644
index 0000000..a55e7a1
--- /dev/null
+++ b/APED/.idea/codeStyles/codeStyleConfig.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/APED/app/src/main/java/com/example/aped/MainActivity.java b/APED/app/src/main/java/com/example/aped/MainActivity.java
index 33a481f..30badad 100644
--- a/APED/app/src/main/java/com/example/aped/MainActivity.java
+++ b/APED/app/src/main/java/com/example/aped/MainActivity.java
@@ -2,13 +2,12 @@ package com.example.aped;
import android.os.Bundle;
import android.view.MenuItem;
-import android.view.View;
+
import android.view.Menu;
-import android.widget.Button;
import android.widget.Toast;
-import com.google.android.material.floatingactionbutton.FloatingActionButton;
-import com.google.android.material.snackbar.Snackbar;
+import com.example.aped.communication.IXML;
+import com.example.aped.communication.TestXML;
import com.google.android.material.navigation.NavigationView;
import androidx.annotation.NonNull;
@@ -21,9 +20,10 @@ import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
public class MainActivity extends AppCompatActivity {
-
+ /** was soll angezeigt werden in Navigation.*/
private AppBarConfiguration mAppBarConfiguration;
-
+ /** zur Verwendung von xml anstatt der direkten Einbindung.*/
+ private IXML xml;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -36,13 +36,16 @@ public class MainActivity extends AppCompatActivity {
// Passing each menu ID as a set of Ids because each
// menu should be considered as top level destinations.
mAppBarConfiguration = new AppBarConfiguration.Builder(
- R.id.nav_all_IOs, R.id.nav_your_IOs, R.id.nav_slideshow)
+ R.id.nav_all_IOs, R.id.nav_your_IOs)
.setDrawerLayout(drawer)
.build();
- NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
- NavigationUI.setupActionBarWithNavController(this, navController, mAppBarConfiguration);
+ NavController navController = Navigation.findNavController(this,
+ R.id.nav_host_fragment);
+ NavigationUI.setupActionBarWithNavController(this,
+ navController, mAppBarConfiguration);
NavigationUI.setupWithNavController(navigationView, navController);
+ xml = new TestXML();
}
@Override
@@ -54,29 +57,35 @@ public class MainActivity extends AppCompatActivity {
@Override
public boolean onSupportNavigateUp() {
- NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
+ NavController navController = Navigation.findNavController(this,
+ R.id.nav_host_fragment);
return NavigationUI.navigateUp(navController, mAppBarConfiguration)
|| super.onSupportNavigateUp();
}
-
+ /**was sollbeit click auf den jeweiligen itembutton passieren.*/
@Override
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
- switch (item.getItemId()){
+ switch (item.getItemId()) {
case R.id.action_settings:
- Toast.makeText(this,"Settings",Toast.LENGTH_SHORT).show();
+ Toast.makeText(this, "Settings",
+ Toast.LENGTH_SHORT).show();
return true;
case R.id.action_adjust_xml:
- Toast.makeText(this,"Adjust .xml",Toast.LENGTH_SHORT).show();
+ Toast.makeText(this, "Adjust .xml",
+ Toast.LENGTH_SHORT).show();
return true;
case R.id.action_download_xml:
- Toast.makeText(this,"Download .xml",Toast.LENGTH_SHORT).show();
+ Toast.makeText(this, "Download .xml",
+ Toast.LENGTH_SHORT).show();
return true;
case R.id.action_upload_xml:
- Toast.makeText(this,"Upload .xml",Toast.LENGTH_SHORT).show();
+ Toast.makeText(this, "Upload .xml",
+ Toast.LENGTH_SHORT).show();
+ xml.upload();
return true;
default:
return super.onOptionsItemSelected(item);
}
}
-}
\ No newline at end of file
+}
diff --git a/APED/app/src/main/java/com/example/aped/communication/IXML.java b/APED/app/src/main/java/com/example/aped/communication/IXML.java
new file mode 100644
index 0000000..69f1cfc
--- /dev/null
+++ b/APED/app/src/main/java/com/example/aped/communication/IXML.java
@@ -0,0 +1,9 @@
+package com.example.aped.communication;
+
+public interface IXML {
+ /** dowload er XML.*/
+ int download();
+ /** upload er XML.*/
+ int upload();
+
+}
diff --git a/APED/app/src/main/java/com/example/aped/communication/TestXML.java b/APED/app/src/main/java/com/example/aped/communication/TestXML.java
new file mode 100644
index 0000000..79c3f58
--- /dev/null
+++ b/APED/app/src/main/java/com/example/aped/communication/TestXML.java
@@ -0,0 +1,14 @@
+package com.example.aped.communication;
+
+public class TestXML implements IXML {
+ /** was soll bei download getan werden.*/
+ @Override
+ public int download() {
+ return 0;
+ }
+ /** was soll bei upload getan werden.*/
+ @Override
+ public int upload() {
+ return 0;
+ }
+}
diff --git a/APED/app/src/main/java/com/example/aped/communication/package-info.java b/APED/app/src/main/java/com/example/aped/communication/package-info.java
new file mode 100644
index 0000000..ec0cc07
--- /dev/null
+++ b/APED/app/src/main/java/com/example/aped/communication/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * package for the communication.
+ * */
+package com.example.aped.communication;
diff --git a/APED/app/src/main/java/com/example/aped/package-info.java b/APED/app/src/main/java/com/example/aped/package-info.java
new file mode 100644
index 0000000..3ac50c8
--- /dev/null
+++ b/APED/app/src/main/java/com/example/aped/package-info.java
@@ -0,0 +1,5 @@
+/**
+ * Package communication ui and main.
+ * */
+package com.example.aped;
+
diff --git a/APED/app/src/main/java/com/example/aped/ui/all_IOs/All_IOs_Fragment.java b/APED/app/src/main/java/com/example/aped/ui/all_IOs/AllIOsFragment.java
similarity index 76%
rename from APED/app/src/main/java/com/example/aped/ui/all_IOs/All_IOs_Fragment.java
rename to APED/app/src/main/java/com/example/aped/ui/all_IOs/AllIOsFragment.java
index c150c30..27d0f0d 100644
--- a/APED/app/src/main/java/com/example/aped/ui/all_IOs/All_IOs_Fragment.java
+++ b/APED/app/src/main/java/com/example/aped/ui/all_IOs/AllIOsFragment.java
@@ -14,17 +14,19 @@ import androidx.lifecycle.ViewModelProvider;
import com.example.aped.R;
-public class All_IOs_Fragment extends Fragment {
+public class AllIOsFragment extends Fragment {
- private All_IOs_ViewModel allIOsViewModel;
+ private AllIOsViewModel allIOsViewModel;
public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
allIOsViewModel =
- new ViewModelProvider(this).get(All_IOs_ViewModel.class);
- View root = inflater.inflate(R.layout.fragment_all_ios, container, false);
+ new ViewModelProvider(this).get(AllIOsViewModel.class);
+ View root = inflater.inflate(R.layout.fragment_all_ios, container,
+ false);
final TextView textView = root.findViewById(R.id.text_all_IOs);
- allIOsViewModel.getText().observe(getViewLifecycleOwner(), new Observer() {
+ allIOsViewModel.getText().observe(getViewLifecycleOwner(),
+ new Observer() {
@Override
public void onChanged(@Nullable String s) {
textView.setText(s);
@@ -32,4 +34,4 @@ public class All_IOs_Fragment extends Fragment {
});
return root;
}
-}
\ No newline at end of file
+}
diff --git a/APED/app/src/main/java/com/example/aped/ui/all_IOs/All_IOs_ViewModel.java b/APED/app/src/main/java/com/example/aped/ui/all_IOs/AllIOsViewModel.java
similarity index 65%
rename from APED/app/src/main/java/com/example/aped/ui/all_IOs/All_IOs_ViewModel.java
rename to APED/app/src/main/java/com/example/aped/ui/all_IOs/AllIOsViewModel.java
index 4c3bcb8..e94a00c 100644
--- a/APED/app/src/main/java/com/example/aped/ui/all_IOs/All_IOs_ViewModel.java
+++ b/APED/app/src/main/java/com/example/aped/ui/all_IOs/AllIOsViewModel.java
@@ -4,16 +4,17 @@ import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
-public class All_IOs_ViewModel extends ViewModel {
-
+public class AllIOsViewModel extends ViewModel {
+ /** .*/
private MutableLiveData mText;
-
- public All_IOs_ViewModel() {
+ /** Text Ausgabe.*/
+ public AllIOsViewModel() {
mText = new MutableLiveData<>();
- mText.setValue("Anzeige aller Mess & Sollwertvorgaben bestimmt durch die xml");
+ mText.setValue("Anzeige aller Mess & Sollwertvorgaben bestimmt durch"
+ + " die xml");
}
-
+ /** Rückgabe des Textes.*/
public LiveData getText() {
return mText;
}
-}
\ No newline at end of file
+}
diff --git a/APED/app/src/main/java/com/example/aped/ui/all_IOs/package-info.java b/APED/app/src/main/java/com/example/aped/ui/all_IOs/package-info.java
new file mode 100644
index 0000000..5e8ac74
--- /dev/null
+++ b/APED/app/src/main/java/com/example/aped/ui/all_IOs/package-info.java
@@ -0,0 +1,5 @@
+/**
+ * Package for the IO user interface.
+ * */
+package com.example.aped.ui.all_IOs;
+
diff --git a/APED/app/src/main/java/com/example/aped/ui/package-info.java b/APED/app/src/main/java/com/example/aped/ui/package-info.java
new file mode 100644
index 0000000..ee1fb49
--- /dev/null
+++ b/APED/app/src/main/java/com/example/aped/ui/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * Package for the user interface.
+ * */
+package com.example.aped.ui;
diff --git a/APED/app/src/main/java/com/example/aped/ui/slideshow/SlideshowFragment.java b/APED/app/src/main/java/com/example/aped/ui/slideshow/SlideshowFragment.java
deleted file mode 100644
index 6d57de1..0000000
--- a/APED/app/src/main/java/com/example/aped/ui/slideshow/SlideshowFragment.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.example.aped.ui.slideshow;
-
-import android.os.Bundle;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.TextView;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.fragment.app.Fragment;
-import androidx.lifecycle.Observer;
-import androidx.lifecycle.ViewModelProvider;
-
-import com.example.aped.R;
-
-public class SlideshowFragment extends Fragment {
-
- private SlideshowViewModel slideshowViewModel;
-
- public View onCreateView(@NonNull LayoutInflater inflater,
- ViewGroup container, Bundle savedInstanceState) {
- slideshowViewModel =
- new ViewModelProvider(this).get(SlideshowViewModel.class);
- View root = inflater.inflate(R.layout.fragment_slideshow, container, false);
- final TextView textView = root.findViewById(R.id.text_slideshow);
- slideshowViewModel.getText().observe(getViewLifecycleOwner(), new Observer() {
- @Override
- public void onChanged(@Nullable String s) {
- textView.setText(s);
- }
- });
- return root;
- }
-}
\ No newline at end of file
diff --git a/APED/app/src/main/java/com/example/aped/ui/slideshow/SlideshowViewModel.java b/APED/app/src/main/java/com/example/aped/ui/slideshow/SlideshowViewModel.java
deleted file mode 100644
index 38237ab..0000000
--- a/APED/app/src/main/java/com/example/aped/ui/slideshow/SlideshowViewModel.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.example.aped.ui.slideshow;
-
-import androidx.lifecycle.LiveData;
-import androidx.lifecycle.MutableLiveData;
-import androidx.lifecycle.ViewModel;
-
-public class SlideshowViewModel extends ViewModel {
-
- private MutableLiveData mText;
-
- public SlideshowViewModel() {
- mText = new MutableLiveData<>();
- mText.setValue("wird vorraussichtlich nicht benötigt");
- }
-
- public LiveData getText() {
- return mText;
- }
-}
\ No newline at end of file
diff --git a/APED/app/src/main/java/com/example/aped/ui/your_IOs/Your_IOs_Fragment.java b/APED/app/src/main/java/com/example/aped/ui/your_IOs/YourIOsFragment.java
similarity index 68%
rename from APED/app/src/main/java/com/example/aped/ui/your_IOs/Your_IOs_Fragment.java
rename to APED/app/src/main/java/com/example/aped/ui/your_IOs/YourIOsFragment.java
index d77110f..530e8f4 100644
--- a/APED/app/src/main/java/com/example/aped/ui/your_IOs/Your_IOs_Fragment.java
+++ b/APED/app/src/main/java/com/example/aped/ui/your_IOs/YourIOsFragment.java
@@ -14,17 +14,19 @@ import androidx.lifecycle.ViewModelProvider;
import com.example.aped.R;
-public class Your_IOs_Fragment extends Fragment {
+public class YourIOsFragment extends Fragment {
- private Your_IOs_ViewModel your_IOs_ViewModel;
+ private YourIOsViewModel yourIOsViewModel;
public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
- your_IOs_ViewModel =
- new ViewModelProvider(this).get(Your_IOs_ViewModel.class);
- View root = inflater.inflate(R.layout.fragment_your_ios, container, false);
+ yourIOsViewModel =
+ new ViewModelProvider(this).get(YourIOsViewModel.class);
+ View root = inflater.inflate(R.layout.fragment_your_ios, container,
+ false);
final TextView textView = root.findViewById(R.id.text_your_IOs);
- your_IOs_ViewModel.getText().observe(getViewLifecycleOwner(), new Observer() {
+ yourIOsViewModel.getText().observe(getViewLifecycleOwner(),
+ new Observer() {
@Override
public void onChanged(@Nullable String s) {
textView.setText(s);
@@ -32,4 +34,4 @@ public class Your_IOs_Fragment extends Fragment {
});
return root;
}
-}
\ No newline at end of file
+}
diff --git a/APED/app/src/main/java/com/example/aped/ui/your_IOs/Your_IOs_ViewModel.java b/APED/app/src/main/java/com/example/aped/ui/your_IOs/YourIOsViewModel.java
similarity index 63%
rename from APED/app/src/main/java/com/example/aped/ui/your_IOs/Your_IOs_ViewModel.java
rename to APED/app/src/main/java/com/example/aped/ui/your_IOs/YourIOsViewModel.java
index 91df341..e2837dc 100644
--- a/APED/app/src/main/java/com/example/aped/ui/your_IOs/Your_IOs_ViewModel.java
+++ b/APED/app/src/main/java/com/example/aped/ui/your_IOs/YourIOsViewModel.java
@@ -4,16 +4,16 @@ import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
-public class Your_IOs_ViewModel extends ViewModel {
-
+public class YourIOsViewModel extends ViewModel {
+ /** .*/
private MutableLiveData mText;
-
- public Your_IOs_ViewModel() {
+ /** Text Ausgabe.*/
+ public YourIOsViewModel() {
mText = new MutableLiveData<>();
mText.setValue("Personalisierte Anzeige der Mess- & Sollwerte");
}
-
- public LiveData getText() {
+ /** Rückgabe des Textes.*/
+ public final LiveData getText() {
return mText;
}
-}
\ No newline at end of file
+}
diff --git a/APED/app/src/main/java/com/example/aped/ui/your_IOs/package-info.java b/APED/app/src/main/java/com/example/aped/ui/your_IOs/package-info.java
new file mode 100644
index 0000000..e20666e
--- /dev/null
+++ b/APED/app/src/main/java/com/example/aped/ui/your_IOs/package-info.java
@@ -0,0 +1,5 @@
+/**
+ * Package for the IO user interface.
+ * */
+package com.example.aped.ui.your_IOs;
+
diff --git a/APED/app/src/main/res/layout/fragment_all_ios.xml b/APED/app/src/main/res/layout/fragment_all_ios.xml
index 83a99b8..03a086b 100644
--- a/APED/app/src/main/res/layout/fragment_all_ios.xml
+++ b/APED/app/src/main/res/layout/fragment_all_ios.xml
@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- tools:context=".ui.all_IOs.All_IOs_Fragment">
+ tools:context=".ui.all_IOs.AllIOsFragment">
-
-
-
-
\ No newline at end of file
diff --git a/APED/app/src/main/res/layout/fragment_your_ios.xml b/APED/app/src/main/res/layout/fragment_your_ios.xml
index a63dd61..8892dda 100644
--- a/APED/app/src/main/res/layout/fragment_your_ios.xml
+++ b/APED/app/src/main/res/layout/fragment_your_ios.xml
@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- tools:context=".ui.your_IOs.Your_IOs_Fragment">
+ tools:context=".ui.your_IOs.YourIOsFragment">
-
+ android:title="@string/menu_your_IOs" />
\ No newline at end of file
diff --git a/APED/app/src/main/res/navigation/mobile_navigation.xml b/APED/app/src/main/res/navigation/mobile_navigation.xml
index 8533cd9..e2a879c 100644
--- a/APED/app/src/main/res/navigation/mobile_navigation.xml
+++ b/APED/app/src/main/res/navigation/mobile_navigation.xml
@@ -7,19 +7,14 @@
-
\ No newline at end of file
diff --git a/APED/app/src/main/res/values/strings.xml b/APED/app/src/main/res/values/strings.xml
index dc16dc6..adb6104 100644
--- a/APED/app/src/main/res/values/strings.xml
+++ b/APED/app/src/main/res/values/strings.xml
@@ -12,5 +12,4 @@
all IOs
your IOs
- noch zu entfernen
\ No newline at end of file