add the color customization button in settings

This commit is contained in:
tibbi 2016-12-29 23:39:16 +01:00
parent 18c4d4a773
commit 05967d3790
3 changed files with 31 additions and 0 deletions

View File

@ -44,6 +44,11 @@
android:label="@string/about" android:label="@string/about"
android:parentActivityName=".activities.MainActivity"/> android:parentActivityName=".activities.MainActivity"/>
<activity
android:name="com.simplemobiletools.commons.activities.CustomizationActivity"
android:label="@string/customize_colors"
android:parentActivityName=".activities.SettingsActivity"/>
<activity <activity
android:name=".activities.DayActivity" android:name=".activities.DayActivity"
android:label="@string/details" android:label="@string/details"

View File

@ -27,6 +27,7 @@ class SettingsActivity : SimpleActivity() {
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
setupCustomizeColors()
setupSundayFirst() setupSundayFirst()
setupWeekNumbers() setupWeekNumbers()
setupVibrate() setupVibrate()
@ -35,6 +36,12 @@ class SettingsActivity : SimpleActivity() {
updateTextColors(settings_holder) updateTextColors(settings_holder)
} }
private fun setupCustomizeColors() {
settings_customize_colors_holder.setOnClickListener {
startCustomizationActivity()
}
}
private fun setupSundayFirst() { private fun setupSundayFirst() {
settings_sunday_first.isChecked = config.isSundayFirst settings_sunday_first.isChecked = config.isSundayFirst
settings_sunday_first_holder.setOnClickListener { settings_sunday_first_holder.setOnClickListener {

View File

@ -11,6 +11,25 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<RelativeLayout
android:id="@+id/settings_customize_colors_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:padding="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_customize_colors_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:paddingLeft="@dimen/medium_margin"
android:paddingStart="@dimen/medium_margin"
android:text="@string/customize_colors"/>
</RelativeLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/settings_sunday_first_holder" android:id="@+id/settings_sunday_first_holder"
android:layout_width="match_parent" android:layout_width="match_parent"