adding a settings button for customizing widget colors

This commit is contained in:
tibbi 2018-05-01 22:11:42 +02:00
parent 48d452bd28
commit 4c4ac0bc03
3 changed files with 32 additions and 3 deletions

View File

@ -46,7 +46,7 @@ ext {
} }
dependencies { dependencies {
implementation 'com.simplemobiletools:commons:3.21.3' implementation 'com.simplemobiletools:commons:3.21.4'
implementation 'joda-time:joda-time:2.9.9' implementation 'joda-time:joda-time:2.9.9'
implementation 'com.facebook.stetho:stetho:1.5.0' implementation 'com.facebook.stetho:stetho:1.5.0'
implementation 'com.android.support:multidex:1.0.3' implementation 'com.android.support:multidex:1.0.3'

View File

@ -61,6 +61,7 @@ class SettingsActivity : SimpleActivity() {
setupSnoozeTime() setupSnoozeTime()
setupDisplayPastEvents() setupDisplayPastEvents()
setupFontSize() setupFontSize()
setupCustomizeWidgetColors()
updateTextColors(settings_holder) updateTextColors(settings_holder)
checkPrimaryColor() checkPrimaryColor()
setupSectionColors() setupSectionColors()
@ -389,6 +390,12 @@ class SettingsActivity : SimpleActivity() {
else -> R.string.large else -> R.string.large
}) })
private fun setupCustomizeWidgetColors() {
settings_customize_widget_colors_holder.setOnClickListener {
}
}
override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) { override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {
super.onActivityResult(requestCode, resultCode, resultData) super.onActivityResult(requestCode, resultCode, resultData)
if (requestCode == GET_RINGTONE_URI && resultCode == RESULT_OK && resultData != null) { if (requestCode == GET_RINGTONE_URI && resultCode == RESULT_OK && resultData != null) {

View File

@ -615,10 +615,10 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:paddingBottom="@dimen/bigger_margin" android:paddingBottom="@dimen/activity_margin"
android:paddingLeft="@dimen/normal_margin" android:paddingLeft="@dimen/normal_margin"
android:paddingRight="@dimen/normal_margin" android:paddingRight="@dimen/normal_margin"
android:paddingTop="@dimen/bigger_margin"> android:paddingTop="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MyTextView <com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_font_size_label" android:id="@+id/settings_font_size_label"
@ -643,5 +643,27 @@
android:clickable="false"/> android:clickable="false"/>
</RelativeLayout> </RelativeLayout>
<RelativeLayout
android:id="@+id/settings_customize_widget_colors_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingBottom="@dimen/activity_margin"
android:paddingLeft="@dimen/normal_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_customize_widget_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_widget_colors"/>
</RelativeLayout>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>