properly customize the menu icons

This commit is contained in:
tibbi 2019-09-02 15:54:23 +02:00
parent f4bc29be09
commit be5ffa7b9c
2 changed files with 9 additions and 0 deletions

View File

@ -95,6 +95,7 @@ class MainActivity : SimpleActivity(), CanvasListener {
}
requestedOrientation = if (config.forcePortraitMode) ActivityInfo.SCREEN_ORIENTATION_PORTRAIT else ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
invalidateOptionsMenu()
}
override fun onPause() {
@ -120,6 +121,7 @@ class MainActivity : SimpleActivity(), CanvasListener {
findItem(R.id.open_file).isVisible = !isEditIntent
}
updateMenuItemColors(menu)
return true
}

View File

@ -1,6 +1,7 @@
package com.simplemobiletools.draw.pro.activities
import android.os.Bundle
import android.view.Menu
import com.simplemobiletools.commons.extensions.beVisibleIf
import com.simplemobiletools.commons.extensions.updateTextColors
import com.simplemobiletools.draw.pro.R
@ -24,6 +25,12 @@ class SettingsActivity : SimpleActivity() {
setupAllowZoomingCanvas()
setupForcePortraitMode()
updateTextColors(settings_holder)
invalidateOptionsMenu()
}
override fun onCreateOptionsMenu(menu: Menu): Boolean {
updateMenuItemColors(menu)
return super.onCreateOptionsMenu(menu)
}
private fun setupCustomizeColors() {