diff --git a/app/build.gradle b/app/build.gradle index 9ca32620..7f1dacca 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -32,7 +32,7 @@ android { } dependencies { - compile 'com.simplemobiletools:commons:2.1.9' + compile 'com.simplemobiletools:commons:2.3.8' compile 'com.facebook.stetho:stetho:1.4.1' compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" } diff --git a/app/src/main/kotlin/com/simplemobiletools/notes/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/notes/activities/MainActivity.kt index 2e384cfd..62217a6f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/notes/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/notes/activities/MainActivity.kt @@ -13,7 +13,6 @@ import com.simplemobiletools.commons.extensions.checkWhatsNew import com.simplemobiletools.commons.extensions.toast import com.simplemobiletools.commons.extensions.updateTextColors 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_RTL import com.simplemobiletools.commons.helpers.LICENSE_STETHO @@ -138,7 +137,7 @@ class MainActivity : SimpleActivity(), ViewPager.OnPageChangeListener { } 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() { diff --git a/app/src/main/kotlin/com/simplemobiletools/notes/activities/WidgetConfigureActivity.kt b/app/src/main/kotlin/com/simplemobiletools/notes/activities/WidgetConfigureActivity.kt index fa03a443..6595b63b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/notes/activities/WidgetConfigureActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/notes/activities/WidgetConfigureActivity.kt @@ -9,12 +9,12 @@ import android.support.v7.app.AppCompatActivity import android.util.TypedValue import android.widget.RemoteViews import android.widget.SeekBar +import com.simplemobiletools.commons.dialogs.ColorPickerDialog import com.simplemobiletools.notes.R import com.simplemobiletools.notes.extensions.getTextSize import com.simplemobiletools.notes.helpers.Config import com.simplemobiletools.notes.helpers.MyWidgetProvider import kotlinx.android.synthetic.main.widget_config.* -import yuku.ambilwarna.AmbilWarnaDialog class WidgetConfigureActivity : AppCompatActivity() { private var mBgAlpha = 0f @@ -110,27 +110,17 @@ class WidgetConfigureActivity : AppCompatActivity() { } fun pickBackgroundColor() { - AmbilWarnaDialog(this, mBgColorWithoutTransparency, object : AmbilWarnaDialog.OnAmbilWarnaListener { - override fun onCancel(dialog: AmbilWarnaDialog) { - } - - override fun onOk(dialog: AmbilWarnaDialog, color: Int) { - mBgColorWithoutTransparency = color - updateBackgroundColor() - } - }).show() + ColorPickerDialog(this, mBgColorWithoutTransparency) { + mBgColorWithoutTransparency = it + updateBackgroundColor() + } } fun pickTextColor() { - AmbilWarnaDialog(this, mTextColor, object : AmbilWarnaDialog.OnAmbilWarnaListener { - override fun onCancel(dialog: AmbilWarnaDialog) { - } - - override fun onOk(dialog: AmbilWarnaDialog, color: Int) { - mTextColor = color - updateTextColor() - } - }).show() + ColorPickerDialog(this, mTextColor) { + mTextColor = it + updateTextColor() + } } private val bgSeekbarChangeListener = object : SeekBar.OnSeekBarChangeListener {