update commons to 3.17.19
This commit is contained in:
parent
6c0f402e51
commit
de8c45fa21
|
@ -45,7 +45,7 @@ ext {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:3.16.11'
|
||||
implementation 'com.simplemobiletools:commons:3.17.19'
|
||||
|
||||
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
|
||||
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"
|
||||
|
|
|
@ -48,8 +48,6 @@ class MainActivity : SimpleActivity(), CanvasListener {
|
|||
private var isEraserOn = false
|
||||
private var isImageCaptureIntent = false
|
||||
|
||||
private var storedUseEnglish = false
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_main)
|
||||
|
@ -74,15 +72,10 @@ class MainActivity : SimpleActivity(), CanvasListener {
|
|||
if (!isImageCaptureIntent) {
|
||||
checkWhatsNewDialog()
|
||||
}
|
||||
storeStateVariables()
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
if (storedUseEnglish != config.useEnglish) {
|
||||
restartActivity()
|
||||
return
|
||||
}
|
||||
|
||||
val isStrokeWidthBarEnabled = config.showBrushSize
|
||||
stroke_width_bar.beVisibleIf(isStrokeWidthBarEnabled)
|
||||
|
@ -97,7 +90,6 @@ class MainActivity : SimpleActivity(), CanvasListener {
|
|||
super.onPause()
|
||||
config.brushColor = color
|
||||
config.brushSize = strokeWidth
|
||||
storeStateVariables()
|
||||
if (config.preventPhoneFromSleeping) {
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
|
||||
}
|
||||
|
@ -134,10 +126,6 @@ class MainActivity : SimpleActivity(), CanvasListener {
|
|||
return true
|
||||
}
|
||||
|
||||
private fun storeStateVariables() {
|
||||
storedUseEnglish = config.useEnglish
|
||||
}
|
||||
|
||||
private fun launchSettings() {
|
||||
startActivity(Intent(applicationContext, SettingsActivity::class.java))
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package com.simplemobiletools.draw.activities
|
|||
import android.os.Bundle
|
||||
import com.simplemobiletools.commons.extensions.beVisibleIf
|
||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
||||
import com.simplemobiletools.commons.extensions.useEnglishToggled
|
||||
import com.simplemobiletools.draw.R
|
||||
import com.simplemobiletools.draw.extensions.config
|
||||
import kotlinx.android.synthetic.main.activity_settings.*
|
||||
|
@ -38,7 +37,7 @@ class SettingsActivity : SimpleActivity() {
|
|||
settings_use_english_holder.setOnClickListener {
|
||||
settings_use_english.toggle()
|
||||
config.useEnglish = settings_use_english.isChecked
|
||||
useEnglishToggled()
|
||||
System.exit(0)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.simplemobiletools.draw.dialogs
|
||||
|
||||
import android.support.v7.app.AlertDialog
|
||||
import android.view.WindowManager
|
||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||
import com.simplemobiletools.commons.dialogs.FilePickerDialog
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
|
@ -40,8 +39,8 @@ class SaveImageDialog(val activity: SimpleActivity, val defaultExtension: String
|
|||
.setPositiveButton(R.string.ok, null)
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.create().apply {
|
||||
window!!.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE)
|
||||
activity.setupDialogStuff(view, this, R.string.save_as) {
|
||||
showKeyboard(view.save_image_filename)
|
||||
getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {
|
||||
val filename = view.save_image_filename.value
|
||||
if (filename.isEmpty()) {
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/save_image_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.2.21'
|
||||
ext.kotlin_version = '1.2.31'
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
|
@ -9,7 +9,7 @@ buildscript {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.0.1'
|
||||
classpath 'com.android.tools.build:gradle:3.1.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
|
|
Loading…
Reference in New Issue