Minor changes

This commit is contained in:
jacques 2022-03-06 10:49:16 +01:00
parent 7de2982944
commit e98f07bac6

View file

@ -29,25 +29,25 @@ public class DrugDetailActivity extends AppCompatActivity {
Drug drug;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Bundle extras = getIntent().getExtras();
Bundle bundle = getIntent().getExtras();
/* fetching the string passed with intent using extras*/
assert extras != null;
drug = (Drug) extras.getSerializable("drug");
assert bundle != null;
drug = (Drug) bundle.getSerializable("drug");
assert drug != null;
Log.d(TAG, "drug == " + drug);
/* fetching the string passed with intent using bundle*/
setContentView(R.layout.activity_drug_detail);
Toolbar toolbar = findViewById(detail_toolbar);
if (toolbar != null) {
setSupportActionBar(toolbar);
}