adding a Solarized predefined theme
This commit is contained in:
parent
3b1d73a3b1
commit
27ec64bcb7
30 changed files with 88 additions and 55 deletions
|
@ -17,7 +17,8 @@ import java.util.*
|
|||
class CustomizationActivity : BaseSimpleActivity() {
|
||||
private val THEME_LIGHT = 0
|
||||
private val THEME_DARK = 1
|
||||
private val THEME_CUSTOM = 2
|
||||
private val THEME_SOLARIZED = 2
|
||||
private val THEME_CUSTOM = 3
|
||||
|
||||
private var curTextColor = 0
|
||||
private var curBackgroundColor = 0
|
||||
|
@ -32,6 +33,13 @@ class CustomizationActivity : BaseSimpleActivity() {
|
|||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_customization)
|
||||
|
||||
predefinedThemes.apply {
|
||||
put(THEME_LIGHT, MyTheme(R.string.light_theme, R.color.theme_light_text_color, R.color.theme_light_background_color, R.color.color_primary))
|
||||
put(THEME_DARK, MyTheme(R.string.dark_theme, R.color.theme_dark_text_color, R.color.theme_dark_background_color, R.color.color_primary))
|
||||
put(THEME_SOLARIZED, MyTheme(R.string.solarized, R.color.theme_solarized_text_color, R.color.theme_solarized_background_color, R.color.theme_solarized_primary_color))
|
||||
put(THEME_CUSTOM, MyTheme(R.string.custom, 0, 0, 0))
|
||||
}
|
||||
|
||||
supportActionBar?.setHomeAsUpIndicator(R.drawable.ic_cross)
|
||||
updateTextColors(customization_holder)
|
||||
initColorVariables()
|
||||
|
@ -41,12 +49,6 @@ class CustomizationActivity : BaseSimpleActivity() {
|
|||
customization_background_color_holder.setOnClickListener { pickBackgroundColor() }
|
||||
customization_primary_color_holder.setOnClickListener { pickPrimaryColor() }
|
||||
setupThemePicker()
|
||||
|
||||
predefinedThemes.apply {
|
||||
put(THEME_LIGHT, MyTheme(R.string.light_theme, R.color.theme_light_text_color, R.color.theme_light_background_color, R.color.color_primary))
|
||||
put(THEME_DARK, MyTheme(R.string.dark_theme, R.color.theme_dark_text_color, R.color.theme_dark_background_color, R.color.color_primary))
|
||||
put(THEME_CUSTOM, MyTheme(R.string.custom, 0, 0, 0))
|
||||
}
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
|
|
|
@ -127,8 +127,9 @@
|
|||
<string name="save_before_closing">You have unsaved changes. Save before exit?</string>
|
||||
|
||||
<!-- Themes -->
|
||||
<string name="light_theme">Light theme</string>
|
||||
<string name="dark_theme">Dark theme</string>
|
||||
<string name="light_theme">Light</string>
|
||||
<string name="dark_theme">Dark</string>
|
||||
<string name="solarized">Solarized</string>
|
||||
<string name="custom">Custom</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -127,8 +127,9 @@
|
|||
<string name="save_before_closing">You have unsaved changes. Save before exit?</string>
|
||||
|
||||
<!-- Themes -->
|
||||
<string name="light_theme">Light theme</string>
|
||||
<string name="dark_theme">Dark theme</string>
|
||||
<string name="light_theme">Light</string>
|
||||
<string name="dark_theme">Dark</string>
|
||||
<string name="solarized">Solarized</string>
|
||||
<string name="custom">Custom</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -127,8 +127,9 @@
|
|||
<string name="save_before_closing">Máte neuložené změny. Uložit před zavřením?</string>
|
||||
|
||||
<!-- Themes -->
|
||||
<string name="light_theme">Světlý motiv</string>
|
||||
<string name="dark_theme">Tmavý motiv</string>
|
||||
<string name="light_theme">Světlý</string>
|
||||
<string name="dark_theme">Tmavý</string>
|
||||
<string name="solarized">Solarizovaná</string>
|
||||
<string name="custom">Vlastní</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -127,8 +127,9 @@
|
|||
<string name="save_before_closing">You have unsaved changes. Save before exit?</string>
|
||||
|
||||
<!-- Themes -->
|
||||
<string name="light_theme">Light theme</string>
|
||||
<string name="dark_theme">Dark theme</string>
|
||||
<string name="light_theme">Light</string>
|
||||
<string name="dark_theme">Dark</string>
|
||||
<string name="solarized">Solarized</string>
|
||||
<string name="custom">Custom</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -127,8 +127,9 @@
|
|||
<string name="save_before_closing">Du hast ungespeicherte Änderungen. Speichern vorm Beenden?</string>
|
||||
|
||||
<!-- Themes -->
|
||||
<string name="light_theme">Helles Thema</string>
|
||||
<string name="dark_theme">Dunkles Thema</string>
|
||||
<string name="light_theme">Helles</string>
|
||||
<string name="dark_theme">Dunkles</string>
|
||||
<string name="solarized">Solarized</string>
|
||||
<string name="custom">Benutzerdefiniert</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -127,8 +127,9 @@
|
|||
<string name="save_before_closing">Tiene cambios sin aplicar. ¿Guardar antes de salir?</string>
|
||||
|
||||
<!-- Themes -->
|
||||
<string name="light_theme">Tema claro</string>
|
||||
<string name="dark_theme">Tema oscuro</string>
|
||||
<string name="light_theme">Claro</string>
|
||||
<string name="dark_theme">Oscuro</string>
|
||||
<string name="solarized">Solarized</string>
|
||||
<string name="custom">Personalizado</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -127,8 +127,9 @@
|
|||
<string name="save_before_closing">You have unsaved changes. Save before exit?</string>
|
||||
|
||||
<!-- Themes -->
|
||||
<string name="light_theme">Light theme</string>
|
||||
<string name="dark_theme">Dark theme</string>
|
||||
<string name="light_theme">Light</string>
|
||||
<string name="dark_theme">Dark</string>
|
||||
<string name="solarized">Solarized</string>
|
||||
<string name="custom">Custom</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -127,8 +127,9 @@
|
|||
<string name="save_before_closing">Vous avez des changements non sauvegardés. Sauvegarder avant de quitter ?</string>
|
||||
|
||||
<!-- Themes -->
|
||||
<string name="light_theme">Thème lumineux</string>
|
||||
<string name="dark_theme">Thème sombre</string>
|
||||
<string name="light_theme">Lumineux</string>
|
||||
<string name="dark_theme">Sombre</string>
|
||||
<string name="solarized">Solarized</string>
|
||||
<string name="custom">Personnalisé</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -127,8 +127,9 @@
|
|||
<string name="save_before_closing">You have unsaved changes. Save before exit?</string>
|
||||
|
||||
<!-- Themes -->
|
||||
<string name="light_theme">Light theme</string>
|
||||
<string name="dark_theme">Dark theme</string>
|
||||
<string name="light_theme">Light</string>
|
||||
<string name="dark_theme">Dark</string>
|
||||
<string name="solarized">Solarized</string>
|
||||
<string name="custom">Custom</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -127,8 +127,9 @@
|
|||
<string name="save_before_closing">You have unsaved changes. Save before exit?</string>
|
||||
|
||||
<!-- Themes -->
|
||||
<string name="light_theme">Light theme</string>
|
||||
<string name="dark_theme">Dark theme</string>
|
||||
<string name="light_theme">Light</string>
|
||||
<string name="dark_theme">Dark</string>
|
||||
<string name="solarized">Solarized</string>
|
||||
<string name="custom">Custom</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -127,8 +127,9 @@
|
|||
<string name="save_before_closing">Hai modifiche non salvate. Salvare prima di uscire?</string>
|
||||
|
||||
<!-- Themes -->
|
||||
<string name="light_theme">Tema chiaro</string>
|
||||
<string name="dark_theme">Tema scuro</string>
|
||||
<string name="light_theme">Chiaro</string>
|
||||
<string name="dark_theme">Scuro</string>
|
||||
<string name="solarized">Solarized</string>
|
||||
<string name="custom">Personale</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -129,6 +129,7 @@
|
|||
<!-- Themes -->
|
||||
<string name="light_theme">ライト</string>
|
||||
<string name="dark_theme">ダーク</string>
|
||||
<string name="solarized">Solarized</string>
|
||||
<string name="custom">カスタム</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -127,8 +127,9 @@
|
|||
<string name="save_before_closing">변경사항을 저장하지 않았습니다. 종료전에 저장 하시겠습니까?</string>
|
||||
|
||||
<!-- Themes -->
|
||||
<string name="light_theme">Light theme</string>
|
||||
<string name="dark_theme">Dark theme</string>
|
||||
<string name="light_theme">Light</string>
|
||||
<string name="dark_theme">Dark</string>
|
||||
<string name="solarized">Solarized</string>
|
||||
<string name="custom">Custom</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -127,8 +127,9 @@
|
|||
<string name="save_before_closing">Turite neiðsaugotø pakeitimø. Iðsaugoti prieð iðeinant?</string>
|
||||
|
||||
<!-- Themes -->
|
||||
<string name="light_theme">Ðviesi tema</string>
|
||||
<string name="dark_theme">Tamsi tema</string>
|
||||
<string name="light_theme">Ðviesi</string>
|
||||
<string name="dark_theme">Tamsi</string>
|
||||
<string name="solarized">Solarized</string>
|
||||
<string name="custom">Pasirinktinë</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -127,8 +127,9 @@
|
|||
<string name="save_before_closing">You have unsaved changes. Save before exit?</string>
|
||||
|
||||
<!-- Themes -->
|
||||
<string name="light_theme">Light theme</string>
|
||||
<string name="dark_theme">Dark theme</string>
|
||||
<string name="light_theme">Light</string>
|
||||
<string name="dark_theme">Dark</string>
|
||||
<string name="solarized">Solarized</string>
|
||||
<string name="custom">Custom</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -127,8 +127,9 @@
|
|||
<string name="save_before_closing">You have unsaved changes. Save before exit?</string>
|
||||
|
||||
<!-- Themes -->
|
||||
<string name="light_theme">Lyst tema</string>
|
||||
<string name="dark_theme">Mørkt tema</string>
|
||||
<string name="light_theme">Lyst</string>
|
||||
<string name="dark_theme">Mørkt</string>
|
||||
<string name="solarized">Solarized</string>
|
||||
<string name="custom">Tilpasset</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -127,8 +127,9 @@
|
|||
<string name="save_before_closing">Onopgeslagen wijzigingen. Nu opslaan?</string>
|
||||
|
||||
<!-- Themes -->
|
||||
<string name="light_theme">Licht thema</string>
|
||||
<string name="dark_theme">Donker thema</string>
|
||||
<string name="light_theme">Licht</string>
|
||||
<string name="dark_theme">Donker</string>
|
||||
<string name="solarized">Solarized</string>
|
||||
<string name="custom">Aangepast</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -127,8 +127,9 @@
|
|||
<string name="save_before_closing">You have unsaved changes. Save before exit?</string>
|
||||
|
||||
<!-- Themes -->
|
||||
<string name="light_theme">Lyst tema</string>
|
||||
<string name="dark_theme">Mørkt tema</string>
|
||||
<string name="light_theme">Lyst</string>
|
||||
<string name="dark_theme">Mørkt</string>
|
||||
<string name="solarized">Solarized</string>
|
||||
<string name="custom">Tilpasset</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -130,6 +130,7 @@
|
|||
<!-- Themes -->
|
||||
<string name="light_theme">Jasny</string>
|
||||
<string name="dark_theme">Ciemny</string>
|
||||
<string name="solarized">Solarized</string>
|
||||
<string name="custom">Własny</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -127,8 +127,9 @@
|
|||
<string name="save_before_closing">Possui alterações não salvass. Salvar antes de sair?</string>
|
||||
|
||||
<!-- Themes -->
|
||||
<string name="light_theme">Tema claro</string>
|
||||
<string name="dark_theme">Tema escuro</string>
|
||||
<string name="light_theme">Claro</string>
|
||||
<string name="dark_theme">Escuro</string>
|
||||
<string name="solarized">Solarized</string>
|
||||
<string name="custom">Personalizado</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -127,8 +127,9 @@
|
|||
<string name="save_before_closing">Existem alterações não guardadas. Deseja guardar antes de sair?</string>
|
||||
|
||||
<!-- Themes -->
|
||||
<string name="light_theme">Tema claro</string>
|
||||
<string name="dark_theme">Tema escuro</string>
|
||||
<string name="light_theme">Claro</string>
|
||||
<string name="dark_theme">Escuro</string>
|
||||
<string name="solarized">Solarized</string>
|
||||
<string name="custom">Personalizado</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -127,8 +127,9 @@
|
|||
<string name="save_before_closing">У вас есть несохранённые изменения. Сохранить перед выходом?</string>
|
||||
|
||||
<!-- Themes -->
|
||||
<string name="light_theme">Светлая тема</string>
|
||||
<string name="dark_theme">Тёмная тема</string>
|
||||
<string name="light_theme">Светлая</string>
|
||||
<string name="dark_theme">Тёмная</string>
|
||||
<string name="solarized">Solarized</string>
|
||||
<string name="custom">Настраиваемое</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -128,8 +128,9 @@
|
|||
<string name="save_before_closing">Máte neuložené zmeny. Chcete ich uložiť pred ukončením?</string>
|
||||
|
||||
<!-- Themes -->
|
||||
<string name="light_theme">Svetlá téma</string>
|
||||
<string name="dark_theme">Tmavá téma</string>
|
||||
<string name="light_theme">Svetlá</string>
|
||||
<string name="dark_theme">Tmavá</string>
|
||||
<string name="solarized">Solarizovaná</string>
|
||||
<string name="custom">Vlastná</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -127,8 +127,9 @@
|
|||
<string name="save_before_closing">Du har ändringar som inte är sparade. Spara innan du lämnar?</string>
|
||||
|
||||
<!-- Themes -->
|
||||
<string name="light_theme">Ljust tema</string>
|
||||
<string name="dark_theme">Mörkt tema</string>
|
||||
<string name="light_theme">Ljust</string>
|
||||
<string name="dark_theme">Mörkt</string>
|
||||
<string name="solarized">Solarized</string>
|
||||
<string name="custom">Anpassat tema</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -127,8 +127,9 @@
|
|||
<string name="save_before_closing">Kaydedilmemiş değişiklikleriniz var. Çıkmadan önce kaydet?</string>
|
||||
|
||||
<!-- Themes -->
|
||||
<string name="light_theme">Hafif tema</string>
|
||||
<string name="dark_theme">Koyu tema</string>
|
||||
<string name="light_theme">Hafif</string>
|
||||
<string name="dark_theme">Koyu</string>
|
||||
<string name="solarized">Solarized</string>
|
||||
<string name="custom">Özel</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -129,6 +129,7 @@
|
|||
<!-- Themes -->
|
||||
<string name="light_theme">浅色主题</string>
|
||||
<string name="dark_theme">深色主题</string>
|
||||
<string name="solarized">Solarized</string>
|
||||
<string name="custom">自定义</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -129,6 +129,7 @@
|
|||
<!-- Themes -->
|
||||
<string name="light_theme">明亮主題</string>
|
||||
<string name="dark_theme">灰暗主題</string>
|
||||
<string name="solarized">Solarized</string>
|
||||
<string name="custom">自訂</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
<color name="theme_dark_background_color">#FF3F3F3F</color>
|
||||
<color name="default_text_color">@color/theme_light_text_color</color>
|
||||
<color name="default_background_color">@color/theme_light_background_color</color>
|
||||
<color name="theme_solarized_background_color">#FF002B36</color>
|
||||
<color name="theme_solarized_text_color">#FFB58900</color>
|
||||
<color name="theme_solarized_primary_color">#FF283593</color>
|
||||
|
||||
<!-- SwitchCompat -->
|
||||
<color name="thumb_deactivated">#FFECECEC</color>
|
||||
|
|
|
@ -127,8 +127,9 @@
|
|||
<string name="save_before_closing">You have unsaved changes. Save before exit?</string>
|
||||
|
||||
<!-- Themes -->
|
||||
<string name="light_theme">Light theme</string>
|
||||
<string name="dark_theme">Dark theme</string>
|
||||
<string name="light_theme">Light</string>
|
||||
<string name="dark_theme">Dark</string>
|
||||
<string name="solarized">Solarized</string>
|
||||
<string name="custom">Custom</string>
|
||||
|
||||
<!-- What's new -->
|
||||
|
|
Loading…
Reference in a new issue