GithubHelp home page GithubHelp logo

prathameshmm02 / calculator-inator Goto Github PK

View Code? Open in Web Editor NEW
142.0 142.0 12.0 8.74 MB

Calculator & Converter for Android

License: GNU General Public License v3.0

Kotlin 100.00%
android calculator fdroid kotlin material-you mvvm

calculator-inator's People

Contributors

bradovman avatar doozydoz avatar gdonisi avatar geozac avatar izzysoft avatar metezd avatar poussinou avatar prathamesh-02 avatar prathameshmm02 avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

calculator-inator's Issues

Add to fdroid

Currently the app is only available on izzydroid repo.

Can't use decimal

Steps to recreate it:
Add the decimal
Press and hold the back botton
Can't add decemal now

If possible change it's name

If possible then change it's name and replaced it with open cal / open Calculator etc.
Only "Calculator" name is not enough because there are many "Calculator" named apps are available inside Fdroid.
open cal / open Calculator this names is easily glorify and it's name that it is open source.
Think about it.

Unexpected ActionBar behaviour

After opening history and scrolling right, the ActionBar still shows the elements of the history page.

Navigation.mp4

many bugs are inside it

Please fix this bugs.

You can't edit (+/-/ร—/รท) history equation.
And many others see this

Calculator.1sign.auto.backward.mp4
Calculator.crushed.when.edit.history_1_1.mp4
Screen-20220502-113031_1.mp4
Screen-20220502-112758.mp4

Widget doesn't work

I'm on Android 12. Have tested on two different launchers, and in neither does the calculator widget work. As in, when pressing any button nothing happens, except on the text field, which causes the app to open.

Wrong percentage calculation

The calculation of a percentage, in certain cases, is incorrect.
If I type 20-10%, the result should be 18, but the app shows 19.9 (it just divides by 100 the number before %).

Here's a screen with your app and Google Calculator:
pic

App Theme Irregularity

Description

  • When in Dark Theme some parts of UI are still like and the status bar is still light too and so is the settings screen
  • Upon switching theme in settings the app goes to the splash screen and then crushes

Set as assistant app

I prefer to not use voice assistants on my phone, making the assistant gesture useless. Replacing this action with opening a calculator would be very useful for fast access.

Some feature requests.

Reduced space & add necessary
[ () ฯ€ โˆš ^ % ] signs at main page.
This is easy to use

Swipe gestures (right /left) to change
Calculator > Converter.

Curser moving gesture like keyboard.
[ . 0 = + ]

Floating Calculator - Calculator in small window that can be open in other app.

Add tile button and widgets to open window/popup mode.

Main page with [ () ฯ€ โˆš ^ % ]
Screenshot_20220429-144210_1j

Screenshot_20220429-144210_1j_1

Secondary page
Screenshot_20220429-171642_1_1_1

Ui design
Screenshot_20220429-223515_1
Screenshot_20220429-223515

Gestures
Screenshot_20220429-144210_1n_1
Screenshot_20220429-144210_1n

inaccurate percent calculation

Steps to recreate:
Add any number by any percent such as 999+7%

Result:
I get 999.07

Expected result:
I expect to get 1068.93
Screenshot_20221009-212115_Calculator-inator

New Design Proposal

I would like to contribute a design proposal for Calculator-inator. Before diving into the specifics, I'd like to reference two existing issues that discuss the Material You Theme: Issue #1 and Issue #16.

I appreciate the efforts to integrate the Material You theme into the application. However, I would like to share my perspective on why the standard Material You Theme might not be the most suitable choice for a calculator app. Notably, there are already numerous apps adopting the same theme, such as yetCalc, mintcalc, unitto and zCalc, to name a few. This saturation might result in a lack of distinctiveness for your app among others.

Another concern I have pertains to the significant space occupied by assigning each button a background color and the required padding. I believe this space could be used more efficiently. Instead of requiring users to toggle to view the history, it could be beneficial to display it by default, saving users an extra step and enhancing the overall user experience. This feature could also set your app apart from others.

Having expressed my concerns about the Material You Theme, I would like to introduce some design changes in my proposal. Firstly, as mentioned earlier, I suggest displaying the history by default without the need for a toggle or button. A minor adjustment involves incorporating evenly distributed icons for switching between the calculator, converter, currency converter, and settings functions.

Another significant alteration is the inclusion of a button to switch to advanced mathematical operators, replacing the sidebar. This change addresses the issue where the same gesture on Android is interpreted as a "back" action.

Additionally, I propose prefixing each result with an equals sign to provide clarity in the presentation of calculations. To enhance accessibility, I recommend implementing a design swap: pressing the equals sign should transition the result to light text (#e4e2e6) and the calculation to darkened text (#535a73).

Regarding the color scheme, I have adjusted the background to #1b1a1f, light text to #e4e2e6, and darkened text to #535a73. I have also incorporated the Swap Icon, available under the MIT License and created by Adam Whitcroft. The chosen font is Manrope.

I hope you find these suggestions intriguing and consider them for the future development of Calculator-inator. I am open to further discussions and collaboration to refine these ideas.

Thank you for your time and dedication to maintaining this excellent open-source project.
hjihkjij

Incompatibility with Android 12L

On a physical device running Android 12L the following are observed in the logcat.
App version: 1.2.0

E AndroidRuntime: FATAL EXCEPTION: main
E AndroidRuntime: Process: com.inator.calculator.debug, PID: 20337
E AndroidRuntime: java.lang.RuntimeException: Unable to start receiver com.inator.calculator.widget.CalcWidget: java.lang.IllegalArgumentException: com.inator.calculator.debug: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
E AndroidRuntime: Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
E AndroidRuntime: 	at android.app.ActivityThread.handleReceiver(ActivityThread.java:4385)
E AndroidRuntime: 	at android.app.ActivityThread.access$1600(ActivityThread.java:257)
E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2103)
E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:201)
E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:288)
E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7873)
E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:550)
E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
E AndroidRuntime: Caused by: java.lang.IllegalArgumentException: com.inator.calculator.debug: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
E AndroidRuntime: Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
E AndroidRuntime: 	at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
E AndroidRuntime: 	at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:645)
E AndroidRuntime: 	at android.app.PendingIntent.getBroadcast(PendingIntent.java:632)
E AndroidRuntime: 	at com.inator.calculator.widget.CalcWidget.setUpIntent(CalcWidget.kt:105)
E AndroidRuntime: 	at com.inator.calculator.widget.CalcWidget.onUpdate(CalcWidget.kt:44)
E AndroidRuntime: 	at android.appwidget.AppWidgetProvider.onReceive(AppWidgetProvider.java:66)
E AndroidRuntime: 	at com.inator.calculator.widget.CalcWidget.onReceive(CalcWidget.kt:99)
E AndroidRuntime: 	at android.app.ActivityThread.handleReceiver(ActivityThread.java:4376)
E AndroidRuntime: 	... 9 more

Use a muted tone of color

I like how the color follows the material theme of the device, but it is a bit too sharp especially in dark mode.

Option for fixed orientation

Auto-rotate sometimes triggers when I put the phone on the table and pick it up, because it is covered with documents. This creates an unpleasant effect, and I prefer using the portrait mode for the calculator.

Is it possible to have an option to fix the orientation to Portrait?

I want to keep Auto-rotate enabled, because I use most apps with the phone in the hand.

Add date difference

It would be nice to calculate difference between dates. For example like in Xiaomi calculator:
Screenshot_2022-12-31-22-25-52-821_com miui calculator

Conversion is not accurate.

USDINR pair is currently trading at ~ 78. This calculator shows 74.24.

BTCUSD pair is currently trading at ~ 21000. This calculator shows 42034.11.

1 gigabyte = 1024 megabyte. This calculator shows 1000.

1 hour = 60 minutes. This calculator shows 24.00000000000864.

1 day = 24 hours. This calculator shows 6.999999999993952.

Add alternative to swipe gesture opening of extended functions tab

I use gesture navigation, and this makes it hard for me to open the tab of additional functions in the right (sin, cos etc.). Either use an alternate solution to opening this tab such as a button, or detect if gesture navigation or button navigation is used. I don't know if detecting this is possible, so if it isn't add a settings toggle.

Floating calculator feature

Adding a floating calculator feature would make the app VERY handy. Like e.g. the Mi Calculator. Also a quick settings tile that would open directly the floating calculator would be very functional.

Add an option to extend functions on left side

Hello! I think that you should add an option in the setting, that the blue extension with angle functions and brackets... would be placed on the left handside (especialy when being in panorama mode?).

Change fonts (numbers & sign)

This app is too good and add some extra features that make it different than other.

Numbers are thin if possible then change its font.

Screenshot_20220429-144210_1

Certain conditions cause the app to crash

Steps to reproduce the crash -

  • Go to "Time" converter.
  • Change "from" to hour.
  • Change "to" to minute, seconds, etc.
  • Enter "1" in hours.
  • Change converter type to Temperature.
  • App crashes.

In some instances after the crash the app can't be opened. However, it opens if cache and storage data is cleared.

Crash.mp4

Leading Decimal Crash in Convertor

When converting a decimal quantity less than 1, if you leave out the leading 0 (say by typing .07 instead of 0.07) the app will crash. Thanks for the awesome calc!

Floating point logic leads to incorrect measurement conversions

Since I have not seen any progress in correspondence with my previous comment, I am opening a new issue.

There is a large discrepancy in US measurements. For instance, 1 US gallon should be 16 US cups, but I'll list a bunch of discrepancies below (due to errors in floating point logic that need to be fixed by using more modern decimal division methods, such as Java's BigDecimal implementation). The converter returns the following incorrect conversions between US volume measurements:

1 gallon = 4.000007570825068 quarts
1 gallon = 8.000015141650136 pints
1 gallon = 15.77255222607493 cups
1 gallon = 127.99993943339943 fluid ounces
1 gallon = 255.99987886679887 tablespoons
1 gallon = 767.9996366003967 teaspoons
quart -> all above conversions (gallon, pint, cups, fl oz, tbsp, tsp)
pint -> all above conversions
...
etc.

The following US length conversions are also incorrect:

1 mile = 1759.9903173999999 yards
1 mile = 5279.9870456 feet
1 mile = 63359.876734 inches
...
etc.

All US conversions are incorrect due to poorly handled floating point logic. I imagine the same is true for (non-US) imperial measurements. This also means the conversion between metric and imperial (US and non-US) has a large error.

I don't personally know much about Kotlin, but I believe there is some implementation of BigDecimal as per the documentation. I also saw some discussion about multiplatform limitations when I briefly looked into it here. At the worst, it seems like you may need to use an external library to port the functionality to Android, and that is discussed in the forum post I linked. The BigDecimal can be used for all division, it doesn't have to be used exclusively for imperial measurements with non-metric subdivisions. That would also potentially take the place of any system you used to ensure consistency in metric conversions (as while dividing by factors of 10 would still usually result in floating point inaccuracies, it seems the conversions for metric all work).

I should mention that I realize you likely use APIs to handle all of your unit conversions. However, since these conversions won't ever change, there would be no reason not to hard code them if that would allow you to achieve more accurate results. This also decreases reliance on sending requests through the Internet, which is all around a bonus for the end user. Of course, this doesn't extend to currency exchange rates, but it works great for measurements.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • fix(deps): update dependency com.google.android.material:material to v1.11.0
  • fix(deps): update dependency com.squareup.retrofit2:converter-gson to v2.11.0
  • fix(deps): update dependency com.squareup.retrofit2:retrofit to v2.11.0
  • chore(deps): update actions/setup-java action to v4
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/android.yml
  • actions/checkout v3
  • actions/setup-java v3
gradle
gradle.properties
settings.gradle
build.gradle
  • com.android.tools.build:gradle 8.0.1
  • org.jetbrains.kotlin:kotlin-gradle-plugin 1.8.21
  • com.github.ben-manes.versions 0.46.0
  • com.google.devtools.ksp 1.8.21-1.0.11
  • androidx.appcompat:appcompat 1.6.1
  • androidx.core:core-ktx 1.10.0
  • androidx.room:room-ktx 2.5.1
  • androidx.room:room-compiler 2.5.1
  • androidx.lifecycle:lifecycle-viewmodel-ktx 2.6.1
  • androidx.lifecycle:lifecycle-livedata-ktx 2.6.1
  • org.jetbrains.kotlinx:kotlinx-coroutines-core 1.7.0
  • org.jetbrains.kotlinx:kotlinx-coroutines-android 1.7.0
  • androidx.constraintlayout:constraintlayout 2.1.4
  • com.google.android.material:material 1.9.0
app/build.gradle
  • com.squareup.retrofit2:retrofit 2.9.0
  • com.squareup.retrofit2:converter-gson 2.9.0
  • androidx.preference:preference-ktx 1.2.0
  • org.mariuszgromada.math:MathParser.org-mXparser 5.2.1
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.0

  • Check this box to trigger a request for Renovate to run again on this repository

Cannot enter negative values in converter

This is pretty self-explanatory. I wanted to convert a termerature in Celsius to Fahrenheit (-12.1ยฐC, to be exact), but I could not enter any negative value. Converting negative temperatures is very useful given that I currently live fairly far North, and plan to move much further North, but still don't have a great bearing on negative Celsius due to having grown up using Fahrenheit.

I imagine that this issue may exist for other units that can be negative, but I can't recall what other units have negative ranges.

Floating text selection action

When selecting text (in this case, certain amounts in other currencies or measurement units) outside the app, an option to open Calculator-inator as a popup in the lower half of the screen to do the conversion would speed up having to copy, exit the app, open CI and paste the number on there.

[Crash] App crashes in the currency converter

The app crashes when selecting one of the two input fields of the currency converter section and inputting some data.

  1. open the currency tab
  2. select one of the two input fields
  3. input something
  4. select the other text field
  5. attempt to input something, the app crashes here for me.

I was able to reproduce this when starting from the first and the second text box, it has the same outcome.

Also, quick thing, some padding on the refresh button wouldn't hurt since it hides the bottom text field when the keyboard is up!

Bug Report

Scenario

  • Type 6 x 7
  • press =
  • Type 5
  • App crushes

Screenshots

Possible cause

  • In logcat we have an indexOutOfBounds
  • Position of insertion is told from the cursorPosition relative to the expression

[Feature Request] Swipe to delete individual calculation.

Users sometimes want to keep some calculations and delete the rest. This calculator only offers bulk delete. This is a feature request to add swipe to delete individual calculations from the history section. This calculator offers this but the project is abandoned and the UI is not nice like Calculator-inator.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.