From dfb0a5b89b88e11412a226678b8b19528a931ef0 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 6 Jan 2017 21:14:00 +0100 Subject: [PATCH] setting up the Settings screen --- .../notes/activities/SettingsActivity.kt | 7 +++ app/src/main/res/layout/activity_settings.xml | 47 +++++++------------ 2 files changed, 23 insertions(+), 31 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/notes/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/notes/activities/SettingsActivity.kt index 6b276e24..1e73a316 100644 --- a/app/src/main/kotlin/com/simplemobiletools/notes/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/notes/activities/SettingsActivity.kt @@ -15,11 +15,18 @@ class SettingsActivity : SimpleActivity() { super.onCreate(savedInstanceState) setContentView(R.layout.activity_settings) + setupCustomizeColors() setupFontSize() setupWidgetNote() setupGravity() } + private fun setupCustomizeColors() { + settings_customize_colors_holder.setOnClickListener { + startCustomizationActivity() + } + } + private fun setupFontSize() { settings_font_size.setSelection(config.fontSize) settings_font_size.onItemSelectedListener = object : AdapterView.OnItemSelectedListener { diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index a8c2dfa6..07e6c3b2 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -12,30 +12,21 @@ android:orientation="vertical"> - - - + android:text="@string/customize_colors"/> @@ -44,12 +35,10 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/medium_margin" - android:paddingBottom="@dimen/activity_margin" - android:paddingLeft="@dimen/activity_margin" - android:paddingRight="@dimen/medium_margin" - android:paddingTop="@dimen/activity_margin"> + android:background="?attr/selectableItemBackground" + android:padding="@dimen/activity_margin"> - - + android:background="?attr/selectableItemBackground" + android:padding="@dimen/activity_margin"> - - + android:background="?attr/selectableItemBackground" + android:padding="@dimen/activity_margin"> - -