diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml index 0c0c3383890637b4721df1f49d0b229e55c0f361..0576c7dc10d0c79609a840d1cd6110160042fb1b 100644 --- a/.idea/deploymentTargetDropDown.xml +++ b/.idea/deploymentTargetDropDown.xml @@ -2,6 +2,12 @@ <project version="4"> <component name="deploymentTargetDropDown"> <value> + <entry key="TransaksiBaruActivity"> + <State /> + </entry> + <entry key="TransaksiBaruActivity (1)"> + <State /> + </entry> <entry key="app"> <State /> </entry> diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 44ca2d9b03443dff942748798643a4f05eec7206..3fd3da4024c74743888ce9e27b92ac414e27f37c 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -37,5 +37,6 @@ <option name="composableFile" value="true" /> <option name="previewFile" value="true" /> </inspection_tool> + <inspection_tool class="SameParameterValue" enabled="false" level="WARNING" enabled_by_default="false" /> </profile> </component> \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 8978d23db569daa721cb26dde7923f4c673d1fc9..d91e37cf9349a9ae9c9193c2647a91d99f98b763 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,3 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> <project version="4"> <component name="ExternalStorageConfigurationManager" enabled="true" /> <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK"> @@ -6,4 +7,11 @@ <component name="ProjectType"> <option name="id" value="Android" /> </component> + <component name="VisualizationToolProject"> + <option name="state"> + <ProjectState> + <option name="scale" value="0.511656188964844" /> + </ProjectState> + </option> + </component> </project> \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts index b2ac01d0113963cf6077f476521225553a028076..f7742da461a76e7a067d93ef8f1fd89dfba1c2ff 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -61,6 +61,7 @@ dependencies { implementation("androidx.compose.material3:material3") implementation("androidx.constraintlayout:constraintlayout:2.1.4") implementation("com.google.android.material:material:1.11.0") + implementation("androidx.mediarouter:mediarouter:1.7.0") testImplementation("junit:junit:4.13.2") androidTestImplementation("androidx.test.ext:junit:1.1.5") androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") @@ -80,4 +81,6 @@ dependencies { implementation("androidx.room:room-ktx:2.5.0") implementation ("net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:3.0.0-RC3") -} \ No newline at end of file +} + + diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 281be633e24b81342f85893772b7d8dcfa3112cd..fc1529e4b1145f92a5f15e2dbdf63217d14820cb 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -13,17 +13,23 @@ android:theme="@style/Theme.BondoMan" tools:targetApi="31"> <activity - android:name=".MainActivity" - android:exported="true" - android:label="@string/app_name" - android:theme="@style/Theme.BondoMan"> + android:name=".LoginActivity" + android:exported="true"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> - <activity android:name=".SettingsActivity" /> + <activity + android:name=".MainActivity" + android:exported="true" + android:theme="@style/Theme.BondoMan"> + </activity> + <activity + android:name=".TransaksiBaruActivity" + android:exported="true"> + </activity> </application> </manifest> \ No newline at end of file diff --git a/app/src/main/java/com/example/bondoman/LoginActivity.kt b/app/src/main/java/com/example/bondoman/LoginActivity.kt new file mode 100644 index 0000000000000000000000000000000000000000..2b5c1fbc9e8b293af3cb9871031d36b73bc7e780 --- /dev/null +++ b/app/src/main/java/com/example/bondoman/LoginActivity.kt @@ -0,0 +1,35 @@ +package com.example.bondoman + +import android.content.Intent +import android.os.Bundle +import android.widget.Button +import android.widget.Toast +import androidx.appcompat.app.AppCompatActivity + +class LoginActivity : AppCompatActivity() { + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_login) + + val loginButton = findViewById<Button>(R.id.btn_masuk) + loginButton.setOnClickListener { + // Perform login authentication here + val authenticated = performLoginAuthentication() + + if (authenticated) { + val intent = Intent(this, MainActivity::class.java) + startActivity(intent) + finish() // Finish the LoginActivity to prevent returning to it by pressing back + } else { + Toast.makeText(this, "Login failed. Please try again.", Toast.LENGTH_SHORT).show() + } + } + } + + private fun performLoginAuthentication(): Boolean { + // Implement your authentication logic here + // For simplicity, let's assume authentication is always successful in this example + return true + } +} diff --git a/app/src/main/java/com/example/bondoman/MainActivity.kt b/app/src/main/java/com/example/bondoman/MainActivity.kt index 53783dda026e34e6bbe97497c80d977779717571..81b69df84863027d8ab88be4d3e34b42d24af82a 100644 --- a/app/src/main/java/com/example/bondoman/MainActivity.kt +++ b/app/src/main/java/com/example/bondoman/MainActivity.kt @@ -1,5 +1,7 @@ package com.example.bondoman +import SettingsFragment +import android.annotation.SuppressLint import android.content.Intent import android.os.Bundle import android.text.TextUtils @@ -7,40 +9,95 @@ import android.widget.Button import android.widget.EditText import android.widget.Toast import androidx.appcompat.app.AppCompatActivity +import android.view.MenuItem +import android.widget.TextView +import androidx.fragment.app.Fragment +import com.google.android.material.bottomnavigation.BottomNavigationView + class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - setContentView(R.layout.activity_login) + setContentView(R.layout.activity_main) - setupLogin() - } + val bottomNavigationView = findViewById<BottomNavigationView>(R.id.bottomNavigationView) + var previousItem = 0 + + bottomNavigationView.setOnNavigationItemSelectedListener { item -> + if (previousItem != 0) { + resetIcon(previousItem) + } + when (item.itemId) { + R.id.transaksi -> { + item.setIcon(R.drawable.transaksi_bold) + replaceFragment(fragmen_transaksi(), "Transaksi") + true + } - private fun setupLogin() { - val emailInput = findViewById<EditText>(R.id.id_email) - val passwordInput = findViewById<EditText>(R.id.id_password) - val loginButton = findViewById<Button>(R.id.btn_masuk) - - loginButton.setOnClickListener { - val email = emailInput.text.toString() - val password = passwordInput.text.toString() - when { - TextUtils.isEmpty(email) || TextUtils.isEmpty(password) -> { - Toast.makeText(this, getString(R.string.login_error), Toast.LENGTH_SHORT).show() + R.id.scan -> { + item.setIcon(R.drawable.scanner_bold) + // Perform actions for scanner fragment call + true } - else -> { - navigateToSettings() + + R.id.graf -> { + item.setIcon(R.drawable.graf_bold) + // Perform actions for graph fragment call + true } + + R.id.setting -> { + item.setIcon(R.drawable.settings_bold) + replaceFragment(SettingsFragment(), "Setting") + true + } + + else -> false + }.also { + previousItem = item.itemId // Update the previousItem with the item's ID + } + } + } + + private fun resetIcon(selectedId: Int) { + // Reset all icons to their original state + val bottomNavigationView = findViewById<BottomNavigationView>(R.id.bottomNavigationView) + + when (selectedId) { + R.id.transaksi -> { + bottomNavigationView.menu.findItem(R.id.transaksi).setIcon(R.drawable.transaksi) + } + R.id.scan -> { + bottomNavigationView.menu.findItem(R.id.scan).setIcon(R.drawable.scanner) + } + R.id.graf -> { + bottomNavigationView.menu.findItem(R.id.graf).setIcon(R.drawable.graf) + } + R.id.setting -> { + bottomNavigationView.menu.findItem(R.id.setting).setIcon(R.drawable.settings) } } } - private fun navigateToSettings() { - val settingsIntent = Intent(this, SettingsActivity::class.java) - startActivity(settingsIntent) - finish() + @SuppressLint("CommitTransaction") + private fun replaceFragment(fragment: Fragment, fragmentName: String) { + supportFragmentManager.beginTransaction() + .replace(R.id.frame_container, fragment) + .commit() + setHeader(fragmentName) } + private fun setHeader(title: String) { + val frameHeaderText = findViewById<TextView>(R.id.frame_header_text) + frameHeaderText.text = title + } + + companion object { + const val EXTRA_FRAGMENT = "com.example.bondoman.EXTRA_FRAGMENT" + const val FRAGMENT_TRANSAKSI = "transaksi_fragment" + } + + // override fun onCreate(savedInstanceState: Bundle?) { // super.onCreate(savedInstanceState) // diff --git a/app/src/main/java/com/example/bondoman/SettingsActivity.kt b/app/src/main/java/com/example/bondoman/SettingsActivity.kt deleted file mode 100644 index 550cfd9912c275095d10dfdc64a2ec64eaae97ce..0000000000000000000000000000000000000000 --- a/app/src/main/java/com/example/bondoman/SettingsActivity.kt +++ /dev/null @@ -1,28 +0,0 @@ -package com.example.bondoman - -import android.content.Intent -import android.os.Bundle -import android.widget.Button -import androidx.appcompat.app.AppCompatActivity - -class SettingsActivity : AppCompatActivity() { - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContentView(R.layout.activity_settings) - - setupLogoutButton() - } - - private fun setupLogoutButton() { - val logoutButton = findViewById<Button>(R.id.btn_keluar) - logoutButton.setOnClickListener { - navigateToLogin() - } - } - private fun navigateToLogin() { - val loginIntent = Intent(this, MainActivity::class.java) - startActivity(loginIntent) - finish() - } -} \ No newline at end of file diff --git a/app/src/main/java/com/example/bondoman/SplashActivity.kt b/app/src/main/java/com/example/bondoman/SplashActivity.kt index 549bd60c66459930bad250904f204163003d1be1..e1776d5ffbb21d4c7114619c047460985b24c80a 100644 --- a/app/src/main/java/com/example/bondoman/SplashActivity.kt +++ b/app/src/main/java/com/example/bondoman/SplashActivity.kt @@ -1,11 +1,13 @@ package com.example.bondoman +import android.annotation.SuppressLint import android.content.Intent import android.os.Bundle import android.os.Handler import android.os.Looper import androidx.appcompat.app.AppCompatActivity +@SuppressLint("CustomSplashScreen") class SplashActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) diff --git a/app/src/main/java/com/example/bondoman/TransaksiBaruActivity.kt b/app/src/main/java/com/example/bondoman/TransaksiBaruActivity.kt new file mode 100644 index 0000000000000000000000000000000000000000..b9cd168265ffc5e9eb64e273f17d1dcb9e3532ca --- /dev/null +++ b/app/src/main/java/com/example/bondoman/TransaksiBaruActivity.kt @@ -0,0 +1,49 @@ +package com.example.bondoman + +import android.content.Intent +import android.os.Bundle +import android.view.View +import android.widget.AdapterView +import android.widget.ArrayAdapter +import android.widget.Spinner +import androidx.appcompat.app.AppCompatActivity +import com.google.android.material.floatingactionbutton.FloatingActionButton + + +class TransaksiBaruActivity : AppCompatActivity() { + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_add_transaksi) + + val id_kategori: Spinner = findViewById(R.id.id_kategori) + val categories = listOf("Pembelian", "Pemasukan") + val adapter = ArrayAdapter(this, android.R.layout.simple_spinner_item, categories) + adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item) + id_kategori.adapter = adapter + + // Handle item selection + id_kategori.onItemSelectedListener = object : AdapterView.OnItemSelectedListener { + override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) { + val selectedCategory = parent?.getItemAtPosition(position).toString() + // Do something with the selected category + } + + override fun onNothingSelected(parent: AdapterView<*>?) { + // Handle case when nothing is selected + } + } + + + // Initialize closeFab directly without declaring a variable + findViewById<FloatingActionButton>(R.id.fab_close).setOnClickListener { + // Navigate back to MainActivity and open the transaction fragment + Intent(this, MainActivity::class.java).apply { + // Pass any necessary data to indicate fragment selection + putExtra(MainActivity.EXTRA_FRAGMENT, MainActivity.FRAGMENT_TRANSAKSI) + startActivity(this) + } + finish() + } + } +} diff --git a/app/src/main/java/com/example/bondoman/adapters/CardAdapter.kt b/app/src/main/java/com/example/bondoman/adapters/CardAdapter.kt new file mode 100644 index 0000000000000000000000000000000000000000..8fe75df74bcffc1aa8416968e2057a31e2bd5b95 --- /dev/null +++ b/app/src/main/java/com/example/bondoman/adapters/CardAdapter.kt @@ -0,0 +1,50 @@ +package com.example.bondoman.adapters + +import android.annotation.SuppressLint +import android.content.Context +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import android.widget.TextView +import androidx.recyclerview.widget.RecyclerView +import com.example.bondoman.R +import com.example.bondoman.database.Transaction + +class CardAdapter(private val context: Context, private val data: List<Transaction>) : + RecyclerView.Adapter<CardAdapter.CardViewHolder>() { + + // ViewHolder class to hold the views + class CardViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { + // Define views here + val textViewName: TextView = itemView.findViewById(R.id.transaksi_name) + val textViewDate: TextView = itemView.findViewById(R.id.transaksi_date) + val textViewCategory: TextView = itemView.findViewById(R.id.transaksi_category) + val textViewLocation: TextView = itemView.findViewById(R.id.text_view_location_name) + val textViewPrice: TextView = itemView.findViewById(R.id.transaksi_price) + } + + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): CardViewHolder { + // Inflate the item layout + val view = LayoutInflater.from(context).inflate(R.layout.card_item, parent, false) + return CardViewHolder(view) + } + + @SuppressLint("SetTextI18n") + override fun onBindViewHolder(holder: CardViewHolder, position: Int) { + val item = data[position] + holder.textViewName.text = item.name + holder.textViewDate.text = item.date + holder.textViewCategory.text = item.category + holder.textViewPrice.text = "IDR " + item.price.toString() + if (item.category == "Pembelian") { + holder.textViewLocation.visibility = View.VISIBLE + holder.textViewLocation.text = item.locationName + } else { + holder.textViewLocation.visibility = View.GONE + } + } + + override fun getItemCount(): Int { + return data.size + } +} diff --git a/app/src/main/java/com/example/bondoman/adapters/TransaksiAdapter.kt b/app/src/main/java/com/example/bondoman/adapters/TransaksiAdapter.kt deleted file mode 100644 index ba4e5b7c733fed22d7c52d0c074b0e411bea1ac9..0000000000000000000000000000000000000000 --- a/app/src/main/java/com/example/bondoman/adapters/TransaksiAdapter.kt +++ /dev/null @@ -1,66 +0,0 @@ -package com.example.bondoman.adapters - -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup -import android.widget.ImageButton -import android.widget.TextView -import androidx.recyclerview.widget.RecyclerView -import com.example.bondoman.R -import com.example.bondoman.domain.TransaksiItem -import com.example.bondoman.ui.theme.OnTransaksiUpdateListener - -class TransaksiAdapter ( - private var list: ArrayList<TransaksiItem> -) : RecyclerView.Adapter<TransaksiAdapter.TransaksiHolder>() { - - private lateinit var onTransaksiUpdateListener: OnTransaksiUpdateListener - - class TransaksiHolder(val view: View, private val onTransaksiUpdateListener: OnTransaksiUpdateListener) : RecyclerView.ViewHolder(view) { - private var transaksiNameTextView: TextView? = null - private var transaksiNominalTextView: TextView? = null - private var transaksiCategoryTextView: TextView? = null - private var transaksiLocationTextView: TextView? = null - private var transaksiAddButton: ImageButton? = null - - init { - transaksiNameTextView = view.findViewById(R.id.transaksiNameTextView) - transaksiNominalTextView = view.findViewById(R.id.transaksiNominalTextView) - transaksiCategoryTextView = view.findViewById(R.id.transaksiCategoryTextView) - transaksiLocationTextView = view.findViewById(R.id.transaksiLocationTextView) - transaksiAddButton = view.findViewById(R.id.transaksiAddButton) - } - - fun bind(data: TransaksiItem) { - transaksiNameTextView?.text = data.name - transaksiNominalTextView?.text = data.nominal.toString() - transaksiLocationTextView?.text = data.location - - transaksiAddButton?.setOnClickListener { - val pos = adapterPosition - if (pos != RecyclerView.NO_POSITION) { - onTransaksiUpdateListener.OnItemUpdated(data, pos) - } - } - } - } - - override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): TransaksiHolder { - return TransaksiHolder(LayoutInflater.from(parent.context).inflate(R.layout.transaksi_card, parent, false), onTransaksiUpdateListener) - } - - override fun onBindViewHolder(holder: TransaksiHolder, position: Int) { - holder.bind(list[position]) - } - - override fun getItemCount(): Int { - return list!!.size - } - - fun updateTransaksiList(transaksiList: ArrayList<TransaksiItem>, onTransaksiUpdateListener: OnTransaksiUpdateListener) { - list.clear() - list = transaksiList - this.onTransaksiUpdateListener = onTransaksiUpdateListener - notifyDataSetChanged() - } -} \ No newline at end of file diff --git a/app/src/main/java/com/example/bondoman/database/Item.kt b/app/src/main/java/com/example/bondoman/database/Item.kt index a782e05a62f93a5d147eadd81fe14d661ded8ba6..4e592eabe9e2d6c4341b5b298b4f3e80fb8f4f5d 100644 --- a/app/src/main/java/com/example/bondoman/database/Item.kt +++ b/app/src/main/java/com/example/bondoman/database/Item.kt @@ -10,5 +10,6 @@ data class Item( @ColumnInfo(name = "name") val name: String, @ColumnInfo(name = "nominal") val nominal: Int, @ColumnInfo(name = "category") val category: String, + @ColumnInfo(name = "date") val date: String, @ColumnInfo(name = "location") val location: String ) \ No newline at end of file diff --git a/app/src/main/java/com/example/bondoman/database/Transaction.kt b/app/src/main/java/com/example/bondoman/database/Transaction.kt new file mode 100644 index 0000000000000000000000000000000000000000..36e0bb336145b0e2267c5f6d80d447ea2d2c6349 --- /dev/null +++ b/app/src/main/java/com/example/bondoman/database/Transaction.kt @@ -0,0 +1,64 @@ +package com.example.bondoman.database + +// Create a data class to represent each item in the JSON array +data class Transaction( + val name: String, + val date: String, + val itemName: String, + val price: Int, + val locationName: String, + val category: String +) + +// Define your data list using the Transaction data class +val yourDataList = listOf( + Transaction( + name = "Item 1", + date = "29/02/2024", + itemName = "Warteg", + price = 15000, + locationName = "Location 1", + category = "Pembelian" + ), + Transaction( + name = "Item 2", + date = "30/02/2024", + itemName = "Restaurant", + price = 200000, + locationName = "Location 2", + category = "Pembelian" + ), + Transaction( + name = "Item 3", + date = "29/02/2024", + itemName = "Gaji Bulanan", + price = 15000000, + locationName = "Surabaya", + category = "Pemasukan" + ), + Transaction( + name = "Item 4", + date = "30/02/2024", + itemName = "Sephora", + price = 2000000, + locationName = "Location 2", + category = "Pembelian" + ), + Transaction( + name = "Item 5", + date = "29/02/2024", + itemName = "THR", + price = 1500000, + locationName = "Location 1", + category = "Pemasukan" + ), + Transaction( + name = "Item 6", + date = "30/02/2024", + itemName = "Winter Coat", + price = 20000000, + locationName = "Location 2", + category = "Pembelian" + ) +) + diff --git a/app/src/main/java/com/example/bondoman/fragmen_transaksi.kt b/app/src/main/java/com/example/bondoman/fragmen_transaksi.kt new file mode 100644 index 0000000000000000000000000000000000000000..7f7dbe6870e2db4e3a17863f3ab67705d37aba01 --- /dev/null +++ b/app/src/main/java/com/example/bondoman/fragmen_transaksi.kt @@ -0,0 +1,85 @@ +package com.example.bondoman + +import android.content.Intent +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.fragment.app.Fragment +import androidx.recyclerview.widget.LinearLayoutManager +import androidx.recyclerview.widget.RecyclerView +import com.example.bondoman.adapters.CardAdapter +import com.example.bondoman.database.yourDataList +import com.google.android.material.floatingactionbutton.FloatingActionButton + +// TODO: Rename parameter arguments, choose names that match +// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER +private const val ARG_PARAM1 = "param1" +private const val ARG_PARAM2 = "param2" + +/** + * A simple [Fragment] subclass. + * Use the [fragmen_transaksi.newInstance] factory method to + * create an instance of this fragment. + */ +class fragmen_transaksi : Fragment() { + // TODO: Rename and change types of parameters + private var param1: String? = null + private var param2: String? = null + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + arguments?.let { + param1 = it.getString(ARG_PARAM1) + param2 = it.getString(ARG_PARAM2) + } + } + + override fun onCreateView( + inflater: LayoutInflater, container: ViewGroup?, + savedInstanceState: Bundle? + ): View? { + // Inflate the layout for this fragment + val view = inflater.inflate(R.layout.fragmen_transaksi, container, false) + + // Find the RecyclerView from the layout + val recyclerView: RecyclerView = view.findViewById(R.id.recycler_view) + + // Set up RecyclerView + recyclerView.layoutManager = LinearLayoutManager(context) + + recyclerView.adapter = context?.let { CardAdapter(it, yourDataList) } + + // Find the FloatingActionButton + val fab: FloatingActionButton = view.findViewById(R.id.fab) + + // Set onClickListener for the FloatingActionButton + fab.setOnClickListener { + val intent = Intent(requireContext(), TransaksiBaruActivity::class.java) + startActivity(intent) + } + + return view + } + + + companion object { + /** + * Use this factory method to create a new instance of + * this fragment using the provided parameters. + * + * @param param1 Parameter 1. + * @param param2 Parameter 2. + * @return A new instance of fragment fragmen_transaksi. + */ + // TODO: Rename and change types and number of parameters + @JvmStatic + fun newInstance(param1: String, param2: String) = + fragmen_transaksi().apply { + arguments = Bundle().apply { + putString(ARG_PARAM1, param1) + putString(ARG_PARAM2, param2) + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/bondoman/fragment_settings.kt b/app/src/main/java/com/example/bondoman/fragment_settings.kt new file mode 100644 index 0000000000000000000000000000000000000000..5735d156c2442590ba5239785e1f3dfc32da3045 --- /dev/null +++ b/app/src/main/java/com/example/bondoman/fragment_settings.kt @@ -0,0 +1,16 @@ +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.fragment.app.Fragment +import com.example.bondoman.R + +class SettingsFragment : Fragment() { + + override fun onCreateView( + inflater: LayoutInflater, container: ViewGroup?, + savedInstanceState: Bundle? + ): View? { + return inflater.inflate(R.layout.fragment_settings, container, false) + } +} diff --git a/app/src/main/res/drawable/ic_add.xml b/app/src/main/res/drawable/ic_add.xml new file mode 100644 index 0000000000000000000000000000000000000000..63dfa3858d134dbfdb729492e5a9d08d32af2f3f --- /dev/null +++ b/app/src/main/res/drawable/ic_add.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="50dp" + android:height="50dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + + <path + android:fillColor="#FFFFFF" + android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2Z"/> + +</vector> diff --git a/app/src/main/res/drawable/ic_close.xml b/app/src/main/res/drawable/ic_close.xml new file mode 100644 index 0000000000000000000000000000000000000000..4107fb6d5c2695230453fdbaaa6577b45e31bcb5 --- /dev/null +++ b/app/src/main/res/drawable/ic_close.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="50dp" + android:height="50dp" + android:viewportWidth="24" + android:viewportHeight="24" + android:tint="@android:color/white" + android:alpha="0.97"> + <path + android:fillColor="@android:color/white" + android:pathData="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/> +</vector> diff --git a/app/src/main/res/font/inter.xml b/app/src/main/res/font/inter.xml index 1f2aa90ab8da80ee72d5e17ffe6b1d1a850ad8d1..8ceb124b5575f92e280b3b83ecb7662077ab6be9 100644 --- a/app/src/main/res/font/inter.xml +++ b/app/src/main/res/font/inter.xml @@ -1,7 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <font-family xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" app:fontProviderAuthority="com.google.android.gms.fonts" app:fontProviderPackage="com.google.android.gms" app:fontProviderQuery="Inter" - app:fontProviderCerts="@array/com_google_android_gms_fonts_certs"> + tools:ignore="FontValidation"> </font-family> \ No newline at end of file diff --git a/app/src/main/res/layout/activity_add_transaksi.xml b/app/src/main/res/layout/activity_add_transaksi.xml index 3b311713341dcc91b9e5d4bc873a16255705f35a..66cf79ec8b7ee1d4aafe8417e9165d1f51c81453 100644 --- a/app/src/main/res/layout/activity_add_transaksi.xml +++ b/app/src/main/res/layout/activity_add_transaksi.xml @@ -7,22 +7,6 @@ android:layout_height="match_parent" android:background="@color/white" > - <TextView - android:id="@+id/section_name" - android:gravity="center_horizontal" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:paddingTop="50dp" - android:paddingBottom="10dp" - android:fontFamily="@font/inter" - android:textStyle="bold" - android:text="Transaksi" - android:textColor="@color/black" - android:textSize="25sp" - android:visibility="gone" - tools:layout_editor_absoluteX="10dp" - tools:visibility="visible" /> - <LinearLayout android:layout_width="292dp" android:layout_height="wrap_content" @@ -30,6 +14,22 @@ android:orientation="vertical" tools:ignore="UselessParent"> + <TextView + android:id="@+id/section_name" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:fontFamily="@font/inter" + android:gravity="center_horizontal" + android:paddingTop="50dp" + android:paddingBottom="10dp" + android:text="@string/transaksi_baru" + android:textColor="@color/black" + android:textSize="25sp" + android:textStyle="bold" + android:visibility="gone" + tools:layout_editor_absoluteX="10dp" + tools:visibility="visible" /> + <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -44,7 +44,7 @@ <EditText android:id="@+id/id_judul" android:layout_width="match_parent" - android:layout_height="40dp" + android:layout_height="43dp" android:layout_marginTop="2dp" android:background="@color/light_gray" android:inputType="text" @@ -67,10 +67,11 @@ <EditText android:id="@+id/id_nominal" android:layout_width="match_parent" - android:layout_height="40dp" - android:layout_marginTop="2dp" + android:layout_height="43dp" + android:layout_marginTop="8dp" + android:layout_marginBottom="8dp" android:background="@color/light_gray" - android:inputType="textPassword" + android:inputType="numberDecimal" android:hint="@string/nominal" android:textColorHint="@color/light_gray" android:autofillHints="no" @@ -87,17 +88,14 @@ android:layout_gravity="start" android:text="@string/kategori" /> - <EditText + <Spinner android:id="@+id/id_kategori" android:layout_width="match_parent" - android:layout_height="40dp" + android:layout_height="43dp" android:layout_marginTop="2dp" + android:layout_marginBottom="8dp" android:background="@color/light_gray" - android:inputType="text" - android:hint="@string/kategori" - android:textColorHint="@color/light_gray" - android:autofillHints="no" - android:maxLines="1" /> + android:spinnerMode="dropdown" /> <TextView android:layout_width="wrap_content" @@ -113,7 +111,7 @@ <EditText android:id="@+id/id_lokasi" android:layout_width="match_parent" - android:layout_height="40dp" + android:layout_height="43dp" android:layout_marginTop="2dp" android:background="@color/light_gray" android:inputType="text" @@ -134,6 +132,22 @@ android:textColor="@color/black" android:background="@color/main_green" android:text="@string/simpan" /> + </LinearLayout> + <com.google.android.material.floatingactionbutton.FloatingActionButton + android:id="@+id/fab_close" + android:layout_width="56dp" + android:layout_height="56dp" + android:layout_gravity="end|top" + android:layout_margin="16dp" + android:scaleType="center" + android:src="@drawable/ic_close" + android:tint="@android:color/white" + app:backgroundTint="@color/red" + app:borderWidth="0dp" + app:elevation="6dp" + app:maxImageSize="24dp" /> + + </RelativeLayout> \ 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 7c64204ee96c236ea7f7817c1c4e2b7e5a91cea7..8af815a8aeeea06f81e32217fbb233888221e5da 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -7,34 +7,42 @@ tools:context=".MainActivity" android:background="@color/white"> - <FrameLayout - android:id="@+id/frame_header" + <TextView + android:id="@+id/frame_header_text" android:layout_width="match_parent" - android:layout_height="75dp" + android:layout_height="wrap_content" + android:paddingTop="15dp" + android:paddingBottom="15dp" + android:background="#A7F8DB" + android:gravity="center" + android:textSize="24sp" + android:textColor="#000000" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintHorizontal_bias="0.0" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> <FrameLayout - android:id="@+id/frame_layout" + android:id="@+id/frame_container" android:layout_width="match_parent" android:layout_height="0dp" app:layout_constrainedHeight="true" app:layout_constraintBottom_toTopOf="@+id/bottomNavigationView" app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.0" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/frame_header" /> + app:layout_constraintTop_toBottomOf="@+id/frame_header_text" + app:layout_constraintVertical_bias="0.0" /> <com.google.android.material.bottomnavigation.BottomNavigationView android:id="@+id/bottomNavigationView" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="#A8F6AB" - app:itemIconTint="@android:color/holo_green_light" + android:background="#A7F8DB" + app:itemIconTint="@android:color/black" + app:itemTextColor="@android:color/black" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.0" app:layout_constraintStart_toStartOf="parent" - app:menu="@menu/navbar" /> + app:menu="@menu/bottom_navbar" /> </androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/app/src/main/res/layout/activity_splash.xml b/app/src/main/res/layout/activity_splash.xml index f79afd6f97835e28ee7ed6e12ed647399e1d5410..74276357b30090fe36749c4f7ed9b81dec6736e1 100644 --- a/app/src/main/res/layout/activity_splash.xml +++ b/app/src/main/res/layout/activity_splash.xml @@ -9,14 +9,15 @@ <ImageView android:id="@+id/imageView" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginStart="18dp" - android:layout_marginEnd="16dp" + android:layout_width="329dp" + android:layout_height="123dp" + android:layout_marginStart="30dp" + android:layout_marginEnd="30dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.479" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:layout_constraintVertical_bias="0.499" - app:srcCompat="@drawable/img" /> + app:srcCompat="@drawable/img" + android:contentDescription="@string/logo"/> </androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/app/src/main/res/layout/card_item.xml b/app/src/main/res/layout/card_item.xml new file mode 100644 index 0000000000000000000000000000000000000000..4e399c11105c1a95922ce5952f8654cff713028e --- /dev/null +++ b/app/src/main/res/layout/card_item.xml @@ -0,0 +1,131 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- card_item_layout.xml --> + +<androidx.cardview.widget.CardView 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:id="@+id/menu_card_view" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="8dp" + android:layout_marginTop="20dp" + android:layout_marginLeft="10dp" + android:layout_marginRight="10dp" + app:cardBackgroundColor="#6DED6B" + app:layout_constraintTop_toBottomOf="@+id/section_name" + app:cardCornerRadius="12dp"> + + <LinearLayout + android:layout_width="200dp" + android:layout_height="wrap_content" + android:layout_marginLeft="10dp" + android:layout_marginTop="5dp" + android:orientation="vertical"> + + <TextView + android:id="@+id/transaksi_date" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="12dp" + android:layout_marginTop="8dp" + android:fontFamily="@font/inter" + android:textColor="@color/black" + android:textSize="15sp" + android:textStyle="bold" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + tools:text="29/02/2024" /> + + <TextView + android:id="@+id/transaksi_name" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="12dp" + android:layout_marginTop="8dp" + android:fontFamily="@font/inter" + android:text="@string/app_name" + android:textColor="@color/black" + android:textSize="20sp" + android:textStyle="bold" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/transaksi_date" + tools:text="Warteg" /> + + <TextView + android:id="@+id/transaksi_price" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="12dp" + android:layout_marginTop="8dp" + android:layout_marginBottom="12dp" + android:fontFamily="@font/inter" + android:text="@string/app_name" + android:textColor="@color/black" + android:textSize="15sp" + android:textStyle="bold" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/transksi_name" + tools:text="IDR 15.0000" /> + + </LinearLayout> + + <LinearLayout + android:id="@+id/category_layout" + android:layout_width="120dp" + android:layout_height="48dp" + android:layout_margin="8dp" + android:gravity="left" + android:orientation="horizontal"> + + </LinearLayout> + + <LinearLayout + android:layout_width="150dp" + android:layout_height="match_parent" + android:orientation="vertical" + android:gravity="end" + android:layout_marginBottom="10dp" + android:layout_marginTop="10dp" + android:layout_marginEnd="15dp" + android:layout_marginStart="220dp" + tools:ignore="RtlHardcoded,UseCompoundDrawables"> + + <TextView + android:id="@+id/transaksi_category" + android:layout_width="87dp" + android:layout_height="wrap_content" + android:layout_gravity="top|end" + android:fontFamily="@font/inter" + android:text="@string/app_name" + android:textColor="@color/black" + android:textSize="15sp" + tools:text="Pembelian" /> + + <LinearLayout + android:layout_marginTop="50dp" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:orientation="horizontal" + android:layout_gravity="bottom|right"> + + <TextView + android:id="@+id/text_view_location_name" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="16sp" + android:layout_marginBottom="5dp" + android:text="Location Name"/> + + <ImageView + android:id="@+id/image_view_location_icon" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:src="@drawable/location" + android:layout_marginLeft="10dp"/> + + + </LinearLayout> + + </LinearLayout> + +</androidx.cardview.widget.CardView> diff --git a/app/src/main/res/layout/fragmen_transaksi.xml b/app/src/main/res/layout/fragmen_transaksi.xml new file mode 100644 index 0000000000000000000000000000000000000000..d10160767d2d975d2cb98a9fcf458a4edbf04768 --- /dev/null +++ b/app/src/main/res/layout/fragmen_transaksi.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"> + + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/recycler_view" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:padding="8dp" + android:clipToPadding="false" + android:background="@android:color/white" + android:scrollbars="vertical"/> + + <com.google.android.material.floatingactionbutton.FloatingActionButton + android:id="@+id/fab" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="16dp" + android:src="@drawable/ic_add" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + tools:ignore="ContentDescription" /> + +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/fragment_settings.xml similarity index 71% rename from app/src/main/res/layout/activity_settings.xml rename to app/src/main/res/layout/fragment_settings.xml index ce89c16e96b2b20c0b39d8e2ff10110adb2b52f1..ab930ff1f2661367adccc6480810696d6ab89d72 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/fragment_settings.xml @@ -1,35 +1,31 @@ <?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" +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" - android:layout_height="wrap_content"> + android:layout_height="match_parent" + android:orientation="vertical"> <TextView android:id="@+id/section_name" - android:gravity="center_horizontal" - android:background="#95FFE5" android:layout_width="match_parent" - android:layout_height="match_parent" - android:paddingTop="10dp" - android:paddingBottom="10dp" - android:fontFamily="@font/inter" - android:textStyle="bold" - android:text="Pengaturan" + android:layout_height="wrap_content" + android:background="#95FFE5" + android:gravity="center_horizontal" + android:paddingTop="15dp" + android:paddingBottom="15dp" + android:text="@string/setting" android:textColor="@color/black" - android:textSize="25sp" + android:textSize="28sp" + android:textStyle="bold" android:visibility="gone" - tools:layout_editor_absoluteX="10dp" tools:visibility="visible" /> <LinearLayout android:id="@+id/menu_settings" android:layout_width="match_parent" android:layout_height="wrap_content" - android:padding="18dp" android:orientation="vertical" - app:layout_constraintTop_toBottomOf="@+id/section_name" > + android:padding="18dp"> <Button android:id="@+id/btn_simpandft" @@ -39,42 +35,45 @@ android:background="@color/light_gray" android:fontFamily="sans-serif-medium" android:paddingStart="16dp" - android:text="Simpan Daftar Transaksi" + android:text="@string/setting_button_1" android:textAlignment="viewStart" android:textAllCaps="false" android:textColor="@color/black" android:textFontWeight="400" - android:textSize="24sp" /> + android:textSize="22sp" + tools:ignore="RtlSymmetry" /> <Button android:id="@+id/btn_kirimdft" android:layout_width="match_parent" android:layout_height="48dp" android:layout_marginTop="22dp" - android:fontFamily="sans-serif-medium" - android:textSize="24sp" - android:textFontWeight="400" - android:textColor="@color/black" - android:textAlignment="viewStart" android:background="@color/light_gray" + android:fontFamily="sans-serif-medium" android:paddingStart="16dp" + android:text="@string/setting_button_2" + android:textAlignment="viewStart" android:textAllCaps="false" - android:text="Kirim Daftar Transaksi" /> + android:textColor="@color/black" + android:textFontWeight="400" + android:textSize="22sp" + tools:ignore="RtlSymmetry" /> <Button android:id="@+id/btn_keluar" android:layout_width="match_parent" android:layout_height="48dp" android:layout_marginTop="22dp" - android:fontFamily="sans-serif-medium" - android:textSize="24sp" - android:textFontWeight="400" - android:textColor="#CE0000" - android:textAlignment="viewStart" android:background="@color/light_gray" + android:fontFamily="sans-serif-medium" android:paddingStart="16dp" + android:text="@string/setting_button_3" + android:textAlignment="viewStart" android:textAllCaps="false" - android:text="Keluar" /> + android:textColor="#CE0000" + android:textFontWeight="400" + android:textSize="22sp" + tools:ignore="RtlSymmetry" /> </LinearLayout> -</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file +</LinearLayout> diff --git a/app/src/main/res/layout/transaksi_card.xml b/app/src/main/res/layout/transaksi_card.xml deleted file mode 100644 index d81c707ba2e53a94c958b0af13b74965af3437f2..0000000000000000000000000000000000000000 --- a/app/src/main/res/layout/transaksi_card.xml +++ /dev/null @@ -1,142 +0,0 @@ -<?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="wrap_content"> - - <TextView - android:id="@+id/section_name" - android:gravity="center_horizontal" - android:background="#95FFE5" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:paddingTop="10dp" - android:paddingBottom="10dp" - android:fontFamily="@font/inter" - android:textStyle="bold" - android:text="Transaksi" - android:textColor="@color/black" - android:textSize="25sp" - android:visibility="gone" - tools:layout_editor_absoluteX="10dp" - tools:visibility="visible" /> - - <androidx.cardview.widget.CardView - android:id="@+id/menu_card_view" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginBottom="8dp" - app:cardBackgroundColor="#6DED6B" - app:layout_constraintTop_toBottomOf="@+id/section_name" - app:cardCornerRadius="12dp"> - <LinearLayout - android:baselineAligned="false" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="horizontal"> - - <LinearLayout - android:id="@+id/menu_data" - android:layout_width="0dp" - android:layout_weight="1" - android:layout_height="wrap_content" - android:orientation="vertical" - android:padding="10dp"> - - <TextView - android:id="@+id/transaksi_date" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginStart="12dp" - android:layout_marginTop="8dp" - android:fontFamily="@font/inter" - android:text="@string/app_name" - android:textColor="@color/black" - android:textSize="15sp" - android:textStyle="bold" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - tools:text="29/02/2024" /> - - <TextView - android:id="@+id/transksi_name" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginStart="12dp" - android:layout_marginTop="8dp" - android:fontFamily="@font/inter" - android:text="@string/app_name" - android:textColor="@color/black" - android:textSize="20sp" - android:textStyle="bold" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/transaksi_date" - tools:text="Warteg" /> - - <TextView - android:id="@+id/transaksi_price" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginStart="12dp" - android:layout_marginTop="8dp" - android:fontFamily="@font/inter" - android:text="@string/app_name" - android:textColor="@color/black" - android:textSize="15sp" - android:textStyle="bold" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/transksi_name" - tools:text="IDR 15.0000" /> - </LinearLayout> - - <LinearLayout - android:id="@+id/quantity_layout" - android:layout_width="120dp" - android:layout_height="48dp" - android:layout_margin="8dp" - android:gravity="end" - android:orientation="horizontal"> - - <TextView - android:id="@+id/transaksi_type" - android:layout_width="wrap_content" - android:layout_height="30dp" - android:layout_marginStart="12dp" - android:layout_marginTop="8dp" - android:fontFamily="@font/inter" - android:text="@string/app_name" - android:textColor="@color/black" - android:textSize="15sp" - android:textStyle="bold" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - tools:text="Pembelian" /> - - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_margin="4dp" - android:fontFamily="@font/inter" - android:text="0" - android:textColor="@color/white" - android:textSize="15sp" - android:visibility="invisible"/> - - <ImageButton - android:id="@+id/transaksi_location" - android:layout_width="10dp" - android:layout_height="40dp" - android:src="@drawable/location" - android:scaleType="center" - android:layout_marginBottom="100dp" - android:layout_gravity="center_horizontal" - android:layout_marginTop="16dp" - android:background="#6DED6B"/> - - </LinearLayout> - </LinearLayout> - </androidx.cardview.widget.CardView> -</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/app/src/main/res/menu/bottom_navbar.xml b/app/src/main/res/menu/bottom_navbar.xml new file mode 100644 index 0000000000000000000000000000000000000000..c29122d6ffd677a337ba52c72ab0973739aa3caf --- /dev/null +++ b/app/src/main/res/menu/bottom_navbar.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<menu xmlns:android="http://schemas.android.com/apk/res/android"> + <item + android:id="@+id/transaksi" + android:title="@string/transaksi" + android:icon="@drawable/transaksi" /> + <item + android:id="@+id/scan" + android:title="@string/scan" + android:icon="@drawable/scanner" /> + <item + android:id="@+id/graf" + android:title="@string/graf" + android:icon="@drawable/graf" /> + <item + android:id="@+id/setting" + android:title="@string/setting" + android:icon="@drawable/settings" /> +</menu> \ No newline at end of file diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml new file mode 100644 index 0000000000000000000000000000000000000000..4ccbf1173a1981ceb0259b6d7a1685d63be8fc87 --- /dev/null +++ b/app/src/main/res/values/arrays.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string-array name="kategori_options">["Pembelian", "Pemasukan"]</string-array> +</resources> \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 0c5d242a109fbae9c92b310d748d4506652a0805..e5c80e0da97ba2462f207fa7849c4f8186e5185f 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -9,4 +9,5 @@ <color name="white">#FFFFFFFF</color> <color name="light_gray">#D9D9D9</color> <color name="main_green">#A7F8DB</color> + <color name="red">#FF2313</color> </resources> \ No newline at end of file diff --git a/app/src/main/res/values/ids.xml b/app/src/main/res/values/ids.xml index 29dd8e40568b5f4bf9c5f0f6a226d23907185dfc..c8e35bc952ab75af9f0dbca1a9e30d72e0150277 100644 --- a/app/src/main/res/values/ids.xml +++ b/app/src/main/res/values/ids.xml @@ -5,4 +5,5 @@ <item name="transaksiCategoryTextView" type="id" /> <item name="transaksiLocationTextView" type="id" /> <item name="transaksiAddButton" type="id" /> + <item name="transaksi_name" type="id" /> </resources> \ 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 6e09624d75a3c944fb7a0145e2642d6bcbe1edf5..c949ce0536e5814d0b7091b8107cdca8890ed6d6 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -11,5 +11,15 @@ <string name="simpan">Simpan</string> <string name="welcome_user">Welcome %1$s</string> <string name="login_error">Masukkan Email and Password</string> - + <string name="logo">Bondoman Logo</string> + <string name="transaksi">Transaksi</string> + <string name="scan">Scan</string> + <string name="graf">Graf</string> + <string name="setting">Setting</string> + <string name="setting_button_1">Simpan Daftar Transaksi</string> + <string name="setting_button_2">Kirim Daftar Transaksi</string> + <string name="setting_button_3">Keluar</string> + <!-- TODO: Remove or change this placeholder text --> + <string name="hello_blank_fragment">Hello blank fragment</string> + <string name="transaksi_baru">Transaksi Baru</string> </resources> \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 46456264208d56800857c69119d5dac36b4d600a..0db614e9accc798eda2c925a6fbae22ed846f1d7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id("com.android.application") version "8.2.2" apply false + id("com.android.application") version "8.3.0" apply false id("org.jetbrains.kotlin.android") version "1.9.0" apply false } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9bb792fd6ce4c4c6761d3ebe7287aa326a6b0e91..6d1636fb53010e7cdbcf6dd9c491e6a13fa03d0e 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Wed Mar 20 11:45:54 WIB 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists