This commit is contained in:
jacques 2020-04-12 17:57:48 +00:00
parent f8bcbeb9b7
commit 3483aa7252
2 changed files with 14 additions and 5 deletions

View file

@ -36,6 +36,7 @@ public class MedicamentDetailActivity extends AppCompatActivity {
Snackbar.make(view, "Will be use to save changes in a drug", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
setResult(1);
finish();
}
});

View file

@ -122,14 +122,22 @@ public class MedicamentDetailFragment extends Fragment {
{
Context context = getContext();
Toast.makeText(context, "***PROUT***", Toast.LENGTH_SHORT).show();
View currentView = getView();
View nameView;
View adminModeView;
View presentationView;
View stockView;
View priseView;
View warningView;
View alertView;
Intent intent = getIntent();
stockView = currentView.findViewById(R.id.alert_cell);
TextView stockValue = stockView.findViewById(R.id.valeur);
String presentation = intent.getStringExtra("Presentation");
String name = intent.getStringExtra("Nom");
Log.d(TAG, "StockValue == "+ stockValue);
Log.d(TAG, "medicamentID "+ medicament.getId());
Log.d(TAG, "value of Presentation "+ presentation);
Log.d(TAG, "value of Nom "+ name);
Toast.makeText(context,"stock value "+ stockValue, Toast.LENGTH_SHORT).show();
super.onStop();
}
}