diff --git a/app/src/main/java/net/foucry/pilldroid/DrugDetailActivity.java b/app/src/main/java/net/foucry/pilldroid/DrugDetailActivity.java index 06d0635..eea98e9 100644 --- a/app/src/main/java/net/foucry/pilldroid/DrugDetailActivity.java +++ b/app/src/main/java/net/foucry/pilldroid/DrugDetailActivity.java @@ -39,7 +39,7 @@ public class DrugDetailActivity extends AppCompatActivity { Bundle bundle = getIntent().getExtras(); assert bundle != null; - aPrescription = (Prescription) bundle.get("medic"); + aPrescription = (Prescription) bundle.get("prescription"); Log.d(TAG, "aPrescription == " + aPrescription); setContentView(R.layout.drug_detail_activity); @@ -82,7 +82,7 @@ public class DrugDetailActivity extends AppCompatActivity { // Create the detail fragment and add it to the activity // using a fragment transaction. Bundle arguments = new Bundle(); - arguments.putSerializable("medic", aPrescription); + arguments.putSerializable("prescription", aPrescription); DrugDetailFragment fragment = new DrugDetailFragment(); fragment.setArguments(arguments); getSupportFragmentManager().beginTransaction() diff --git a/app/src/main/java/net/foucry/pilldroid/DrugListActivity.java b/app/src/main/java/net/foucry/pilldroid/DrugListActivity.java index 2427135..cfa8ee5 100644 --- a/app/src/main/java/net/foucry/pilldroid/DrugListActivity.java +++ b/app/src/main/java/net/foucry/pilldroid/DrugListActivity.java @@ -11,7 +11,6 @@ import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.os.Build; import android.os.Bundle; -import android.os.Parcelable; import android.text.Editable; import android.text.TextWatcher; import android.util.Log; @@ -430,7 +429,7 @@ public class DrugListActivity extends AppCompatActivity { Log.d(TAG, "Call DrugDetailActivity"); Context context = this; Intent intent = new Intent(context, DrugDetailActivity.class); - intent.putExtra("medic", (Parcelable) aPrescription); + intent.putExtra("prescription", aPrescription); startActivityForResult(intent, CUSTOMIZED_REQUEST_CODE); overridePendingTransition(R.anim.slide_from_right, R.anim.slide_to_left); @@ -519,7 +518,7 @@ public class DrugListActivity extends AppCompatActivity { Prescription aPrescription = mValues.get(position); Context context = v.getContext(); Intent intent = new Intent(context, DrugDetailActivity.class); - intent.putExtra("medic", (Parcelable) aPrescription); + intent.putExtra("prescription", aPrescription); startActivityForResult(intent, CUSTOMIZED_REQUEST_CODE); overridePendingTransition(R.anim.slide_from_right, R.anim.slide_to_left);