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()
{
Context context = getContext();
Toast.makeText(context, "***PROUT***", Toast.LENGTH_SHORT).show();
View currentView = getView();
View nameView;
View adminModeView;
View presentationView;
// View nameView;
// View adminModeView;
// View presentationView;
View stockView;
View priseView;
View warningView;
View alertView;
stockView = currentView.findViewById(R.id.alert_cell);
stockView = currentView.findViewById(R.id.stock_cell);
TextView stockTextView = stockView.findViewById(R.id.valeur);
String stockValue = stockTextView.getText().toString();
Log.d(TAG, "StockValue == "+ stockValue);
Log.d(TAG, "medicamentID "+ medicament.getId());
priseView = currentView.findViewById(R.id.prise_cell);
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();
}
}