mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-17 18:41:37 +01:00
Add grabbing prise, warning and alert values; display and current medicament values
This commit is contained in:
parent
d134e2e037
commit
c847db66a3
1 changed files with 22 additions and 8 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue