Add grabbing prise, warning and alert values; display and current medicament values

This commit is contained in:
Jacques Foucry 2020-04-21 21:53:16 +02:00
parent d134e2e037
commit c847db66a3

View file

@ -120,24 +120,38 @@ public class MedicamentDetailFragment extends Fragment {
public void onStop() public void onStop()
{ {
Context context = getContext(); Context context = getContext();
Toast.makeText(context, "***PROUT***", Toast.LENGTH_SHORT).show();
View currentView = getView(); View currentView = getView();
View nameView; // View nameView;
View adminModeView; // View adminModeView;
View presentationView; // View presentationView;
View stockView; View stockView;
View priseView; View priseView;
View warningView; View warningView;
View alertView; View alertView;
stockView = currentView.findViewById(R.id.alert_cell); stockView = currentView.findViewById(R.id.stock_cell);
TextView stockTextView = stockView.findViewById(R.id.valeur); TextView stockTextView = stockView.findViewById(R.id.valeur);
String stockValue = stockTextView.getText().toString(); String stockValue = stockTextView.getText().toString();
Log.d(TAG, "StockValue == "+ stockValue); priseView = currentView.findViewById(R.id.prise_cell);
Log.d(TAG, "medicamentID "+ medicament.getId()); TextView priseTextView = priseView.findViewById(R.id.valeur);
String priseValue = priseTextView.getText().toString();
alertView = currentView.findViewById(R.id.alert_cell);
TextView alertTextView = alertView.findViewById(R.id.valeur);
String alertValue = alertTextView.getText().toString();
warningView = currentView.findViewById(R.id.warning_cell);
TextView warningTextView = warningView.findViewById(R.id.valeur);
String warningValue = warningTextView.getText().toString();
Log.d(TAG, "StockValue == "+ stockValue);
Log.d(TAG, "PriseValue == "+ priseValue);
Log.d(TAG, "AlertValue == "+ alertValue);
Log.d(TAG, "WarningValue == "+ warningValue);
Log.d(TAG, "medicamentID "+ medicament.getId());
Log.d(TAG, "medicament "+ medicament());
Toast.makeText(context,"stock value "+ stockValue, Toast.LENGTH_SHORT).show();
super.onStop(); super.onStop();
} }
} }