mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-21 20:19:23 +01:00
Use extend floating button (#42)
This commit is contained in:
parent
381b937a01
commit
081759fcfa
2 changed files with 8 additions and 6 deletions
|
@ -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");
|
||||
|
||||
|
|
|
@ -41,16 +41,18 @@
|
|||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:fabSize="normal"
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_gravity="center|bottom"
|
||||
android:scaleType="center"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:contentDescription="@string/save_button"
|
||||
app:srcCompat="@drawable/ic_save_black_24dp"
|
||||
android:text="@string/save_button"
|
||||
android:textColor="@color/white"
|
||||
app:icon="@drawable/ic_save_black_24dp"
|
||||
app:backgroundTint="@color/colorPrimary"
|
||||
app:tint="@color/white"/>
|
||||
app:iconTint="@color/white"/>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
Loading…
Reference in a new issue