diff --git a/CHANGELOG.md b/CHANGELOG.md index 8beecf24..494572e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ Changelog ========== +Version 5.11.2 *(2023-02-10)* +---------------------------- + + * Added some UI, translation and stability improvements + Version 5.11.1 *(2023-01-04)* ---------------------------- diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..0730468b --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,8 @@ +### Reporting +Before you report something, read the reporting rules [here](https://github.com/SimpleMobileTools/General-Discussion#how-do-i-suggest-an-improvement-ask-a-question-or-report-an-issue) please. + +### Contributing as a developer +Some instructions about code style and everything that has to be done to increase the change of your code getting accepted can be found at the [General Discussion](https://github.com/SimpleMobileTools/General-Discussion#contribution-rules-for-developers) section. + +### Contributing as a non developer +In case you just want to for example improve a translation, you can find the way of doing it [here](https://github.com/SimpleMobileTools/General-Discussion#how-can-i-suggest-an-edit-to-a-file). diff --git a/app/build.gradle b/app/build.gradle index 4f87f70e..5fa02322 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -16,8 +16,8 @@ android { applicationId "com.simplemobiletools.calculator" minSdkVersion 23 targetSdkVersion 33 - versionCode 58 - versionName "5.11.1" + versionCode 59 + versionName "5.11.2" setProperty("archivesBaseName", "calculator") } @@ -63,11 +63,11 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:48be8434c3' + implementation 'com.github.SimpleMobileTools:Simple-Commons:c457573200' implementation 'me.grantland:autofittextview:0.2.1' implementation 'net.objecthunter:exp4j:0.4.8' - kapt 'androidx.room:room-compiler:2.4.3' - implementation 'androidx.room:room-runtime:2.4.3' - annotationProcessor 'androidx.room:room-compiler:2.4.3' + kapt 'androidx.room:room-compiler:2.5.0' + implementation 'androidx.room:room-runtime:2.5.0' + annotationProcessor 'androidx.room:room-compiler:2.5.0' } diff --git a/app/src/main/kotlin/com/simplemobiletools/calculator/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calculator/activities/MainActivity.kt index db0ded8a..73d1ae44 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calculator/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calculator/activities/MainActivity.kt @@ -46,12 +46,16 @@ class MainActivity : SimpleActivity(), Calculator { private lateinit var calc: CalculatorImpl override fun onCreate(savedInstanceState: Bundle?) { + isMaterialActivity = true super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) appLaunched(BuildConfig.APPLICATION_ID) setupOptionsMenu() refreshMenuItems() + updateMaterialActivityViews(main_coordinator, null, useTransparentNavigation = false, useTopSearchMenu = false) + setupMaterialScrollListener(main_nested_scrollview, main_toolbar) + //============================================================ if(savedInstanceState != null) { @@ -293,6 +297,6 @@ class MainActivity : SimpleActivity(), Calculator { bundle.putDouble("savedBaseValue", calc.baseValue) bundle.putDouble("savedSecondValue", calc.getSecondValueV2()) bundle.putString("savedInputDisplayedFormula", calc.inputDisplayedFormula) - + } //============================================================ } diff --git a/app/src/main/kotlin/com/simplemobiletools/calculator/helpers/CalculatorImpl.kt b/app/src/main/kotlin/com/simplemobiletools/calculator/helpers/CalculatorImpl.kt index ba3f7710..acf11d4e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calculator/helpers/CalculatorImpl.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calculator/helpers/CalculatorImpl.kt @@ -226,7 +226,7 @@ class CalculatorImpl( lastKey = EQUALS } - public fun getSecondValue(): Double { + private fun getSecondValue(): Double { val valueToCheck = inputDisplayedFormula.trimStart('-').removeGroupSeparator() Log.v("VALUEToCheck GETSV :", valueToCheck) @@ -258,7 +258,11 @@ class CalculatorImpl( return } - baseValue = parts.first().toDouble() + try { + baseValue = parts.first().toDouble() + } catch (e: NumberFormatException) { + context.showErrorToast(e) + } if (inputDisplayedFormula.startsWith("-")) { baseValue *= -1 diff --git a/app/src/main/res/layout-land/activity_main.xml b/app/src/main/res/layout-land/activity_main.xml index cc772edd..7f2412d0 100644 --- a/app/src/main/res/layout-land/activity_main.xml +++ b/app/src/main/res/layout-land/activity_main.xml @@ -16,239 +16,247 @@ app:menu="@menu/menu" app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" /> - - - - - + android:fillViewport="true" + android:scrollbars="none"> + android:hapticFeedbackEnabled="true" + android:layoutDirection="ltr" + android:orientation="vertical"> + android:layout_weight="2.1" + android:fontFamily="sans-serif-light" + android:gravity="end|bottom" + android:maxLines="1" + android:paddingLeft="@dimen/activity_margin" + android:paddingRight="@dimen/activity_margin" + android:textSize="@dimen/formula_text_size" /> + android:layout_weight="1.8" + android:fontFamily="sans-serif-light" + android:gravity="center_vertical|end" + android:maxLines="1" + android:paddingLeft="@dimen/activity_margin" + android:paddingRight="@dimen/activity_margin" + android:textSize="@dimen/display_text_size" + tools:text="0" /> - + android:layout_weight="2" + android:orientation="horizontal"> - + + + + + + + + + + + + + + + android:layout_weight="2" + android:orientation="horizontal"> - + + + + + + + + + + + + + android:layout_weight="2" + android:orientation="horizontal"> - + + + + + + + + + + + + + android:layout_weight="2" + android:orientation="horizontal"> + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 8342d576..f769e7c3 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -16,10 +16,18 @@ app:menu="@menu/menu" app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" /> - + android:layout_marginTop="?attr/actionBarSize" + android:fillViewport="true" + android:scrollbars="none"> + + + diff --git a/app/src/main/res/menu/menu.xml b/app/src/main/res/menu/menu.xml index 638472c2..24183ca4 100644 --- a/app/src/main/res/menu/menu.xml +++ b/app/src/main/res/menu/menu.xml @@ -1,16 +1,13 @@ + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + tools:ignore="AlwaysShowAction"> - + diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index eff5c68a..c0192689 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -2,22 +2,22 @@ Simple Calculator Calculadora - Calculadora Científica + Calculadora científica Error: división por cero Historial El historial está vacío - Vaciar - El historial ha sido vaciado + Borrar + El historial ha sido borrado Vibrar al presionar un botón - Usa una coma como marca decimal + Usar una coma como marca decimal - ¿Cómo funciona el botón C (Clear: Limpiar)? - Presionándolo una vez eliminará un solo caracter. Mantenerlo presionado reiniciará todos los campos. + ¿Cómo funciona el botón C (Borrar)\? + Presionándolo una vez eliminará un solo carácter. Mantenerlo presionado reiniciará todos los campos. - + \ No newline at end of file diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index 80011e49..46cfc9e1 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -7,7 +7,7 @@ Klaida: dalyba iš nulio Istorija - Istorija tuščia + Istorija yra tuščia Išvalyti Istorija išvalyta diff --git a/app/src/main/res/values-zgh/strings.xml b/app/src/main/res/values-zgh/strings.xml new file mode 100644 index 00000000..e8a0fd2d --- /dev/null +++ b/app/src/main/res/values-zgh/strings.xml @@ -0,0 +1,19 @@ + + + ⵜⴰⵙⵎⵙⵙⵉⴹⵏⵜ ⵜⴰⴼⵔⴰⵔⵜ + ⵜⴰⵙⵎⵙⵙⵉⴹⵏⵜ + ⵜⴰⵙⵎⵙⵙⵉⴹⵏⵜ ⵜⴰⵎⴰⵙⵙⴰⵏⵜ + + ⵜⴰⵣⴳⵍⵜ: ⴰⴱⵟⵟⵓ ⵅⴼ ⵓⵎⵢⴰ + + ⴰⵎⵣⵔⵓⵢ + ⴰⵎⵣⵔⵓⵢ ⵢⵓⵔⴰ + ⴽⴽⵙ + ⵉⵜⵜⵡⴰⴽⴽⵙ ⵓⵎⵣⵔⵓⵢ + + ⴰⵔⵎⵉⵎⵎⵉ ⴳ ⵡⴰⴱⴱⴰⵥ ⵅⴼ ⵜⴳⵎⵎⵓⵜⵉⵏ + ⵙⵎⵔⵙ ⵜⵉⵙⴽⵔⵜ ⴷ ⵜⴰⵎⴰⵜⴰⵔⵜ ⵜⴰⵎⵔⴰⵡⴰⵏⵜ + + ⵎⴰⵎⴽ ⵜⵙⵡⵓⵔⵓⵢ ⵜⴳⵎⵎⵓⵜ C (ⴽⴽⵙ)\? + ⴰⴱⴱⴰⵥ ⵅⴼ ⵓⵢⵏⵏⴰ ⴰⴷ ⵉⴽⴽⵙ ⵢⴰⵏ ⵓⵙⴽⴽⵉⵍ ⴳ ⵢⴰⵏ ⵓⵣⵎⵣ. ⵎⵛ ⵉⵍⵍⴰ ⵡⴰⴱⴱⴰⵥ ⴰⵙⵓⵍⴰⵏ ⵔⴰⴷ ⵜⵜⵓⵙⵏⴼⵍⵏ ⵎⴰⵕⵕⴰ ⵉⴳⵔⴰⵏ ⴳ ⵢⴰⵏ ⵓⵣⵎⵣ. + diff --git a/fastlane/metadata/android/en-US/changelogs/59.txt b/fastlane/metadata/android/en-US/changelogs/59.txt new file mode 100644 index 00000000..17b882fd --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/59.txt @@ -0,0 +1 @@ + * Added some UI, translation and stability improvements diff --git a/fastlane/metadata/android/lt/full_description.txt b/fastlane/metadata/android/lt/full_description.txt index f0117ed6..b69fbd22 100644 --- a/fastlane/metadata/android/lt/full_description.txt +++ b/fastlane/metadata/android/lt/full_description.txt @@ -32,4 +32,4 @@ Reddit: https://www.reddit.com/r/SimpleMobileTools Telegram: -https://t.me/SimpleMobileTools \ No newline at end of file +https://t.me/SimpleMobileTools diff --git a/fastlane/metadata/android/lt/short_description.txt b/fastlane/metadata/android/lt/short_description.txt index 29662045..a0658419 100644 --- a/fastlane/metadata/android/lt/short_description.txt +++ b/fastlane/metadata/android/lt/short_description.txt @@ -1 +1 @@ -Skaičiuotuvas su pagrindinėmis funkcijomis ir pritaikomu skydeliu. \ No newline at end of file +Skaičiuotuvas su pagrindinėmis funkcijomis ir derinama naudotojo sąsaja diff --git a/fastlane/metadata/android/lt/title.txt b/fastlane/metadata/android/lt/title.txt index d435da37..8a4e568f 100644 --- a/fastlane/metadata/android/lt/title.txt +++ b/fastlane/metadata/android/lt/title.txt @@ -1 +1 @@ -Paprastas skaičiuotuvas \ No newline at end of file +Paprastas skaičiuotuvas diff --git a/fastlane/metadata/android/pt-BR/short_description.txt b/fastlane/metadata/android/pt-BR/short_description.txt new file mode 100644 index 00000000..c19d0cc9 --- /dev/null +++ b/fastlane/metadata/android/pt-BR/short_description.txt @@ -0,0 +1 @@ +Uma linda calculadora para calculos rápidos com uma interface de usuário suave diff --git a/fastlane/metadata/android/pt-BR/title.txt b/fastlane/metadata/android/pt-BR/title.txt new file mode 100644 index 00000000..43ef335b --- /dev/null +++ b/fastlane/metadata/android/pt-BR/title.txt @@ -0,0 +1 @@ +Calculadora Simples diff --git a/fastlane/metadata/android/ru-RU/full_description.txt b/fastlane/metadata/android/ru-RU/full_description.txt index f8ba3da4..46abfa12 100644 --- a/fastlane/metadata/android/ru-RU/full_description.txt +++ b/fastlane/metadata/android/ru-RU/full_description.txt @@ -25,11 +25,11 @@ Ознакомьтесь с полным набором простых инструментов здесь: https://www.simplemobiletools.com -Фейсбук: +Facebook: https://www.facebook.com/simplemobiletools -Реддит: +Reddit: https://www.reddit.com/r/SimpleMobileTools -Телеграмма: -https://t.me/SimpleMobileTools \ No newline at end of file +Telegram: +https://t.me/SimpleMobileTools diff --git a/fastlane/metadata/android/ru-RU/short_description.txt b/fastlane/metadata/android/ru-RU/short_description.txt index 4147c4ae..865ad898 100644 --- a/fastlane/metadata/android/ru-RU/short_description.txt +++ b/fastlane/metadata/android/ru-RU/short_description.txt @@ -1 +1 @@ -калькулятор для быстрых простых вычислений с плавным пользовательским \ No newline at end of file +калькулятор для быстрых простых вычислений с плавным пользовательским diff --git a/fastlane/metadata/android/ru-RU/title.txt b/fastlane/metadata/android/ru-RU/title.txt index 48ba8e50..595cdb8c 100644 --- a/fastlane/metadata/android/ru-RU/title.txt +++ b/fastlane/metadata/android/ru-RU/title.txt @@ -1 +1 @@ -Простой калькулятор \ No newline at end of file +Простой калькулятор