updating commons, min OS version to 6
This commit is contained in:
parent
f81b27fd43
commit
b98293bcab
|
@ -14,7 +14,7 @@ android {
|
|||
|
||||
defaultConfig {
|
||||
applicationId "com.simplemobiletools.calculator"
|
||||
minSdkVersion 21
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 33
|
||||
versionCode 56
|
||||
versionName "5.10.2"
|
||||
|
@ -63,7 +63,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:2e9ca234a7'
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:a6032f9c07'
|
||||
implementation 'me.grantland:autofittextview:0.2.1'
|
||||
implementation 'net.objecthunter:exp4j:0.4.8'
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
|
||||
<activity
|
||||
android:name=".activities.SettingsActivity"
|
||||
android:configChanges="orientation"
|
||||
android:exported="true"
|
||||
android:label="@string/settings"
|
||||
android:parentActivityName=".activities.MainActivity">
|
||||
|
@ -58,12 +59,14 @@
|
|||
|
||||
<activity
|
||||
android:name="com.simplemobiletools.commons.activities.AboutActivity"
|
||||
android:configChanges="orientation"
|
||||
android:exported="false"
|
||||
android:label="@string/about"
|
||||
android:parentActivityName=".activities.MainActivity" />
|
||||
|
||||
<activity
|
||||
android:name="com.simplemobiletools.commons.activities.CustomizationActivity"
|
||||
android:configChanges="orientation"
|
||||
android:exported="false"
|
||||
android:label="@string/customize_colors"
|
||||
android:parentActivityName=".activities.SettingsActivity" />
|
||||
|
|
|
@ -34,6 +34,7 @@ class MainActivity : SimpleActivity(), Calculator {
|
|||
setContentView(R.layout.activity_main)
|
||||
appLaunched(BuildConfig.APPLICATION_ID)
|
||||
setupOptionsMenu()
|
||||
refreshMenuItems()
|
||||
|
||||
calc = CalculatorImpl(this, applicationContext)
|
||||
|
||||
|
@ -114,6 +115,7 @@ class MainActivity : SimpleActivity(), Calculator {
|
|||
main_toolbar.setOnMenuItemClickListener { menuItem ->
|
||||
when (menuItem.itemId) {
|
||||
R.id.history -> showHistory()
|
||||
R.id.more_apps_from_us -> launchMoreAppsFromUsIntent()
|
||||
R.id.settings -> launchSettings()
|
||||
R.id.about -> launchAbout()
|
||||
else -> return@setOnMenuItemClickListener false
|
||||
|
@ -122,6 +124,12 @@ class MainActivity : SimpleActivity(), Calculator {
|
|||
}
|
||||
}
|
||||
|
||||
private fun refreshMenuItems() {
|
||||
main_toolbar.menu.apply {
|
||||
findItem(R.id.more_apps_from_us).isVisible = !resources.getBoolean(R.bool.hide_google_relations)
|
||||
}
|
||||
}
|
||||
|
||||
private fun storeStateVariables() {
|
||||
config.apply {
|
||||
storedTextColor = textColor
|
||||
|
|
|
@ -3,36 +3,27 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main_coordinator"
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="com.simplemobiletools.calculator.activities.MainActivity"
|
||||
tools:ignore="HardcodedText">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/main_app_bar_layout"
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/main_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/main_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/color_primary"
|
||||
app:menu="@menu/menu"
|
||||
app:title="@string/app_launcher_name"
|
||||
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/color_primary"
|
||||
app:menu="@menu/menu"
|
||||
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
|
||||
|
||||
<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"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/formula"
|
||||
|
|
|
@ -8,26 +8,18 @@
|
|||
tools:context="com.simplemobiletools.calculator.activities.MainActivity"
|
||||
tools:ignore="HardcodedText">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/main_app_bar_layout"
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/main_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/main_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/color_primary"
|
||||
app:menu="@menu/menu"
|
||||
app:title="@string/app_launcher_name"
|
||||
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/color_primary"
|
||||
app:menu="@menu/menu"
|
||||
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
|
||||
|
||||
<include
|
||||
layout="@layout/view_calculator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
android:layout_marginTop="?attr/actionBarSize" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
|
@ -6,14 +6,19 @@
|
|||
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"
|
||||
android:title="@string/settings"
|
||||
app:showAsAction="ifRoom" />
|
||||
app:showAsAction="always" />
|
||||
<item
|
||||
android:id="@+id/about"
|
||||
android:icon="@drawable/ic_info_vector"
|
||||
android:title="@string/about"
|
||||
app:showAsAction="ifRoom" />
|
||||
app:showAsAction="always" />
|
||||
</menu>
|
||||
|
|
|
@ -8,7 +8,7 @@ buildscript {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.3.0'
|
||||
classpath 'com.android.tools.build:gradle:7.3.1'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
|
|
Loading…
Reference in New Issue