properly color the top menu items

This commit is contained in:
tibbi 2019-08-19 22:36:23 +02:00
parent afd4ee00b6
commit ec7621b988
3 changed files with 14 additions and 0 deletions

View File

@ -106,6 +106,7 @@ class MainActivity : SimpleActivity() {
findItem(R.id.redo).isVisible = showRedoButton && mCurrentNote.type == TYPE_TEXT findItem(R.id.redo).isVisible = showRedoButton && mCurrentNote.type == TYPE_TEXT
} }
updateMenuItemColors(menu)
return true return true
} }

View File

@ -2,6 +2,7 @@ package com.simplemobiletools.notes.pro.activities
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.Bundle
import android.view.Menu
import com.simplemobiletools.commons.dialogs.RadioGroupDialog import com.simplemobiletools.commons.dialogs.RadioGroupDialog
import com.simplemobiletools.commons.extensions.beVisibleIf import com.simplemobiletools.commons.extensions.beVisibleIf
import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor
@ -42,6 +43,12 @@ class SettingsActivity : SimpleActivity() {
setupCustomizeWidgetColors() setupCustomizeWidgetColors()
updateTextColors(settings_scrollview) updateTextColors(settings_scrollview)
setupSectionColors() setupSectionColors()
invalidateOptionsMenu()
}
override fun onCreateOptionsMenu(menu: Menu): Boolean {
updateMenuItemColors(menu)
return super.onCreateOptionsMenu(menu)
} }
private fun setupSectionColors() { private fun setupSectionColors() {

View File

@ -7,6 +7,7 @@ import android.graphics.Color
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
@ -64,6 +65,11 @@ class WidgetConfigureActivity : SimpleActivity() {
text_note_view.setTextSize(TypedValue.COMPLEX_UNIT_PX, applicationContext.getTextSize()) text_note_view.setTextSize(TypedValue.COMPLEX_UNIT_PX, applicationContext.getTextSize())
} }
override fun onCreateOptionsMenu(menu: Menu): Boolean {
updateMenuItemColors(menu)
return super.onCreateOptionsMenu(menu)
}
private fun initVariables() { private fun initVariables() {
mBgColor = config.widgetBgColor mBgColor = config.widgetBgColor
if (mBgColor == 1) { if (mBgColor == 1) {