diff --git a/app/src/main/java/pbd/tubes/exe_android/ui/scan/ScanFragment.kt b/app/src/main/java/pbd/tubes/exe_android/ui/scan/ScanFragment.kt index 875df700531dad54bb3f170194ab643d58c775e5..03dd14c0918f94d76b7a7a397c422dc2380b986e 100644 --- a/app/src/main/java/pbd/tubes/exe_android/ui/scan/ScanFragment.kt +++ b/app/src/main/java/pbd/tubes/exe_android/ui/scan/ScanFragment.kt @@ -103,6 +103,7 @@ class ScanFragment : Fragment() { onImageSaved(output: ImageCapture.OutputFileResults){ val msg = "Photo capture succeeded: ${output.savedUri}" Toast.makeText(requireContext(), msg, Toast.LENGTH_SHORT).show() + // TODO(photo is then sent to server) Log.d(TAG, msg) } } diff --git a/app/src/main/res/drawable/camera_button.xml b/app/src/main/res/drawable/camera_button.xml new file mode 100644 index 0000000000000000000000000000000000000000..df8d6d46366386dcafd2c73d0686d94068212346 --- /dev/null +++ b/app/src/main/res/drawable/camera_button.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item> + <shape + android:shape="oval"> + <solid android:color="@color/white" /> + </shape> + </item> +</selector> \ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 22f25cba99e69c40c51545f53c23f7492da5185f..e9ae331a67257a17eec216858e353724ddb53024 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -34,7 +34,7 @@ android:id="@+id/nav_host_fragment_activity_main" android:name="androidx.navigation.fragment.NavHostFragment" android:layout_width="match_parent" - android:layout_height="match_parent" + android:layout_height="0dp" app:defaultNavHost="true" app:layout_constraintBottom_toTopOf="@id/nav_view" app:layout_constraintLeft_toLeftOf="parent" diff --git a/app/src/main/res/layout/fragment_scan.xml b/app/src/main/res/layout/fragment_scan.xml index 2b402d518ebf007879e01172bf3836b2899a255c..522bc03866cdabb8d899d15bdafb17f687ad8fd8 100644 --- a/app/src/main/res/layout/fragment_scan.xml +++ b/app/src/main/res/layout/fragment_scan.xml @@ -11,8 +11,9 @@ android:layout_width="match_parent" android:layout_height="match_parent" /> - <Button + <ImageButton android:id="@+id/image_capture_button" + android:background="@drawable/camera_button" android:layout_width="110dp" android:layout_height="110dp" android:layout_marginBottom="50dp"