update commons to 2.3.8

This commit is contained in:
tibbi 2017-01-15 11:19:08 +01:00
parent 67ef104f31
commit bf86fdec64
3 changed files with 11 additions and 22 deletions

View File

@ -32,7 +32,7 @@ android {
} }
dependencies { dependencies {
compile 'com.simplemobiletools:commons:2.1.9' compile 'com.simplemobiletools:commons:2.3.8'
compile 'com.facebook.stetho:stetho:1.4.1' compile 'com.facebook.stetho:stetho:1.4.1'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
} }

View File

@ -13,7 +13,6 @@ import com.simplemobiletools.commons.extensions.checkWhatsNew
import com.simplemobiletools.commons.extensions.toast import com.simplemobiletools.commons.extensions.toast
import com.simplemobiletools.commons.extensions.updateTextColors import com.simplemobiletools.commons.extensions.updateTextColors
import com.simplemobiletools.commons.extensions.value import com.simplemobiletools.commons.extensions.value
import com.simplemobiletools.commons.helpers.LICENSE_AMBILWARNA
import com.simplemobiletools.commons.helpers.LICENSE_KOTLIN import com.simplemobiletools.commons.helpers.LICENSE_KOTLIN
import com.simplemobiletools.commons.helpers.LICENSE_RTL import com.simplemobiletools.commons.helpers.LICENSE_RTL
import com.simplemobiletools.commons.helpers.LICENSE_STETHO import com.simplemobiletools.commons.helpers.LICENSE_STETHO
@ -138,7 +137,7 @@ class MainActivity : SimpleActivity(), ViewPager.OnPageChangeListener {
} }
private fun launchAbout() { private fun launchAbout() {
startAboutActivity(R.string.app_name, LICENSE_KOTLIN or LICENSE_AMBILWARNA or LICENSE_STETHO or LICENSE_RTL, BuildConfig.VERSION_NAME) startAboutActivity(R.string.app_name, LICENSE_KOTLIN or LICENSE_STETHO or LICENSE_RTL, BuildConfig.VERSION_NAME)
} }
private fun displayDeleteNotePrompt() { private fun displayDeleteNotePrompt() {

View File

@ -9,12 +9,12 @@ import android.support.v7.app.AppCompatActivity
import android.util.TypedValue import android.util.TypedValue
import android.widget.RemoteViews import android.widget.RemoteViews
import android.widget.SeekBar import android.widget.SeekBar
import com.simplemobiletools.commons.dialogs.ColorPickerDialog
import com.simplemobiletools.notes.R import com.simplemobiletools.notes.R
import com.simplemobiletools.notes.extensions.getTextSize import com.simplemobiletools.notes.extensions.getTextSize
import com.simplemobiletools.notes.helpers.Config import com.simplemobiletools.notes.helpers.Config
import com.simplemobiletools.notes.helpers.MyWidgetProvider import com.simplemobiletools.notes.helpers.MyWidgetProvider
import kotlinx.android.synthetic.main.widget_config.* import kotlinx.android.synthetic.main.widget_config.*
import yuku.ambilwarna.AmbilWarnaDialog
class WidgetConfigureActivity : AppCompatActivity() { class WidgetConfigureActivity : AppCompatActivity() {
private var mBgAlpha = 0f private var mBgAlpha = 0f
@ -110,27 +110,17 @@ class WidgetConfigureActivity : AppCompatActivity() {
} }
fun pickBackgroundColor() { fun pickBackgroundColor() {
AmbilWarnaDialog(this, mBgColorWithoutTransparency, object : AmbilWarnaDialog.OnAmbilWarnaListener { ColorPickerDialog(this, mBgColorWithoutTransparency) {
override fun onCancel(dialog: AmbilWarnaDialog) { mBgColorWithoutTransparency = it
}
override fun onOk(dialog: AmbilWarnaDialog, color: Int) {
mBgColorWithoutTransparency = color
updateBackgroundColor() updateBackgroundColor()
} }
}).show()
} }
fun pickTextColor() { fun pickTextColor() {
AmbilWarnaDialog(this, mTextColor, object : AmbilWarnaDialog.OnAmbilWarnaListener { ColorPickerDialog(this, mTextColor) {
override fun onCancel(dialog: AmbilWarnaDialog) { mTextColor = it
}
override fun onOk(dialog: AmbilWarnaDialog, color: Int) {
mTextColor = color
updateTextColor() updateTextColor()
} }
}).show()
} }
private val bgSeekbarChangeListener = object : SeekBar.OnSeekBarChangeListener { private val bgSeekbarChangeListener = object : SeekBar.OnSeekBarChangeListener {