From 3421fc4cd023485f61f2374c84a96bdc31debdfe Mon Sep 17 00:00:00 2001 From: jacques Date: Fri, 12 Jun 2020 11:11:33 +0200 Subject: [PATCH] Channge floatingButtonAction by an imageButton; optimization --- .../java/net/foucry/pilldroid/MedicamentDetailActivity.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/net/foucry/pilldroid/MedicamentDetailActivity.java b/app/src/main/java/net/foucry/pilldroid/MedicamentDetailActivity.java index 06e8045..4309c15 100644 --- a/app/src/main/java/net/foucry/pilldroid/MedicamentDetailActivity.java +++ b/app/src/main/java/net/foucry/pilldroid/MedicamentDetailActivity.java @@ -11,6 +11,7 @@ import android.util.Log; import android.view.MenuItem; import android.view.View; import android.widget.EditText; +import android.widget.ImageButton; import android.widget.TextView; import static net.foucry.pilldroid.R.id.detail_toolbar; @@ -36,6 +37,7 @@ public class MedicamentDetailActivity extends AppCompatActivity { medicament = (Medicament) extras.getSerializable("medicament"); + assert medicament != null; Log.d(TAG, "medicament == " + medicament.toString()); setContentView(R.layout.activity_medicament_detail); @@ -46,7 +48,7 @@ public class MedicamentDetailActivity extends AppCompatActivity { setSupportActionBar(toolbar); } - FloatingActionButton fab = findViewById(R.id.fab); + ImageButton fab = findViewById(R.id.fab); fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) {