From 75b0de3c62dd7c923c5a5763f70f79ed60e72cf1 Mon Sep 17 00:00:00 2001 From: syauqijan <13521014@std.stei.itb.ac.id> Date: Mon, 18 Mar 2024 10:34:35 +0700 Subject: [PATCH] feat scan nota --- app/build.gradle.kts | 9 ++++++- app/src/main/AndroidManifest.xml | 9 +++++++ app/src/main/res/drawable/gallery.xml | 28 ++++++++++++++++++++ app/src/main/res/drawable/iv_picture.xml | 7 +++++ app/src/main/res/drawable/rounded_button.xml | 11 ++++++++ 5 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 app/src/main/res/drawable/gallery.xml create mode 100644 app/src/main/res/drawable/iv_picture.xml create mode 100644 app/src/main/res/drawable/rounded_button.xml diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 39c5db8..dbaee87 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,6 +1,7 @@ plugins { id("com.android.application") id("org.jetbrains.kotlin.android") + id ("kotlin-parcelize") } android { @@ -17,9 +18,11 @@ android { testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } +// + buildTypes { release { - isMinifyEnabled = false + isMinifyEnabled = true proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" @@ -33,6 +36,9 @@ android { kotlinOptions { jvmTarget = "1.8" } + buildFeatures { + viewBinding = true + } } dependencies { @@ -44,4 +50,5 @@ dependencies { testImplementation("junit:junit:4.13.2") androidTestImplementation("androidx.test.ext:junit:1.1.5") androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") + } \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index ba19ba1..ea0fe18 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,6 +2,15 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"> + <uses-feature + android:name="android.hardware.camera" + android:required="false" /> + + <uses-permission android:name="android.permission.CAMERA"/> + <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" + android:maxSdkVersion="32" /> + + <application android:allowBackup="true" android:dataExtractionRules="@xml/data_extraction_rules" diff --git a/app/src/main/res/drawable/gallery.xml b/app/src/main/res/drawable/gallery.xml new file mode 100644 index 0000000..6867b9f --- /dev/null +++ b/app/src/main/res/drawable/gallery.xml @@ -0,0 +1,28 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="29dp" + android:height="28dp" + android:viewportWidth="29" + android:viewportHeight="28"> + <group> + <clip-path + android:pathData="M0.5,0h28v28h-28z"/> + <path + android:pathData="M5.167,0.933H23.833C24.823,0.933 25.773,1.327 26.473,2.027C27.173,2.727 27.567,3.677 27.567,4.667V23.333C27.567,24.323 27.173,25.273 26.473,25.973C25.773,26.673 24.823,27.067 23.833,27.067H5.167C4.177,27.067 3.227,26.673 2.527,25.973C1.827,25.273 1.433,24.323 1.433,23.333V4.667C1.433,3.677 1.827,2.727 2.527,2.027C3.227,1.327 4.177,0.933 5.167,0.933Z" + android:strokeLineJoin="round" + android:strokeWidth="2" + android:fillColor="#00000000" + android:fillType="evenOdd" + android:strokeColor="#322F50" + android:strokeLineCap="round"/> + <path + android:pathData="M27.567,19.6L21.967,14L16.367,19.572M23.833,27.067L7.033,10.267L1.433,15.867" + android:strokeLineJoin="round" + android:strokeWidth="2" + android:fillColor="#00000000" + android:strokeColor="#322F50" + android:strokeLineCap="round"/> + <path + android:pathData="M21.033,9.333C22.064,9.333 22.9,8.498 22.9,7.467C22.9,6.436 22.064,5.6 21.033,5.6C20.002,5.6 19.167,6.436 19.167,7.467C19.167,8.498 20.002,9.333 21.033,9.333Z" + android:fillColor="#322F50"/> + </group> +</vector> diff --git a/app/src/main/res/drawable/iv_picture.xml b/app/src/main/res/drawable/iv_picture.xml new file mode 100644 index 0000000..32bd526 --- /dev/null +++ b/app/src/main/res/drawable/iv_picture.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <stroke + android:width="2dp" + android:color="#000000" /> +</shape> diff --git a/app/src/main/res/drawable/rounded_button.xml b/app/src/main/res/drawable/rounded_button.xml new file mode 100644 index 0000000..487e3fe --- /dev/null +++ b/app/src/main/res/drawable/rounded_button.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + + <item> + <shape android:shape="oval"> + <corners android:radius="8dp" /> + <solid android:color="#B1B8D8" /> + <stroke android:width="5dp" android:color="#494666" /> + </shape> + </item> +</selector> -- GitLab