mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-06 02:35:19 +08:00
Added: Add Theme.MaterialComponents.DayNight.TermuxPrimaryActivity theme can be used by activities for day and night mode
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/dark_red"
|
||||
android:background="@color/red_400"
|
||||
android:paddingStart="24dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="24dp"
|
||||
|
19
termux-shared/src/main/res/values-night/themes.xml
Executable file
19
termux-shared/src/main/res/values-night/themes.xml
Executable file
@@ -0,0 +1,19 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<style name="Theme.MaterialComponents.DayNight.TermuxPrimaryActivity" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/red_400</item>
|
||||
<item name="colorPrimaryVariant">@color/red_800</item>
|
||||
<item name="colorOnPrimary">@color/black</item>
|
||||
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/grey_900</item>
|
||||
<item name="colorSecondaryVariant">@color/black</item>
|
||||
<item name="colorOnSecondary">@color/white</item>
|
||||
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
|
||||
<!-- Text color. -->
|
||||
<item name="android:textColorLink">@color/grey_200</item>
|
||||
</style>
|
||||
</resources>
|
@@ -2,5 +2,17 @@
|
||||
<resources>
|
||||
<color name="background_markdown_code_inline">#1F000000</color>
|
||||
<color name="background_markdown_code_block">#0F000000</color>
|
||||
<color name="dark_red">#FF0000</color>
|
||||
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
|
||||
<color name="red_400">#FF0000</color>
|
||||
<color name="red_800">#C4001D</color>
|
||||
|
||||
<color name="grey_200">#EEEEEE</color>
|
||||
<color name="grey_800">#424242</color>
|
||||
<color name="grey_900">#212121</color>
|
||||
|
||||
<color name="red_error">#DC143C</color>
|
||||
<color name="red_error_link">#FC143C</color>
|
||||
</resources>
|
||||
|
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<style name="Theme.AppCompat.TermuxReportActivity" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="colorPrimaryDark">#FF0000</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.AppCompat.TermuxTextIOActivity" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="colorPrimaryDark">#FF0000</item>
|
||||
</style>
|
||||
|
||||
<style name="Toolbar.Title" parent="TextAppearance.Widget.AppCompat.Toolbar.Title">
|
||||
<item name="android:textSize">14sp</item>
|
||||
</style>
|
||||
</resources>
|
42
termux-shared/src/main/res/values/themes.xml
Normal file
42
termux-shared/src/main/res/values/themes.xml
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<style name="Theme.MaterialComponents.DayNight.TermuxPrimaryActivity" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/red_400</item>
|
||||
<item name="colorPrimaryVariant">@color/red_800</item>
|
||||
<item name="colorOnPrimary">@color/white</item>
|
||||
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/grey_900</item>
|
||||
<item name="colorSecondaryVariant">@color/black</item>
|
||||
<item name="colorOnSecondary">@color/white</item>
|
||||
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
|
||||
<!-- Text color. -->
|
||||
<item name="android:textColorPrimary">@color/black</item>
|
||||
<item name="android:textColorLink">@color/grey_800</item>
|
||||
<item name="android:textColorSecondary">@color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.AppCompat.TermuxReportActivity" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="colorPrimaryDark">#FF0000</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.AppCompat.TermuxTextIOActivity" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="colorPrimaryDark">#FF0000</item>
|
||||
</style>
|
||||
|
||||
<style name="Toolbar.Title" parent="TextAppearance.Widget.AppCompat.Toolbar.Title">
|
||||
<item name="android:textSize">14sp</item>
|
||||
</style>
|
||||
|
||||
<style name="ViewDivider">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">1dp</item>
|
||||
<item name="android:layout_marginTop">@dimen/activity_vertical_margin</item>
|
||||
<item name="android:layout_marginBottom">@dimen/activity_vertical_margin</item>
|
||||
<item name="android:background">?android:attr/listDivider</item>
|
||||
</style>
|
||||
</resources>
|
Reference in New Issue
Block a user