From 7c92c84a2151e1bf0049511a6b6f1624c2cf086b Mon Sep 17 00:00:00 2001 From: starry69 Date: Tue, 28 Jun 2022 09:44:30 +0530 Subject: [PATCH] Add missing currency symbol in goal info section Signed-off-by: starry69 --- README.md | 6 ++++++ app/build.gradle | 4 ++-- .../com/starry/greenstash/ui/info/InfoFragment.kt | 13 +++++++++---- app/src/main/res/layout/fragment_about.xml | 2 +- fastlane/metadata/android/en-US/changelogs/2.txt | 15 +++++++++++++++ fastlane/metadata/android/en-US/changelogs/3.txt | 1 + .../metadata/android/en-US/full_description.txt | 1 + 7 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/2.txt create mode 100644 fastlane/metadata/android/en-US/changelogs/3.txt diff --git a/README.md b/README.md index 9cb89643..610a3b47 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,12 @@ - [Pin-069](https://twitter.com/pin_069) for screenshot template design. - [Icons8](https://icons8.com/) for vector icons used in about section. +### ♥️ Donations +If this project helped you a little bit, please consider donating to support further development. You can do that either via crypto currency or via kofi, paypal or UPI in sponser tab. + +[![Bitcoin](https://img.shields.io/badge/Bitcoin-000?style=for-the-badge&logo=bitcoin&logoColor=white)](https://www.blockchain.com/btc/address/bc1q82qh9hw5xupwlf0f3ddfud63sek53lavk6cf0k) +[![Ethereum](https://img.shields.io/badge/Ethereum-3C3C3D?style=for-the-badge&logo=Ethereum&logoColor=white)](https://www.blockchain.com/eth/address/0x9ef20ad6FBf1985e6eF6ea6337ad800Cb8126eD3) + ### ©️ License ``` MIT License diff --git a/app/build.gradle b/app/build.gradle index 31ceb6d0..40d878d0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -12,8 +12,8 @@ android { applicationId "com.starry.greenstash" minSdk 24 targetSdk 32 - versionCode 2 - versionName "1.1" + versionCode 3 + versionName "1.2" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" javaCompileOptions { diff --git a/app/src/main/java/com/starry/greenstash/ui/info/InfoFragment.kt b/app/src/main/java/com/starry/greenstash/ui/info/InfoFragment.kt index e8b97c2a..b7dcea5a 100644 --- a/app/src/main/java/com/starry/greenstash/ui/info/InfoFragment.kt +++ b/app/src/main/java/com/starry/greenstash/ui/info/InfoFragment.kt @@ -24,6 +24,7 @@ SOFTWARE. package com.starry.greenstash.ui.info +import android.content.SharedPreferences import android.os.Bundle import android.view.LayoutInflater import android.view.Menu @@ -31,6 +32,7 @@ import android.view.View import android.view.ViewGroup import androidx.fragment.app.Fragment import androidx.lifecycle.ViewModelProvider +import androidx.preference.PreferenceManager import com.starry.greenstash.databinding.FragmentInfoBinding import com.starry.greenstash.utils.SharedViewModel import com.starry.greenstash.utils.formatCurrency @@ -41,8 +43,8 @@ class InfoFragment : Fragment() { // Shared view model class. private lateinit var sharedViewModel: SharedViewModel - private lateinit var binding: FragmentInfoBinding + private lateinit var settingPerf: SharedPreferences override fun onCreateView( inflater: LayoutInflater, @@ -51,6 +53,7 @@ class InfoFragment : Fragment() { ): View { setHasOptionsMenu(true) sharedViewModel = ViewModelProvider(requireActivity()).get(SharedViewModel::class.java) + settingPerf = PreferenceManager.getDefaultSharedPreferences(requireContext()) binding = FragmentInfoBinding.inflate(inflater, container, false) return binding.root } @@ -58,15 +61,17 @@ class InfoFragment : Fragment() { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) + val defCurrency = settingPerf.getString("currency", "") val infoItem = sharedViewModel.getInfoItem() val progress = ((infoItem.currentAmount / infoItem.totalAmount) * 100).toInt() + binding.infoProgressBar.setProgress(progress, true) binding.infoTitle.text = infoItem.title binding.infoEndDate.text = infoItem.deadline - binding.infoTotalAmount.text = formatCurrency(infoItem.totalAmount) - binding.infoCurrentAmount.text = formatCurrency(infoItem.currentAmount) + binding.infoTotalAmount.text = "$defCurrency${formatCurrency(infoItem.totalAmount)}" + binding.infoCurrentAmount.text = "$defCurrency${formatCurrency(infoItem.currentAmount)}" val remainingAmount = infoItem.totalAmount - infoItem.currentAmount - binding.infoRemainingAmount.text = formatCurrency(remainingAmount) + binding.infoRemainingAmount.text = "$defCurrency${formatCurrency(remainingAmount)}" if (infoItem.transactions == null) { binding.transactionView.gone() diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml index 4848e0ca..239773c1 100644 --- a/app/src/main/res/layout/fragment_about.xml +++ b/app/src/main/res/layout/fragment_about.xml @@ -81,7 +81,7 @@ android:layout_height="wrap_content" android:layout_gravity="center_horizontal|center_vertical|bottom" android:layout_marginBottom="10dp" - android:text="Version 1.1 " + android:text="Version 1.2 " android:textStyle="bold" tools:ignore="HardcodedText" /> diff --git a/fastlane/metadata/android/en-US/changelogs/2.txt b/fastlane/metadata/android/en-US/changelogs/2.txt new file mode 100644 index 00000000..f4d3bbfa --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/2.txt @@ -0,0 +1,15 @@ +New features + +- Added search button on toolbar to search for specific saving goal. +- Added filter button on toolbar to filter between All/Completed/Ongoing goals. +- Added brand new goal info section in which you can view detailed information about some specific goal including all transactions (withdraw/deposit) history. +- App will now show dialog to setup your preferred currency when opening app for first time. + +Improvements & fixes + +- Lots of UI related improvements and fixes. +- Fixed app becoming unresponsive for sometime when setting large images, it'll now show progress dialog instead. +- Improved layout of input screen and added material design icons in input fields. +- Improved formatting of currency amount ($1000000 -> $100,000.00) +- Added support for decimal values in currency, i.e app now supports cents aswell instead of whole dollar values. +- Some cleanups and code quality improvements. diff --git a/fastlane/metadata/android/en-US/changelogs/3.txt b/fastlane/metadata/android/en-US/changelogs/3.txt new file mode 100644 index 00000000..a27fa3c3 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/3.txt @@ -0,0 +1 @@ +- Added missing currency symbol in goal info card in goal information section. \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/full_description.txt b/fastlane/metadata/android/en-US/full_description.txt index d40ebaff..cc4f2f39 100644 --- a/fastlane/metadata/android/en-US/full_description.txt +++ b/fastlane/metadata/android/en-US/full_description.txt @@ -1,6 +1,7 @@ GreenStash is a simple android app to help you plan and manage your savings goals easily and establish the habit of saving money. Features + - Clean & beautiful UI based on Google's material design three guidelines. - Add images to your saving goals to keep you motivated! - View how much you need to save daily/weekly/monthly to achieve your goal before deadline.