From 081759fcfae3feb416efe7ad4b99728765c5c940 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste <87148630+Jean-BaptisteC@users.noreply.github.com> Date: Wed, 17 Apr 2024 14:35:16 +0200 Subject: [PATCH] Use extend floating button (#42) --- .../java/net/foucry/pilldroid/DrugDetailActivity.java | 4 ++-- app/src/main/res/layout/drug_detail_activity.xml | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/net/foucry/pilldroid/DrugDetailActivity.java b/app/src/main/java/net/foucry/pilldroid/DrugDetailActivity.java index 3993f11..2f27abc 100644 --- a/app/src/main/java/net/foucry/pilldroid/DrugDetailActivity.java +++ b/app/src/main/java/net/foucry/pilldroid/DrugDetailActivity.java @@ -11,7 +11,7 @@ import android.widget.TextView; import androidx.appcompat.app.ActionBar; import androidx.appcompat.app.AppCompatActivity; import com.google.android.material.appbar.MaterialToolbar; -import com.google.android.material.floatingactionbutton.FloatingActionButton; +import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton; import net.foucry.pilldroid.dao.PrescriptionsDAO; import net.foucry.pilldroid.databases.PrescriptionDatabase; import net.foucry.pilldroid.models.Prescription; @@ -46,7 +46,7 @@ public class DrugDetailActivity extends AppCompatActivity { setSupportActionBar(toolbar); } - FloatingActionButton fab = findViewById(R.id.fab); + ExtendedFloatingActionButton fab = findViewById(R.id.fab); fab.setOnClickListener(v -> { Log.d(TAG, "Click on save icon"); diff --git a/app/src/main/res/layout/drug_detail_activity.xml b/app/src/main/res/layout/drug_detail_activity.xml index e59d371..adf7f04 100644 --- a/app/src/main/res/layout/drug_detail_activity.xml +++ b/app/src/main/res/layout/drug_detail_activity.xml @@ -41,16 +41,18 @@ - + app:iconTint="@color/white"/>