add the color customization button in settings
This commit is contained in:
parent
18c4d4a773
commit
05967d3790
|
@ -44,6 +44,11 @@
|
|||
android:label="@string/about"
|
||||
android:parentActivityName=".activities.MainActivity"/>
|
||||
|
||||
<activity
|
||||
android:name="com.simplemobiletools.commons.activities.CustomizationActivity"
|
||||
android:label="@string/customize_colors"
|
||||
android:parentActivityName=".activities.SettingsActivity"/>
|
||||
|
||||
<activity
|
||||
android:name=".activities.DayActivity"
|
||||
android:label="@string/details"
|
||||
|
|
|
@ -27,6 +27,7 @@ class SettingsActivity : SimpleActivity() {
|
|||
override fun onResume() {
|
||||
super.onResume()
|
||||
|
||||
setupCustomizeColors()
|
||||
setupSundayFirst()
|
||||
setupWeekNumbers()
|
||||
setupVibrate()
|
||||
|
@ -35,6 +36,12 @@ class SettingsActivity : SimpleActivity() {
|
|||
updateTextColors(settings_holder)
|
||||
}
|
||||
|
||||
private fun setupCustomizeColors() {
|
||||
settings_customize_colors_holder.setOnClickListener {
|
||||
startCustomizationActivity()
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupSundayFirst() {
|
||||
settings_sunday_first.isChecked = config.isSundayFirst
|
||||
settings_sunday_first_holder.setOnClickListener {
|
||||
|
|
|
@ -11,6 +11,25 @@
|
|||
android:layout_height="wrap_content"
|
||||
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
|
||||
android:id="@+id/settings_sunday_first_holder"
|
||||
android:layout_width="match_parent"
|
||||
|
|
Loading…
Reference in New Issue