diff --git a/app/build.gradle.kts b/app/build.gradle.kts index ef1f055aaa8e1c782295ee93dc575ec5cbbbf986..9adfcd81be5dfc08ad6ede46e813d0d750393f6e 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -42,11 +42,11 @@ android { } dependencies { - val nav_version = "2.7.7" + val navVersion = "2.7.7" implementation("androidx.core:core-ktx:1.12.0") implementation("androidx.appcompat:appcompat:1.6.1") - implementation("androidx.navigation:navigation-fragment-ktx:$nav_version") - implementation("androidx.navigation:navigation-ui-ktx:$nav_version") + implementation("androidx.navigation:navigation-fragment-ktx:$navVersion") + implementation("androidx.navigation:navigation-ui-ktx:$navVersion") implementation("com.google.android.material:material:1.9.0") testImplementation("junit:junit:4.13.2") androidTestImplementation("androidx.test.ext:junit:1.1.5") diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index e34f46b5350e9aaba50ca43201b4e14b65e27d5b..e105b0df59996aa47658435961e0d68ccf14db54 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -11,6 +11,16 @@ android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/Theme.BondowosoATM" - tools:targetApi="31" /> + tools:targetApi="31"> + <activity + android:name=".MainActivity" + android:label="@string/app_name" + android:exported="true"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + </application> </manifest> \ No newline at end of file diff --git a/app/src/main/java/com/atm/bondowowo/MainActivity.kt b/app/src/main/java/com/atm/bondowowo/MainActivity.kt index d9fd83e93001fdfc34b918a4cb578cc0b90a7c7e..2a4bb9959cf0656d911052dfba5c02217a31875d 100644 --- a/app/src/main/java/com/atm/bondowowo/MainActivity.kt +++ b/app/src/main/java/com/atm/bondowowo/MainActivity.kt @@ -27,7 +27,7 @@ class MainActivity : AppCompatActivity() { ) ) setupActionBarWithNavController(navController, appBarConfiguration) - binding.bottomNavigation.setupWithNavController(navController) + binding.bottomNavLayout.bottomNavigation.setupWithNavController(navController) } override fun onSupportNavigateUp(): Boolean { diff --git a/app/src/main/java/com/atm/bondowowo/ui/TransactionFragment.java b/app/src/main/java/com/atm/bondowowo/ui/TransactionFragment.java deleted file mode 100644 index 70fc1b06be29f6018f56708619241945170904b6..0000000000000000000000000000000000000000 --- a/app/src/main/java/com/atm/bondowowo/ui/TransactionFragment.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.atm.bondowowo.ui; - -import androidx.fragment.app.Fragment; - -public class TransactionFragment extends Fragment { -} diff --git a/app/src/main/java/com/atm/bondowowo/ui/graph/GraphFragment.kt b/app/src/main/java/com/atm/bondowowo/ui/graph/GraphFragment.kt new file mode 100644 index 0000000000000000000000000000000000000000..45c25f900da09ffce345b2d3fc9629c9c109458a --- /dev/null +++ b/app/src/main/java/com/atm/bondowowo/ui/graph/GraphFragment.kt @@ -0,0 +1,6 @@ +package com.atm.bondowowo.ui.graph + +import androidx.fragment.app.Fragment + + +class GraphFragment : Fragment() diff --git a/app/src/main/java/com/atm/bondowowo/ui/scan/ScanFragment.kt b/app/src/main/java/com/atm/bondowowo/ui/scan/ScanFragment.kt new file mode 100644 index 0000000000000000000000000000000000000000..6dab1a1b91d5d7d714d164a033826cdff2b3a136 --- /dev/null +++ b/app/src/main/java/com/atm/bondowowo/ui/scan/ScanFragment.kt @@ -0,0 +1,6 @@ +package com.atm.bondowowo.ui.scan + +import androidx.fragment.app.Fragment + + +class ScanFragment : Fragment() diff --git a/app/src/main/java/com/atm/bondowowo/ui/settings/SettingsFragment.kt b/app/src/main/java/com/atm/bondowowo/ui/settings/SettingsFragment.kt new file mode 100644 index 0000000000000000000000000000000000000000..55e2d074c39a4fc89c8668209358514bf767e2d7 --- /dev/null +++ b/app/src/main/java/com/atm/bondowowo/ui/settings/SettingsFragment.kt @@ -0,0 +1,6 @@ +package com.atm.bondowowo.ui.settings + +import androidx.fragment.app.Fragment + + +class SettingsFragment : Fragment() \ No newline at end of file diff --git a/app/src/main/java/com/atm/bondowowo/ui/transaction/TransactionFragment.kt b/app/src/main/java/com/atm/bondowowo/ui/transaction/TransactionFragment.kt index e20d59de2f67b1e0087e506dee8efef20b18f86a..79b920268ea221f426bbc9d57ba976759e97f3e8 100644 --- a/app/src/main/java/com/atm/bondowowo/ui/transaction/TransactionFragment.kt +++ b/app/src/main/java/com/atm/bondowowo/ui/transaction/TransactionFragment.kt @@ -1,2 +1,6 @@ package com.atm.bondowowo.ui.transaction +import androidx.fragment.app.Fragment + + +class TransactionFragment : Fragment() diff --git a/app/src/main/res/drawable/ic_grafik.png b/app/src/main/res/drawable/ic_grafik.png new file mode 100644 index 0000000000000000000000000000000000000000..ec9c9e2b37201dc7ea819446565c7a29ead26c64 Binary files /dev/null and b/app/src/main/res/drawable/ic_grafik.png differ diff --git a/app/src/main/res/drawable/ic_pengaturan.png b/app/src/main/res/drawable/ic_pengaturan.png new file mode 100644 index 0000000000000000000000000000000000000000..bda529ef2f18fad433e1cea61cf8f0abe270f165 Binary files /dev/null and b/app/src/main/res/drawable/ic_pengaturan.png differ diff --git a/app/src/main/res/drawable/ic_scan.png b/app/src/main/res/drawable/ic_scan.png new file mode 100644 index 0000000000000000000000000000000000000000..5bc7a45d202c7b5f24ea36464b312bfd8d1eb3d1 Binary files /dev/null and b/app/src/main/res/drawable/ic_scan.png differ diff --git a/app/src/main/res/drawable/ic_transaksi.png b/app/src/main/res/drawable/ic_transaksi.png new file mode 100644 index 0000000000000000000000000000000000000000..5e8c4a879be3b28d0dc91b060476bd545055674f Binary files /dev/null and b/app/src/main/res/drawable/ic_transaksi.png differ diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 30066c6c9369e23fb06d3b2a90dede513aee1513..d6224d971ad88bcbddaf8c87e60cdad1ba92dd1d 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -5,8 +5,6 @@ android:layout_height="match_parent" android:orientation="vertical"> - <include layout="@layout/header_layout" /> - <androidx.fragment.app.FragmentContainerView android:id="@+id/nav_host_fragment" android:name="androidx.navigation.fragment.NavHostFragment" @@ -16,6 +14,6 @@ app:defaultNavHost="true" app:navGraph="@navigation/nav_graph" /> - <include layout="@layout/bottom_navigation_layout" /> + <include android:id="@+id/bottom_nav_layout" layout="@layout/bottom_navigation_layout" /> </LinearLayout> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_graph.xml b/app/src/main/res/layout/fragment_graph.xml new file mode 100644 index 0000000000000000000000000000000000000000..ea6389a9f1b11a731add532fc7ea5ace60afe744 --- /dev/null +++ b/app/src/main/res/layout/fragment_graph.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context="com.atm.bondowowo.ui.scan.ScanFragment"> + + <com.google.android.material.appbar.AppBarLayout + android:id="@+id/header" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" + app:layout_constraintTop_toTopOf="parent"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:layout_marginVertical="8dp" + android:text="@string/grafik" + android:textColor="@color/black" + android:textSize="20sp" + android:textStyle="bold" /> + </com.google.android.material.appbar.AppBarLayout> + + +</androidx.constraintlayout.widget.ConstraintLayout> diff --git a/app/src/main/res/layout/fragment_scan.xml b/app/src/main/res/layout/fragment_scan.xml new file mode 100644 index 0000000000000000000000000000000000000000..94e66ceffcca01ce964fcb6cbee53c0819c792cc --- /dev/null +++ b/app/src/main/res/layout/fragment_scan.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context="com.atm.bondowowo.ui.scan.ScanFragment"> + + <com.google.android.material.appbar.AppBarLayout + android:id="@+id/header" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" + app:layout_constraintTop_toTopOf="parent"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:layout_marginVertical="8dp" + android:text="@string/scan" + android:textColor="@color/black" + android:textSize="20sp" + android:textStyle="bold" /> + </com.google.android.material.appbar.AppBarLayout> + + <TextureView + android:id="@+id/camera_preview" + android:layout_width="300dp" + android:layout_height="400dp" + android:background="@color/black" + app:layout_constraintBottom_toTopOf="@id/capture_button" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.495" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/header" + app:layout_constraintVertical_bias="0.508" /> + + <Button + android:id="@+id/capture_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="124dp" + android:text="@string/capture" + app:cornerRadius="999dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.498" + app:layout_constraintStart_toStartOf="parent" /> + +</androidx.constraintlayout.widget.ConstraintLayout> diff --git a/app/src/main/res/layout/fragment_settings.xml b/app/src/main/res/layout/fragment_settings.xml new file mode 100644 index 0000000000000000000000000000000000000000..95f66a22559611e4a7c315d71d51d09808a87257 --- /dev/null +++ b/app/src/main/res/layout/fragment_settings.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context="com.atm.bondowowo.ui.scan.ScanFragment"> + + <com.google.android.material.appbar.AppBarLayout + android:id="@+id/header" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" + app:layout_constraintTop_toTopOf="parent"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:layout_marginVertical="8dp" + android:text="@string/scan" + android:textColor="@color/black" + android:textSize="20sp" + android:textStyle="bold" /> + </com.google.android.material.appbar.AppBarLayout> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_marginTop="80dp" + android:orientation="vertical" + app:layout_constraintTop_toTopOf="@+id/header"> + + <Button + android:id="@+id/button1" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="Simpan" /> + + <Button + android:id="@+id/button2" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="Kirim" /> + + <Button + android:id="@+id/button3" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="Keluar" /> + </LinearLayout> + +</androidx.constraintlayout.widget.ConstraintLayout> diff --git a/app/src/main/res/layout/fragment_transaction.xml b/app/src/main/res/layout/fragment_transaction.xml index 7d82a3932c9f168e7f9948d7283c4906ed1784cd..e33768f145b962acebf6a41ae8650dcdfa6595fd 100644 --- a/app/src/main/res/layout/fragment_transaction.xml +++ b/app/src/main/res/layout/fragment_transaction.xml @@ -4,7 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - tools:context=".ui.transaction.TransactionFragment"> + tools:context="com.atm.bondowowo.ui.transaction.TransactionFragment"> <com.google.android.material.appbar.AppBarLayout android:id="@+id/header" diff --git a/app/src/main/res/navigation/nav_graph.xml b/app/src/main/res/navigation/nav_graph.xml index 75b962b8c33c9a91abd606c7a931ce2b153fdaee..c10d9c4870dc825cf47cd290f3657593957828b5 100644 --- a/app/src/main/res/navigation/nav_graph.xml +++ b/app/src/main/res/navigation/nav_graph.xml @@ -7,28 +7,26 @@ <fragment android:id="@+id/transactionFragment" - android:name="com.atm.bondowowo.ui.TransactionFragment" + android:name="com.atm.bondowowo.ui.transaction.TransactionFragment" android:label="Transaksi" tools:layout="@layout/fragment_transaction" /> -<!-- Waiting fragements--> - -<!-- <fragment--> -<!-- android:id="@+id/scanFragment"--> -<!-- android:name="com.atm.bondowowo.ScanFragment"--> -<!-- android:label="Scan"--> -<!-- tools:layout="@layout/fragment_scan" />--> + <fragment + android:id="@+id/scanFragment" + android:name="com.atm.bondowowo.ui.scan.ScanFragment" + android:label="Scan" + tools:layout="@layout/fragment_scan" /> -<!-- <fragment--> -<!-- android:id="@+id/graphFragment"--> -<!-- android:name="com.atm.bondowowo.GraphFragment"--> -<!-- android:label="Grafik"--> -<!-- tools:layout="@layout/fragment_graph" />--> + <fragment + android:id="@+id/graphFragment" + android:name="com.atm.bondowowo.ui.graph.GraphFragment" + android:label="Grafik" + tools:layout="@layout/fragment_graph" /> -<!-- <fragment--> -<!-- android:id="@+id/settingsFragment"--> -<!-- android:name="com.atm.bondowowo.SettingsFragment"--> -<!-- android:label="Pengaturan"--> -<!-- tools:layout="@layout/fragment_settings" />--> + <fragment + android:id="@+id/settingsFragment" + android:name="com.atm.bondowowo.ui.settings.SettingsFragment" + android:label="Pengaturan" + tools:layout="@layout/fragment_settings" /> </navigation> \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f06946d068ef6e1a75f4e2b544b2124371f202fe..0756b211cd6bccd1caaa42af429bb02ad7f4c697 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -5,4 +5,5 @@ <string name="grafik">Grafik</string> <string name="pengaturan">Pengaturan</string> <string name="add">+</string> + <string name="capture">Capture</string> </resources> \ No newline at end of file