From af1cccc0dd6bc2dc8de9bce98212b29a069eac43 Mon Sep 17 00:00:00 2001 From: rayhanp1402 <rayhan.hanif14maulana@gmail.com> Date: Sun, 31 Mar 2024 13:42:41 +0700 Subject: [PATCH] style: Transaction add button to floating button --- app/src/main/res/drawable/ic_plus.xml | 11 +++++++++++ .../main/res/layout/fragment_transactions.xml | 17 ++++++++--------- 2 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 app/src/main/res/drawable/ic_plus.xml diff --git a/app/src/main/res/drawable/ic_plus.xml b/app/src/main/res/drawable/ic_plus.xml new file mode 100644 index 0000000..eb0f403 --- /dev/null +++ b/app/src/main/res/drawable/ic_plus.xml @@ -0,0 +1,11 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + + <path + android:fillColor="#000" + android:pathData="M19,13H13v6h-2v-6H5v-2h6V5h2v6h6v2z"/> + +</vector> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_transactions.xml b/app/src/main/res/layout/fragment_transactions.xml index 362f628..940a17a 100644 --- a/app/src/main/res/layout/fragment_transactions.xml +++ b/app/src/main/res/layout/fragment_transactions.xml @@ -1,17 +1,16 @@ -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:tools="http://schemas.android.com/tools" +<RelativeLayout + xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" - android:layout_height="match_parent" - android:padding="16dp"> + android:layout_height="match_parent" > - <Button + <com.google.android.material.floatingactionbutton.FloatingActionButton android:id="@+id/button_addTransaction" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="+" - android:layout_alignParentBottom="true" android:layout_alignParentEnd="true" - android:layout_marginStart="16dp" - android:layout_marginBottom="48dp" /> + android:layout_alignParentBottom="true" + android:layout_marginEnd="24dp" + android:layout_marginBottom="72dp" + android:src="@drawable/ic_plus"/> </RelativeLayout> \ No newline at end of file -- GitLab