With this commit, activities will automatically change theme between day/night if `night-mode` `termux.properties` is not set or is set to `system` without requiring app restart. Dialog theming will be fully added in a later commit and may currently be in an inconsistent state or have crashes. The `uiMode` has been removed from `configChanges` of `TermuxActivity`, this may cause termux app to restart if samsung DEX mode is changed, if it does, then users should report it so that it can be fixed by re-adding the value and ignoring the change inside `TermuxActivity.onConfigurationChanged()`. The docs don't state if its necessary. Check related pull request #1446. Running `termux-reload-settings` will also restart `TermuxActivity`, the activity data should be preserved.
50 lines
2.3 KiB
XML
50 lines
2.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<resources>
|
|
<!--
|
|
https://material.io/develop/android/theming/dark
|
|
-->
|
|
|
|
<!-- TermuxApp Light DarkActionBar theme. -->
|
|
<style name="Theme.TermuxApp.Light.DarkActionBar" parent="Theme.BaseActivity.Light.DarkActionBar"/>
|
|
<!-- TermuxApp Light NoActionBar theme. -->
|
|
<style name="Theme.TermuxApp.Light.NoActionBar" parent="Theme.BaseActivity.Light.NoActionBar"/>
|
|
|
|
<!-- TermuxApp DayNight DarkActionBar theme. -->
|
|
<style name="Theme.TermuxApp.DayNight.DarkActionBar" parent="Theme.BaseActivity.DayNight.DarkActionBar"/>
|
|
<!-- TermuxApp DayNight NoActionBar theme. -->
|
|
<style name="Theme.TermuxApp.DayNight.NoActionBar" parent="Theme.BaseActivity.DayNight.NoActionBar"/>
|
|
|
|
|
|
<!-- TermuxActivity DayNight NoActionBar theme. -->
|
|
<style name="Theme.TermuxActivity.DayNight.NoActionBar" parent="Theme.TermuxApp.DayNight.NoActionBar">
|
|
<!-- Primary brand color. -->
|
|
<item name="colorPrimary">@color/black</item>
|
|
<item name="colorPrimaryVariant">@color/black</item>
|
|
|
|
<item name="android:windowBackground">@color/black</item>
|
|
|
|
<!-- Avoid action mode toolbar pushing down terminal content when
|
|
selecting text on pre-6.0 (non-floating toolbar). -->
|
|
<item name="android:windowActionModeOverlay">true</item>
|
|
|
|
<item name="android:windowTranslucentStatus">true</item>
|
|
<item name="android:windowTranslucentNavigation">true</item>
|
|
|
|
<!-- https://developer.android.com/training/tv/start/start.html#transition-color -->
|
|
<item name="android:windowAllowReturnTransitionOverlap">true</item>
|
|
<item name="android:windowAllowEnterTransitionOverlap">true</item>
|
|
|
|
<!-- Left drawer. -->
|
|
<item name="buttonBarButtonStyle">@style/TermuxActivity.Drawer.ButtonBarStyle.Light</item>
|
|
<item name="termuxActivityDrawerBackground">@color/white</item>
|
|
<item name="termuxActivityDrawerImageTint">@color/black</item>
|
|
|
|
<!-- Extra keys colors. -->
|
|
<item name="extraKeysButtonTextColor">@color/white</item>
|
|
<item name="extraKeysButtonActiveTextColor">@color/red_400</item>
|
|
<item name="extraKeysButtonBackgroundColor">@color/black</item>
|
|
<item name="extraKeysButtonActiveBackgroundColor">@color/grey_500</item>
|
|
</style>
|
|
|
|
</resources>
|