Skip to content

Commit

Permalink
Add missing currency symbol in goal info section
Browse files Browse the repository at this point in the history
Signed-off-by: starry69 <[email protected]>
  • Loading branch information
starry-shivam committed Jun 28, 2022
1 parent d887a52 commit 7c92c84
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 7 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
13 changes: 9 additions & 4 deletions app/src/main/java/com/starry/greenstash/ui/info/InfoFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ SOFTWARE.

package com.starry.greenstash.ui.info

import android.content.SharedPreferences
import android.os.Bundle
import android.view.LayoutInflater
import android.view.Menu
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
Expand All @@ -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,
Expand All @@ -51,22 +53,25 @@ 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
}

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()
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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" />

Expand Down
15 changes: 15 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/2.txt
Original file line number Diff line number Diff line change
@@ -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.
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/changelogs/3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Added missing currency symbol in goal info card in goal information section.
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/full_description.txt
Original file line number Diff line number Diff line change
@@ -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.
Expand Down

0 comments on commit 7c92c84

Please sign in to comment.