Behebung von diversen Fehlern

This commit is contained in:
m_broelemann 2020-12-20 12:30:23 +01:00
parent 3f55ebce81
commit e2ba5ff1d6
5 changed files with 19 additions and 19 deletions

View File

@ -24,8 +24,9 @@ public class MainActivity extends AppCompatActivity {
private AppBarConfiguration mAppBarConfiguration; private AppBarConfiguration mAppBarConfiguration;
/** zur Verwendung von xml anstatt der direkten Einbindung.*/ /** zur Verwendung von xml anstatt der direkten Einbindung.*/
private IXML xml; private IXML xml;
/** allgemeines.*/
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main); setContentView(R.layout.activity_main);
Toolbar toolbar = findViewById(R.id.toolbar); Toolbar toolbar = findViewById(R.id.toolbar);
@ -47,14 +48,13 @@ public class MainActivity extends AppCompatActivity {
xml = new TestXML(); xml = new TestXML();
} }
/** Fügt Elemente zur Aktionsleiste hinzu, wenn diese vorhanden ist.*/
@Override @Override
public boolean onCreateOptionsMenu(Menu menu) { public boolean onCreateOptionsMenu(final Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu); getMenuInflater().inflate(R.menu.main, menu);
return true; return true;
} }
/**Navigation einrichten.*/
@Override @Override
public boolean onSupportNavigateUp() { public boolean onSupportNavigateUp() {
NavController navController = Navigation.findNavController(this, NavController navController = Navigation.findNavController(this,
@ -62,9 +62,9 @@ public class MainActivity extends AppCompatActivity {
return NavigationUI.navigateUp(navController, mAppBarConfiguration) return NavigationUI.navigateUp(navController, mAppBarConfiguration)
|| super.onSupportNavigateUp(); || super.onSupportNavigateUp();
} }
/**was sollbeit click auf den jeweiligen itembutton passieren.*/ /**was soll bei click auf den jeweiligen itembutton passieren.*/
@Override @Override
public boolean onOptionsItemSelected(@NonNull MenuItem item) { public boolean onOptionsItemSelected(final @NonNull MenuItem item) {
switch (item.getItemId()) { switch (item.getItemId()) {
case R.id.action_settings: case R.id.action_settings:
Toast.makeText(this, "Settings", Toast.makeText(this, "Settings",

View File

@ -15,11 +15,11 @@ import androidx.lifecycle.ViewModelProvider;
import com.example.aped.R; import com.example.aped.R;
public class AllIOsFragment extends Fragment { public class AllIOsFragment extends Fragment {
/**Azeige Modell.*/
private AllIOsViewModel allIOsViewModel; private AllIOsViewModel allIOsViewModel;
public View onCreateView(final @NonNull LayoutInflater inflater,
public View onCreateView(@NonNull LayoutInflater inflater, final ViewGroup container,
ViewGroup container, Bundle savedInstanceState) { final Bundle savedInstanceState) {
allIOsViewModel = allIOsViewModel =
new ViewModelProvider(this).get(AllIOsViewModel.class); new ViewModelProvider(this).get(AllIOsViewModel.class);
View root = inflater.inflate(R.layout.fragment_all_ios, container, View root = inflater.inflate(R.layout.fragment_all_ios, container,
@ -28,7 +28,7 @@ public class AllIOsFragment extends Fragment {
allIOsViewModel.getText().observe(getViewLifecycleOwner(), allIOsViewModel.getText().observe(getViewLifecycleOwner(),
new Observer<String>() { new Observer<String>() {
@Override @Override
public void onChanged(@Nullable String s) { public void onChanged(final @Nullable String s) {
textView.setText(s); textView.setText(s);
} }
}); });

View File

@ -7,7 +7,7 @@ import androidx.lifecycle.ViewModel;
public class AllIOsViewModel extends ViewModel { public class AllIOsViewModel extends ViewModel {
/** .*/ /** .*/
private MutableLiveData<String> mText; private MutableLiveData<String> mText;
/** Text Ausgabe.*/ /** Text Ablage.*/
public AllIOsViewModel() { public AllIOsViewModel() {
mText = new MutableLiveData<>(); mText = new MutableLiveData<>();
mText.setValue("Anzeige aller Mess & Sollwertvorgaben bestimmt durch" mText.setValue("Anzeige aller Mess & Sollwertvorgaben bestimmt durch"

View File

@ -15,11 +15,11 @@ import androidx.lifecycle.ViewModelProvider;
import com.example.aped.R; import com.example.aped.R;
public class YourIOsFragment extends Fragment { public class YourIOsFragment extends Fragment {
/**Azeige Modell.*/
private YourIOsViewModel yourIOsViewModel; private YourIOsViewModel yourIOsViewModel;
public View onCreateView(final @NonNull LayoutInflater inflater,
public View onCreateView(@NonNull LayoutInflater inflater, final ViewGroup container,
ViewGroup container, Bundle savedInstanceState) { final Bundle savedInstanceState) {
yourIOsViewModel = yourIOsViewModel =
new ViewModelProvider(this).get(YourIOsViewModel.class); new ViewModelProvider(this).get(YourIOsViewModel.class);
View root = inflater.inflate(R.layout.fragment_your_ios, container, View root = inflater.inflate(R.layout.fragment_your_ios, container,
@ -28,7 +28,7 @@ public class YourIOsFragment extends Fragment {
yourIOsViewModel.getText().observe(getViewLifecycleOwner(), yourIOsViewModel.getText().observe(getViewLifecycleOwner(),
new Observer<String>() { new Observer<String>() {
@Override @Override
public void onChanged(@Nullable String s) { public void onChanged(final @Nullable String s) {
textView.setText(s); textView.setText(s);
} }
}); });

View File

@ -7,7 +7,7 @@ import androidx.lifecycle.ViewModel;
public class YourIOsViewModel extends ViewModel { public class YourIOsViewModel extends ViewModel {
/** .*/ /** .*/
private MutableLiveData<String> mText; private MutableLiveData<String> mText;
/** Text Ausgabe.*/ /** Text Ablage.*/
public YourIOsViewModel() { public YourIOsViewModel() {
mText = new MutableLiveData<>(); mText = new MutableLiveData<>();
mText.setValue("Personalisierte Anzeige der Mess- & Sollwerte"); mText.setValue("Personalisierte Anzeige der Mess- & Sollwerte");