mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-03-27 22:10:09 +01:00
updating the widget config screen
This commit is contained in:
parent
661d961621
commit
ea7f563f84
@ -3,12 +3,12 @@ package com.simplemobiletools.notes.pro.activities
|
|||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.appwidget.AppWidgetManager
|
import android.appwidget.AppWidgetManager
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import android.content.res.ColorStateList
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import android.graphics.Typeface
|
import android.graphics.Typeface
|
||||||
import android.graphics.drawable.ColorDrawable
|
import android.graphics.drawable.ColorDrawable
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.util.TypedValue
|
import android.util.TypedValue
|
||||||
import android.view.Menu
|
|
||||||
import android.widget.RemoteViews
|
import android.widget.RemoteViews
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import com.google.gson.reflect.TypeToken
|
import com.google.gson.reflect.TypeToken
|
||||||
@ -76,11 +76,6 @@ class WidgetConfigureActivity : SimpleActivity() {
|
|||||||
setupToolbar(config_toolbar)
|
setupToolbar(config_toolbar)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
|
||||||
updateMenuItemColors(menu)
|
|
||||||
return super.onCreateOptionsMenu(menu)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun initVariables() {
|
private fun initVariables() {
|
||||||
val extras = intent.extras
|
val extras = intent.extras
|
||||||
if (extras?.getInt(CUSTOMIZED_WIDGET_ID, 0) == 0) {
|
if (extras?.getInt(CUSTOMIZED_WIDGET_ID, 0) == 0) {
|
||||||
@ -236,6 +231,7 @@ class WidgetConfigureActivity : SimpleActivity() {
|
|||||||
checklist_note_view.setBackgroundColor(mBgColor)
|
checklist_note_view.setBackgroundColor(mBgColor)
|
||||||
text_note_view_title.setBackgroundColor(mBgColor)
|
text_note_view_title.setBackgroundColor(mBgColor)
|
||||||
config_bg_color.setFillWithStroke(mBgColor, mBgColor)
|
config_bg_color.setFillWithStroke(mBgColor, mBgColor)
|
||||||
|
config_save.backgroundTintList = ColorStateList.valueOf(getProperPrimaryColor())
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateTextColor() {
|
private fun updateTextColor() {
|
||||||
@ -243,6 +239,7 @@ class WidgetConfigureActivity : SimpleActivity() {
|
|||||||
text_note_view_title.setTextColor(mTextColor)
|
text_note_view_title.setTextColor(mTextColor)
|
||||||
(checklist_note_view.adapter as? ChecklistAdapter)?.updateTextColor(mTextColor)
|
(checklist_note_view.adapter as? ChecklistAdapter)?.updateTextColor(mTextColor)
|
||||||
config_text_color.setFillWithStroke(mTextColor, mTextColor)
|
config_text_color.setFillWithStroke(mTextColor, mTextColor)
|
||||||
|
config_save.setTextColor(getProperPrimaryColor().getContrastColor())
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun pickBackgroundColor() {
|
private fun pickBackgroundColor() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user