mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-04-04 18:51:14 +02:00
properly color the top menu items
This commit is contained in:
parent
afd4ee00b6
commit
ec7621b988
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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() {
|
||||||
|
@ -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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user