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; Drug drug;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
Bundle extras = getIntent().getExtras(); Bundle bundle = getIntent().getExtras();
/* fetching the string passed with intent using extras*/ /* fetching the string passed with intent using extras*/
assert extras != null; assert bundle != null;
drug = (Drug) extras.getSerializable("drug"); drug = (Drug) bundle.getSerializable("drug");
assert drug != null; assert drug != null;
Log.d(TAG, "drug == " + drug); Log.d(TAG, "drug == " + drug);
/* fetching the string passed with intent using bundle*/
setContentView(R.layout.activity_drug_detail); setContentView(R.layout.activity_drug_detail);
Toolbar toolbar = findViewById(detail_toolbar); Toolbar toolbar = findViewById(detail_toolbar);
if (toolbar != null) { if (toolbar != null) {
setSupportActionBar(toolbar); setSupportActionBar(toolbar);
} }