mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-22 04:29:22 +01:00
Minor changes
This commit is contained in:
parent
7de2982944
commit
e98f07bac6
1 changed files with 5 additions and 5 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue