Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: forzzzzz/Calculator-You
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.0.0
Choose a base ref
...
head repository: forzzzzz/Calculator-You
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Aug 9, 2024

  1. Translated using Weblate (Italian)

    Currently translated at 88.8% (8 of 9 strings)
    
    Translation: Calculator You/Metadata/full description
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadatafull-description/it/
    dontlookherepls authored and weblate committed Aug 9, 2024
    Copy the full SHA
    c289b7f View commit details
  2. Translated using Weblate (German)

    Currently translated at 51.9% (144 of 277 strings)
    
    Translation: Calculator You/App
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/app/de/
    BluePixel4k authored and weblate committed Aug 9, 2024
    Copy the full SHA
    760726b View commit details
  3. Translated using Weblate (Spanish)

    Currently translated at 78.7% (218 of 277 strings)
    
    Translation: Calculator You/App
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/app/es/
    gallegonovato authored and weblate committed Aug 9, 2024
    Copy the full SHA
    c77ed91 View commit details
  4. Translated using Weblate (Italian)

    Currently translated at 25.9% (72 of 277 strings)
    
    Translation: Calculator You/App
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/app/it/
    dontlookherepls authored and weblate committed Aug 9, 2024
    Copy the full SHA
    5548de6 View commit details
  5. Translated using Weblate (Turkish)

    Currently translated at 100.0% (277 of 277 strings)
    
    Translation: Calculator You/App
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/app/tr/
    oersen authored and weblate committed Aug 9, 2024
    Copy the full SHA
    3bb9812 View commit details

Commits on Aug 10, 2024

  1. Translated using Weblate (Spanish)

    Currently translated at 100.0% (277 of 277 strings)
    
    Translation: Calculator You/App
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/app/es/
    gallegonovato authored and weblate committed Aug 10, 2024
    Copy the full SHA
    deaf61b View commit details
  2. update metadata

    forzzzzz committed Aug 10, 2024
    Copy the full SHA
    0e835ce View commit details
  3. Merge remote-tracking branch 'origin/master'

    # Conflicts:
    #	fastlane/metadata/android/it/full_description.txt
    forzzzzz committed Aug 10, 2024
    Copy the full SHA
    3d06750 View commit details
  4. Translated using Weblate (Arabic)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/ar/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    d5af9ae View commit details
  5. Translated using Weblate (Arabic (Algeria))

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/ar_DZ/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    a77c41e View commit details
  6. Translated using Weblate (Azerbaijani)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/az/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    50b86cc View commit details
  7. Translated using Weblate (Belarusian)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/be/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    2b4ebdd View commit details
  8. Translated using Weblate (Bengali)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/bn/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    8ab27b0 View commit details
  9. Translated using Weblate (Tibetan)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/bo/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    1b13553 View commit details
  10. Translated using Weblate (Chechen)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/ce/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    dbd3d56 View commit details
  11. Translated using Weblate (Czech)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/cs/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    292e174 View commit details
  12. Translated using Weblate (Chuvash)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/cv/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    4b97af6 View commit details
  13. Translated using Weblate (Danish)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/da/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    0794165 View commit details
  14. Translated using Weblate (German)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/de/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    36f743f View commit details
  15. Translated using Weblate (Greek)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/el/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    49680c8 View commit details
  16. Translated using Weblate (Esperanto)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/eo/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    57d37e4 View commit details
  17. Translated using Weblate (Spanish)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/es/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    4c7919b View commit details
  18. Translated using Weblate (Estonian)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/et/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    90e2dbd View commit details
  19. Translated using Weblate (Persian)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/fa/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    6f5f083 View commit details
  20. Translated using Weblate (Fulah)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/ff/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    b4052dd View commit details
  21. Translated using Weblate (French)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/fr/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    e7af8bf View commit details
  22. Translated using Weblate (Gujarati)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/gu/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    4c0a3f6 View commit details
  23. Translated using Weblate (Hindi)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/hi/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    bd34997 View commit details
  24. Translated using Weblate (Croatian)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/hr/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    c0279e1 View commit details
  25. Translated using Weblate (Hungarian)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/hu/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    63fcf0c View commit details
  26. Translated using Weblate (Armenian)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/hy/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    ebddced View commit details
  27. Translated using Weblate (Icelandic)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/is/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    3a7d111 View commit details
  28. Translated using Weblate (Italian)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/it/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    7b12756 View commit details
  29. Translated using Weblate (Japanese)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/ja/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    4fab14f View commit details
  30. Translated using Weblate (Korean)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/ko/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    df3d8fb View commit details
  31. Translated using Weblate (Kurdish)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/ku/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    b636f0a View commit details
  32. Translated using Weblate (Kyrgyz)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/ky/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    8df538a View commit details
  33. Translated using Weblate (Latin)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/la/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    8cc64cd View commit details
  34. Translated using Weblate (Norwegian Bokmål)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/nb_NO/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    34867ee View commit details
  35. Translated using Weblate (Nepali)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/ne/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    75e3294 View commit details
  36. Translated using Weblate (Dutch)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/nl/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    5f8b38e View commit details
  37. Translated using Weblate (Polish)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/pl/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    fef93b8 View commit details
  38. Translated using Weblate (Portuguese)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/pt/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    1205e6c View commit details
  39. Translated using Weblate (Romanian)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/ro/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    d410fc5 View commit details
  40. Translated using Weblate (Samburu)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/saq/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    38311c5 View commit details
  41. Translated using Weblate (Slovak)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/sk/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    47cb9e4 View commit details
  42. Translated using Weblate (Albanian)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/sq/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    03fd94c View commit details
  43. Translated using Weblate (Serbian)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/sr/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    e1ef868 View commit details
  44. Translated using Weblate (Swahili)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/sw/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    dd95457 View commit details
  45. Translated using Weblate (Telugu)

    Currently translated at 50.0% (3 of 6 strings)
    
    Translation: Calculator You/Metadata
    Translate-URL: https://hosted.weblate.org/projects/calculator-you/metadata/te/
    Prefill add-on authored and weblate committed Aug 10, 2024
    Copy the full SHA
    6c459fb View commit details
Showing 619 changed files with 7,895 additions and 854 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/.idea/
/.gradle/
/local.properties
/.kotlin/
/app/build/
/app/release/
37 changes: 37 additions & 0 deletions DIPLOM README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
***This version readme is for my dissertation***

<img src="fastlane/metadata/android/en-US/images/featureGraphic.png" alt="Feature graphic" style="display: block; margin: 0 auto 30px;">

# Мобільний застосунок "Caculator You"

Кваліфікаційна робота на підтвердження ступеня фахового молодшого бакалавра ([ВСП «ППФК НТУ «ХПІ»](http://polytechnic.poltava.ua)).

Керівник роботи – **Бабич Олександр Вікторович**.

## Завдання до дипломної роботи

Розроблений програмний продукт має являти собою мобільний застосунок - калькулятор зі зручною системою навігації, темами оформлення, конвертором одиниць вимірювання та валют, історією обчислень, віконним режимом, розширеними налаштуваннями. Готовий застосунок має бути доступним для завантаження в Google Play.

## Використані технології

* Kotlin
* Java
* Android SDK
* Android Views
* Room
* Retrofit
* AndroidX Preference
* SQLite
* Android Material

## Опублікований продукт

<a href="https://github.com/forzzzzz/Calculator-You/releases/latest">
<img alt="Get it on GitHub" src="https://raw.githubusercontent.com/deckerst/common/main/assets/get-it-on-github.png" height="80">
</a>
<a href="https://play.google.com/store/apps/details?id=com.marktka.calculatorYou">
<img alt="Get it on Google Play" src="https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png" height="80">
</a>
<a href="https://f-droid.org/packages/com.marktka.calculatorYou/">
<img alt="Get it on F-Droid" src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" height="80">
</a>
39 changes: 18 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -28,10 +28,7 @@
<a href="https://play.google.com/store/apps/details?id=com.marktka.calculatorYou">
<img alt="Get it on Google Play" src="https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png" height="80">
</a>

### Coming soon to F-Droid

<a href="">
<a href="https://f-droid.org/packages/com.marktka.calculatorYou/">
<img alt="Get it on F-Droid" src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" height="80">
</a>

@@ -43,30 +40,22 @@

</div>

#### Beautiful design:

The calculator has a beautiful and pleasant design that has been developed for a long time. The app utilizes Material 3 and dynamic colors based on your wallpaper. In addition to light and dark themes, the app also offers over 60 colorful themes to suit your taste. Make this calculator uniquely yours!

#### Scientific functions:
🎨 Beautiful Design & 60+ Color Themes: Personalize your calculator with a choice of 60+ vibrant color themes, making every calculation visually enjoyable.

In addition to simple basic operators, there are also other functions. For example, cos, sin, tan, log, etc.
🔬 Scientific Mode: Access advanced mathematical functions with our comprehensive scientific calculator, perfect for students, engineers, and math enthusiasts.

#### History:
🕒 History: Easily track and review previous calculations with our handy history feature, ensuring you never lose important work.

The calculator has the ability to save your calculations. You can then work with them: resend for calculation, conveniently copy, share, and delete.
📏 Unit Converter: Convert units effortlessly with our built-in converter, supporting a wide range of measurements, including length, weight, and more.

#### Convenience:

The app is designed so that all operations and actions can be performed with just one hand. History, calculator, scientific functions - all under one finger. Fast and convenient!
👌 User-Friendly Interface: Enjoy a clean, intuitive interface designed for effortless navigation and efficient calculations.

<div align="center">

<img alt="Screenshot" src="fastlane/metadata/android/en-US/images/phoneScreenshots/1.png" width="30%"/>
<img alt="Screenshot" src="fastlane/metadata/android/en-US/images/phoneScreenshots/2.png" width="30%"/>
<img alt="Screenshot" src="fastlane/metadata/android/en-US/images/phoneScreenshots/3.png" width="30%"/>
<img alt="Screenshot" src="fastlane/metadata/android/en-US/images/phoneScreenshots/4.png" width="30%"/>
<img alt="Screenshot" src="fastlane/metadata/android/en-US/images/phoneScreenshots/5.png" width="30%"/>
<img alt="Screenshot" src="fastlane/metadata/android/en-US/images/phoneScreenshots/6.png" width="30%"/>
<img alt="Screenshot" src="fastlane/metadata/android/en-US/images/phoneScreenshots/1.png" width="24%"/>
<img alt="Screenshot" src="fastlane/metadata/android/en-US/images/phoneScreenshots/2.png" width="24%"/>
<img alt="Screenshot" src="fastlane/metadata/android/en-US/images/phoneScreenshots/3.png" width="24%"/>
<img alt="Screenshot" src="fastlane/metadata/android/en-US/images/phoneScreenshots/4.png" width="24%"/>

</div>

@@ -90,6 +79,14 @@ Support this app with a [PayPal](https://www.paypal.com/donate/?hosted_button_id
alt="Donate with PayPal"
height="40">](https://www.paypal.com/donate/?hosted_button_id=GKC26SLPUTQMU)

## 📢 Join the telegram channel

Join the [telegram channel](https://t.me/devBlogCalculatorYou) to follow the project

[<img src="https://img.shields.io/badge/Telegram%20channel-white?style=for-the-badge&logo=telegram"
alt="Join the telegram channel"
height="40">](https://t.me/devBlogCalculatorYou)

## 🔢 Math Expressions Parser

### [Mihai Preda / arithmetic](https://github.com/preda/arithmetic)
14 changes: 11 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -11,8 +11,8 @@ android {
applicationId = "com.marktka.calculatorYou"
minSdk = 27
targetSdk = 34
versionCode = 29
versionName = "3.0.0"
versionCode = 33
versionName = "3.1.2"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
@@ -44,6 +44,14 @@ android {
buildFeatures {
viewBinding = true
}

dependenciesInfo {
// Disables dependency metadata when building APKs.
includeInApk = false
// Disables dependency metadata when building Android App Bundles.
includeInBundle = false
}

}

dependencies {
@@ -59,7 +67,7 @@ dependencies {
implementation("com.intuit.sdp:sdp-android:1.1.1")
implementation ("com.mikhaellopez:circleview:1.4.1")
implementation("androidx.viewpager2:viewpager2:1.1.0")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.4")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.5")
// implementation("androidx.activity:activity-ktx:1.9.0")

// debugImplementation ("com.squareup.leakcanary:leakcanary-android:3.0-alpha-1")
16 changes: 15 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@
<uses-permission android:name="android.permission.VIBRATE" />

<application

android:name=".App"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
@@ -15,6 +16,20 @@
android:supportsRtl="true"
android:theme="@style/color_0"
tools:targetApi="31">

<service
android:name=".MyQSTileService"
android:exported="true"
android:label="@string/app_name"
android:icon="@drawable/tile_icon"
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
<meta-data android:name="android.service.quicksettings.ACTIVE_TILE"
android:value="true" />
<intent-filter>
<action android:name="android.service.quicksettings.action.QS_TILE" />
</intent-filter>
</service>

<activity
android:name=".LicensesActivity"
android:exported="false" />
@@ -29,7 +44,6 @@
android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Binary file modified app/src/main/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 0 additions & 9 deletions app/src/main/java/com/forz/calculator/AboutActivity.kt
Original file line number Diff line number Diff line change
@@ -57,15 +57,6 @@ class AboutActivity : AppCompatActivity() {
InteractionAndroid.openUrl(getString(R.string.url_donate), this)
}

binding.telegramLayout.setOnClickListener {
InteractionAndroid.openUrl(getString(R.string.url_telegram), this)
}

binding.telegramLayout.setOnLongClickListener {
InteractionAndroid.copyToClipboard(getString(R.string.description_telegram), this)
true
}

binding.emailLayout.setOnClickListener {
InteractionAndroid.openUrl(getString(R.string.url_email), this)
}
17 changes: 13 additions & 4 deletions app/src/main/java/com/forz/calculator/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package com.forz.calculator

import android.annotation.SuppressLint
import android.content.ComponentName
import android.content.Intent
import android.content.res.Configuration
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.service.quicksettings.TileService
import androidx.appcompat.app.AppCompatDelegate
import androidx.fragment.app.Fragment
import com.forz.calculator.databinding.ActivityMainBinding
@@ -18,12 +20,13 @@ import com.forz.calculator.settings.SettingsActivity.Companion.firstCreatedSetti
import com.forz.calculator.settings.Config
import com.forz.calculator.settings.Preferences
import com.forz.calculator.calculator.CalculatorViewModel
import com.forz.calculator.calculator.Evaluator
import com.forz.calculator.fragments.UnitConverterFragment
import com.forz.calculator.fragments.largeLand.LargeLandFragment
import kotlin.properties.Delegates.notNull


interface OnBackPressedListener {
interface OnMainActivityListener {
fun onBackPressed(): Boolean
}

@@ -46,8 +49,10 @@ class MainActivity : AppCompatActivity() {
preferences.getGroupingSeparatorSymbol(),
preferences.getDecimalSeparatorSymbol(),
preferences.getNumberPrecision(),
preferences.getMaxScientificNotationDigits(),
preferences.getSwipeHistoryAndCalculator(),
preferences.getSwipeDigitsAndScientificFunctions(),
preferences.getAutoSavingResults(),
preferences.getVibration(),
preferences.getSoundEffects()
)
@@ -122,6 +127,11 @@ class MainActivity : AppCompatActivity() {
}
}
}

Evaluator.converterResult.observe(this){
val componentName = ComponentName(this, MyQSTileService::class.java)
TileService.requestListeningState(this, componentName)
}
}

private fun showFragment(fragment: Fragment){
@@ -155,11 +165,10 @@ class MainActivity : AppCompatActivity() {
}



override fun onBackPressed() {
val fragment = supportFragmentManager.findFragmentById(R.id.main)
if (fragment is OnBackPressedListener) {
val handled = (fragment as OnBackPressedListener).onBackPressed()
if (fragment is OnMainActivityListener) {
val handled = (fragment as OnMainActivityListener).onBackPressed()
if (!handled) {
super.onBackPressed()
}
55 changes: 55 additions & 0 deletions app/src/main/java/com/forz/calculator/MyQSTileService.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package com.forz.calculator

import android.annotation.SuppressLint
import android.app.PendingIntent
import android.content.Intent
import android.os.Build
import android.service.quicksettings.TileService
import com.forz.calculator.calculator.Evaluator
import com.forz.calculator.settings.Config.decimalSeparatorSymbol
import com.forz.calculator.settings.Config.groupingSeparatorSymbol
import com.forz.calculator.settings.Config.maxScientificNotationDigits
import com.forz.calculator.settings.Config.numberPrecision
import com.forz.calculator.utils.NumberFormatter
import java.math.BigDecimal

class MyQSTileService: TileService() {

override fun onStartListening() {
super.onStartListening()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q){
val tile = qsTile ?: return

if (Evaluator.converterResult.value != null){
tile.subtitle = NumberFormatter.formatResult(
BigDecimal(Evaluator.converterResult.value!!),
numberPrecision,
maxScientificNotationDigits,
groupingSeparatorSymbol,
decimalSeparatorSymbol
)
} else{
tile.subtitle = ""
}

tile.updateTile()
}
}

@SuppressLint("StartActivityAndCollapseDeprecated")
override fun onClick() {
super.onClick()

val intent = Intent(this, MainActivity::class.java).apply {
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
}

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
startActivityAndCollapse(PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_IMMUTABLE))
} else {
@Suppress("DEPRECATION")
startActivityAndCollapse(intent)
}
}
}
Original file line number Diff line number Diff line change
@@ -10,8 +10,10 @@ import com.forz.calculator.R
import com.forz.calculator.expression.ExpressionEditText
import com.forz.calculator.settings.Config.decimalSeparatorSymbol
import com.forz.calculator.settings.Config.groupingSeparatorSymbol
import com.forz.calculator.settings.Config.maxScientificNotationDigits
import com.forz.calculator.settings.Config.numberPrecision
import org.javia.arity.Symbols
import java.math.BigDecimal


object Evaluator: ViewModel() {
@@ -55,7 +57,7 @@ object Evaluator: ViewModel() {
}else{
_converterResult.value = result
isCalculated = true
return NumberFormatter.formatResult(result.toString(), numberPrecision, groupingSeparatorSymbol, decimalSeparatorSymbol)
return NumberFormatter.formatResult(BigDecimal(result), numberPrecision, maxScientificNotationDigits, groupingSeparatorSymbol, decimalSeparatorSymbol)
}
} catch (e: Exception) {
_converterResult.value = null
Original file line number Diff line number Diff line change
@@ -11,9 +11,11 @@ import com.forz.calculator.converter.data.ConverterUnit
import com.forz.calculator.databinding.ItemUnitBinding
import com.forz.calculator.settings.Config.decimalSeparatorSymbol
import com.forz.calculator.settings.Config.groupingSeparatorSymbol
import com.forz.calculator.settings.Config.maxScientificNotationDigits
import com.forz.calculator.settings.Config.numberPrecision
import com.forz.calculator.utils.HapticAndSound
import com.forz.calculator.utils.NumberFormatter
import java.math.BigDecimal
import kotlin.properties.Delegates.notNull

interface UnitActionListener {
@@ -38,8 +40,9 @@ class UnitAdapter(
id = pair.first.id,
unit = context.getString(pair.first.name),
result = NumberFormatter.formatResult(
pair.second.toString(),
BigDecimal(pair.second),
numberPrecision,
maxScientificNotationDigits,
groupingSeparatorSymbol,
decimalSeparatorSymbol
)
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ class DigitalStorageConverter : UnitConverter {

override val units: List<ConverterUnit> = listOf(
FactorUnit(R.string.unit_bit, 1.0, "${id}10".toInt()),
FactorUnit(R.string.unit__byte, 8.0, "${id}11".toInt()),
FactorUnit(R.string.unit_byte, 8.0, "${id}11".toInt()),
FactorUnit(R.string.unit_kilobit, 1E3, "${id}12".toInt()),
FactorUnit(R.string.unit_kilobyte, 8E3, "${id}13".toInt()),
FactorUnit(R.string.unit_kibibyte, 8.0 * 1024, "${id}14".toInt()),
Loading