mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-22 04:29:22 +01:00
Remove unnecessary cast and optimize import
This commit is contained in:
parent
a39606ab02
commit
e279ef1191
2 changed files with 4 additions and 5 deletions
|
@ -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()
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue