mirror of
https://github.com/SimpleMobileTools/Simple-Calculator.git
synced 2025-03-10 08:20:21 +01:00
Merge branch 'master' into fix_data_lost_during_rotation
# Conflicts: # app/src/main/kotlin/com/simplemobiletools/calculator/activities/MainActivity.kt # app/src/main/kotlin/com/simplemobiletools/calculator/helpers/CalculatorImpl.kt
This commit is contained in:
commit
9bd8786e2a
@ -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)*
|
||||
----------------------------
|
||||
|
||||
|
8
CONTRIBUTING.md
Normal file
8
CONTRIBUTING.md
Normal file
@ -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).
|
@ -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'
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
try {
|
||||
baseValue = parts.first().toDouble()
|
||||
} catch (e: NumberFormatException) {
|
||||
context.showErrorToast(e)
|
||||
}
|
||||
|
||||
if (inputDisplayedFormula.startsWith("-")) {
|
||||
baseValue *= -1
|
||||
|
@ -16,11 +16,18 @@
|
||||
app:menu="@menu/menu"
|
||||
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/main_nested_scrollview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="?attr/actionBarSize"
|
||||
android:fillViewport="true"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/calculator_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="?attr/actionBarSize"
|
||||
android:hapticFeedbackEnabled="true"
|
||||
android:layoutDirection="ltr"
|
||||
android:orientation="vertical">
|
||||
@ -251,4 +258,5 @@
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
@ -16,10 +16,18 @@
|
||||
app:menu="@menu/menu"
|
||||
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/main_nested_scrollview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="?attr/actionBarSize"
|
||||
android:fillViewport="true"
|
||||
android:scrollbars="none">
|
||||
|
||||
<include
|
||||
layout="@layout/view_calculator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="?attr/actionBarSize" />
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
@ -1,16 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:ignore="AlwaysShowAction">
|
||||
<item
|
||||
android:id="@+id/history"
|
||||
android:icon="@drawable/ic_clock_vector"
|
||||
android:title="@string/history"
|
||||
app:showAsAction="always" />
|
||||
<item
|
||||
android:id="@+id/more_apps_from_us"
|
||||
android:icon="@drawable/ic_google_play_vector"
|
||||
android:title="@string/more_apps_from_us"
|
||||
app:showAsAction="always" />
|
||||
<item
|
||||
android:id="@+id/settings"
|
||||
android:icon="@drawable/ic_settings_cog_vector"
|
||||
@ -21,4 +18,8 @@
|
||||
android:icon="@drawable/ic_info_vector"
|
||||
android:title="@string/about"
|
||||
app:showAsAction="always" />
|
||||
<item
|
||||
android:id="@+id/more_apps_from_us"
|
||||
android:title="@string/more_apps_from_us"
|
||||
app:showAsAction="never" />
|
||||
</menu>
|
||||
|
@ -2,20 +2,20 @@
|
||||
<resources>
|
||||
<string name="app_name">Simple Calculator</string>
|
||||
<string name="app_launcher_name">Calculadora</string>
|
||||
<string name="scientific_calculator">Calculadora Científica</string>
|
||||
<string name="scientific_calculator">Calculadora científica</string>
|
||||
<!-- Calculator field -->
|
||||
<string name="formula_divide_by_zero_error">Error: división por cero</string>
|
||||
<!-- History -->
|
||||
<string name="history">Historial</string>
|
||||
<string name="history_empty">El historial está vacío</string>
|
||||
<string name="clear_history">Vaciar</string>
|
||||
<string name="history_cleared">El historial ha sido vaciado</string>
|
||||
<string name="clear_history">Borrar</string>
|
||||
<string name="history_cleared">El historial ha sido borrado</string>
|
||||
<!-- Settings -->
|
||||
<string name="vibrate_on_button_press">Vibrar al presionar un botón</string>
|
||||
<string name="use_comma_as_decimal_mark">Usa una coma como marca decimal</string>
|
||||
<string name="use_comma_as_decimal_mark">Usar una coma como marca decimal</string>
|
||||
<!-- FAQ -->
|
||||
<string name="faq_1_title">¿Cómo funciona el botón C (Clear: Limpiar)?</string>
|
||||
<string name="faq_1_text">Presionándolo una vez eliminará un solo caracter. Mantenerlo presionado reiniciará todos los campos.</string>
|
||||
<string name="faq_1_title">¿Cómo funciona el botón C (Borrar)\?</string>
|
||||
<string name="faq_1_text">Presionándolo una vez eliminará un solo carácter. Mantenerlo presionado reiniciará todos los campos.</string>
|
||||
<!--
|
||||
Haven't found some strings? There's more at
|
||||
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res
|
||||
|
@ -7,7 +7,7 @@
|
||||
<string name="formula_divide_by_zero_error">Klaida: dalyba iš nulio</string>
|
||||
<!-- History -->
|
||||
<string name="history">Istorija</string>
|
||||
<string name="history_empty">Istorija tuščia</string>
|
||||
<string name="history_empty">Istorija yra tuščia</string>
|
||||
<string name="clear_history">Išvalyti</string>
|
||||
<string name="history_cleared">Istorija išvalyta</string>
|
||||
<!-- Settings -->
|
||||
|
19
app/src/main/res/values-zgh/strings.xml
Normal file
19
app/src/main/res/values-zgh/strings.xml
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">ⵜⴰⵙⵎⵙⵙⵉⴹⵏⵜ ⵜⴰⴼⵔⴰⵔⵜ</string>
|
||||
<string name="app_launcher_name">ⵜⴰⵙⵎⵙⵙⵉⴹⵏⵜ</string>
|
||||
<string name="scientific_calculator">ⵜⴰⵙⵎⵙⵙⵉⴹⵏⵜ ⵜⴰⵎⴰⵙⵙⴰⵏⵜ</string>
|
||||
<!-- Calculator field -->
|
||||
<string name="formula_divide_by_zero_error">ⵜⴰⵣⴳⵍⵜ: ⴰⴱⵟⵟⵓ ⵅⴼ ⵓⵎⵢⴰ</string>
|
||||
<!-- History -->
|
||||
<string name="history">ⴰⵎⵣⵔⵓⵢ</string>
|
||||
<string name="history_empty">ⴰⵎⵣⵔⵓⵢ ⵢⵓⵔⴰ</string>
|
||||
<string name="clear_history">ⴽⴽⵙ</string>
|
||||
<string name="history_cleared">ⵉⵜⵜⵡⴰⴽⴽⵙ ⵓⵎⵣⵔⵓⵢ</string>
|
||||
<!-- Settings -->
|
||||
<string name="vibrate_on_button_press">ⴰⵔⵎⵉⵎⵎⵉ ⴳ ⵡⴰⴱⴱⴰⵥ ⵅⴼ ⵜⴳⵎⵎⵓⵜⵉⵏ</string>
|
||||
<string name="use_comma_as_decimal_mark">ⵙⵎⵔⵙ ⵜⵉⵙⴽⵔⵜ ⴷ ⵜⴰⵎⴰⵜⴰⵔⵜ ⵜⴰⵎⵔⴰⵡⴰⵏⵜ</string>
|
||||
<!-- FAQ -->
|
||||
<string name="faq_1_title">ⵎⴰⵎⴽ ⵜⵙⵡⵓⵔⵓⵢ ⵜⴳⵎⵎⵓⵜ C (ⴽⴽⵙ)\?</string>
|
||||
<string name="faq_1_text">ⴰⴱⴱⴰⵥ ⵅⴼ ⵓⵢⵏⵏⴰ ⴰⴷ ⵉⴽⴽⵙ ⵢⴰⵏ ⵓⵙⴽⴽⵉⵍ ⴳ ⵢⴰⵏ ⵓⵣⵎⵣ. ⵎⵛ ⵉⵍⵍⴰ ⵡⴰⴱⴱⴰⵥ ⴰⵙⵓⵍⴰⵏ ⵔⴰⴷ ⵜⵜⵓⵙⵏⴼⵍⵏ ⵎⴰⵕⵕⴰ ⵉⴳⵔⴰⵏ ⴳ ⵢⴰⵏ ⵓⵣⵎⵣ.</string>
|
||||
</resources>
|
1
fastlane/metadata/android/en-US/changelogs/59.txt
Normal file
1
fastlane/metadata/android/en-US/changelogs/59.txt
Normal file
@ -0,0 +1 @@
|
||||
* Added some UI, translation and stability improvements
|
@ -1 +1 @@
|
||||
Skaičiuotuvas su pagrindinėmis funkcijomis ir pritaikomu skydeliu.
|
||||
Skaičiuotuvas su pagrindinėmis funkcijomis ir derinama naudotojo sąsaja
|
||||
|
1
fastlane/metadata/android/pt-BR/short_description.txt
Normal file
1
fastlane/metadata/android/pt-BR/short_description.txt
Normal file
@ -0,0 +1 @@
|
||||
Uma linda calculadora para calculos rápidos com uma interface de usuário suave
|
1
fastlane/metadata/android/pt-BR/title.txt
Normal file
1
fastlane/metadata/android/pt-BR/title.txt
Normal file
@ -0,0 +1 @@
|
||||
Calculadora Simples
|
@ -25,11 +25,11 @@
|
||||
Ознакомьтесь с полным набором простых инструментов здесь:
|
||||
https://www.simplemobiletools.com
|
||||
|
||||
Фейсбук:
|
||||
Facebook:
|
||||
https://www.facebook.com/simplemobiletools
|
||||
|
||||
Реддит:
|
||||
Reddit:
|
||||
https://www.reddit.com/r/SimpleMobileTools
|
||||
|
||||
Телеграмма:
|
||||
Telegram:
|
||||
https://t.me/SimpleMobileTools
|
Loading…
x
Reference in New Issue
Block a user