From 4c4ac0bc0340146666f25d2c15553b9287d893c2 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 1 May 2018 22:11:42 +0200 Subject: [PATCH] adding a settings button for customizing widget colors --- app/build.gradle | 2 +- .../calendar/activities/SettingsActivity.kt | 7 +++++ app/src/main/res/layout/activity_settings.xml | 26 +++++++++++++++++-- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 4321fd652..bb4532157 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -46,7 +46,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:3.21.3' + implementation 'com.simplemobiletools:commons:3.21.4' implementation 'joda-time:joda-time:2.9.9' implementation 'com.facebook.stetho:stetho:1.5.0' implementation 'com.android.support:multidex:1.0.3' diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/SettingsActivity.kt index 7fb8743bd..23cbeefec 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/SettingsActivity.kt @@ -61,6 +61,7 @@ class SettingsActivity : SimpleActivity() { setupSnoozeTime() setupDisplayPastEvents() setupFontSize() + setupCustomizeWidgetColors() updateTextColors(settings_holder) checkPrimaryColor() setupSectionColors() @@ -389,6 +390,12 @@ class SettingsActivity : SimpleActivity() { else -> R.string.large }) + private fun setupCustomizeWidgetColors() { + settings_customize_widget_colors_holder.setOnClickListener { + + } + } + override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) { super.onActivityResult(requestCode, resultCode, resultData) if (requestCode == GET_RINGTONE_URI && resultCode == RESULT_OK && resultData != null) { diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 6df46ade7..d1a554663 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -615,10 +615,10 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?attr/selectableItemBackground" - android:paddingBottom="@dimen/bigger_margin" + android:paddingBottom="@dimen/activity_margin" android:paddingLeft="@dimen/normal_margin" android:paddingRight="@dimen/normal_margin" - android:paddingTop="@dimen/bigger_margin"> + android:paddingTop="@dimen/activity_margin"> + + + + + +