mirror of
https://framagit.org/tom79/fedilab-tube
synced 2025-06-05 21:09:11 +02:00
Fix theme between flavors
This commit is contained in:
26
app/src/full/java/app/fedilab/fedilabtube/helper/Theme.java
Normal file
26
app/src/full/java/app/fedilab/fedilabtube/helper/Theme.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package app.fedilab.fedilabtube.helper;
|
||||
/* Copyright 2022 Thomas Schneider
|
||||
*
|
||||
* This file is a part of TubeLab
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* TubeLab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with TubeLab; if not,
|
||||
* see <http://www.gnu.org/licenses>. */
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import app.fedilab.fedilabtube.R;
|
||||
|
||||
public class Theme {
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static void setTheme(AppCompatActivity activity, String instance, boolean noActionBar) {
|
||||
activity.setTheme(noActionBar?R.style.AppThemeNoActionBar:R.style.AppTheme);
|
||||
}
|
||||
}
|
@@ -24,28 +24,6 @@
|
||||
<item name="android:colorBackground">@android:color/black</item>
|
||||
</style>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.DayNight.DarkActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="android:textColor">?attr/colorOnBackground</item>
|
||||
<item name="backgroundView">@color/backgroundDark</item>
|
||||
<item name="android:windowBackground">@android:color/black</item>
|
||||
<item name="android:colorBackground">@android:color/black</item>
|
||||
</style>
|
||||
|
||||
<style name="AppThemeNoActionBar" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="backgroundView">@color/backgroundDark</item>
|
||||
<item name="android:textColor">?attr/colorOnBackground</item>
|
||||
<item name="android:windowBackground">@android:color/black</item>
|
||||
<item name="android:colorBackground">@android:color/black</item>
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user