[Ture Black] True Black Theme for AMOLED
Add true black themese Modified code that fails to support three themes
This commit is contained in:
parent
6dbe772345
commit
05f923ebe2
|
@ -7,6 +7,7 @@ import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.database.DataSetObserver;
|
import android.database.DataSetObserver;
|
||||||
|
import android.graphics.Color;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
|
|
|
@ -22,6 +22,8 @@ import android.widget.TextView;
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
import com.joanzapata.iconify.Iconify;
|
import com.joanzapata.iconify.Iconify;
|
||||||
|
|
||||||
|
import org.shredzone.flattr4j.model.User;
|
||||||
|
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
|
|
||||||
import de.danoeh.antennapod.R;
|
import de.danoeh.antennapod.R;
|
||||||
|
@ -69,6 +71,8 @@ public class AllEpisodesRecycleAdapter extends RecyclerView.Adapter<AllEpisodesR
|
||||||
|
|
||||||
if(UserPreferences.getTheme() == R.style.Theme_AntennaPod_Dark) {
|
if(UserPreferences.getTheme() == R.style.Theme_AntennaPod_Dark) {
|
||||||
playingBackGroundColor = ContextCompat.getColor(mainActivity, R.color.highlight_dark);
|
playingBackGroundColor = ContextCompat.getColor(mainActivity, R.color.highlight_dark);
|
||||||
|
} else if(UserPreferences.getTheme() == R.style.Theme_AntennaPod_TrueBlack){
|
||||||
|
playingBackGroundColor = ContextCompat.getColor(mainActivity, R.color.highlight_trueblack);
|
||||||
} else {
|
} else {
|
||||||
playingBackGroundColor = ContextCompat.getColor(mainActivity, R.color.highlight_light);
|
playingBackGroundColor = ContextCompat.getColor(mainActivity, R.color.highlight_light);
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,8 +143,15 @@ public class ChaptersListAdapter extends ArrayAdapter<Chapter> {
|
||||||
|
|
||||||
Chapter current = ChapterUtils.getCurrentChapter(media);
|
Chapter current = ChapterUtils.getCurrentChapter(media);
|
||||||
if (current == sc) {
|
if (current == sc) {
|
||||||
boolean darkTheme = UserPreferences.getTheme() == R.style.Theme_AntennaPod_Dark;
|
int theme = UserPreferences.getTheme();
|
||||||
int highlight = darkTheme ? R.color.highlight_dark : R.color.highlight_light;
|
int highlight = R.color.highlight_light;
|
||||||
|
if (theme == R.style.Theme_AntennaPod_Dark) {
|
||||||
|
highlight = R.color.highlight_dark;
|
||||||
|
}else if (theme == R.style.Theme_AntennaPod_TrueBlack){
|
||||||
|
highlight = R.color.highlight_trueblack;
|
||||||
|
} else if (theme == R.style.Theme_AntennaPod_Light) {
|
||||||
|
highlight = R.color.highlight_light;
|
||||||
|
}
|
||||||
int playingBackGroundColor = ContextCompat.getColor(getContext(), highlight);
|
int playingBackGroundColor = ContextCompat.getColor(getContext(), highlight);
|
||||||
holder.view.setBackgroundColor(playingBackGroundColor);
|
holder.view.setBackgroundColor(playingBackGroundColor);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -62,6 +62,8 @@ public class FeedItemlistAdapter extends BaseAdapter {
|
||||||
|
|
||||||
if(UserPreferences.getTheme() == R.style.Theme_AntennaPod_Dark) {
|
if(UserPreferences.getTheme() == R.style.Theme_AntennaPod_Dark) {
|
||||||
playingBackGroundColor = ContextCompat.getColor(context, R.color.highlight_dark);
|
playingBackGroundColor = ContextCompat.getColor(context, R.color.highlight_dark);
|
||||||
|
} else if(UserPreferences.getTheme() == R.style.Theme_AntennaPod_TrueBlack) {
|
||||||
|
playingBackGroundColor = ContextCompat.getColor(context, R.color.highlight_trueblack);
|
||||||
} else {
|
} else {
|
||||||
playingBackGroundColor = ContextCompat.getColor(context, R.color.highlight_light);
|
playingBackGroundColor = ContextCompat.getColor(context, R.color.highlight_light);
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,6 +77,8 @@ public class QueueRecyclerAdapter extends RecyclerView.Adapter<QueueRecyclerAdap
|
||||||
|
|
||||||
if(UserPreferences.getTheme() == R.style.Theme_AntennaPod_Dark) {
|
if(UserPreferences.getTheme() == R.style.Theme_AntennaPod_Dark) {
|
||||||
playingBackGroundColor = ContextCompat.getColor(mainActivity, R.color.highlight_dark);
|
playingBackGroundColor = ContextCompat.getColor(mainActivity, R.color.highlight_dark);
|
||||||
|
} else if(UserPreferences.getTheme() == R.style.Theme_AntennaPod_TrueBlack) {
|
||||||
|
playingBackGroundColor = ContextCompat.getColor(mainActivity, R.color.highlight_trueblack);
|
||||||
} else {
|
} else {
|
||||||
playingBackGroundColor = ContextCompat.getColor(mainActivity, R.color.highlight_light);
|
playingBackGroundColor = ContextCompat.getColor(mainActivity, R.color.highlight_light);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,8 @@ public class MenuItemUtils extends de.danoeh.antennapod.core.menuhandler.MenuIte
|
||||||
public static void adjustTextColor(Context context, SearchView sv) {
|
public static void adjustTextColor(Context context, SearchView sv) {
|
||||||
if(Build.VERSION.SDK_INT < 14) {
|
if(Build.VERSION.SDK_INT < 14) {
|
||||||
EditText searchEditText = (EditText) sv.findViewById(R.id.search_src_text);
|
EditText searchEditText = (EditText) sv.findViewById(R.id.search_src_text);
|
||||||
if(UserPreferences.getTheme() == de.danoeh.antennapod.R.style.Theme_AntennaPod_Dark) {
|
if(UserPreferences.getTheme() == de.danoeh.antennapod.R.style.Theme_AntennaPod_Dark
|
||||||
|
|| UserPreferences.getTheme() == R.style.Theme_AntennaPod_TrueBlack) {
|
||||||
searchEditText.setTextColor(Color.WHITE);
|
searchEditText.setTextColor(Color.WHITE);
|
||||||
} else {
|
} else {
|
||||||
searchEditText.setTextColor(Color.BLACK);
|
searchEditText.setTextColor(Color.BLACK);
|
||||||
|
|
|
@ -167,6 +167,8 @@ public class UserPreferences {
|
||||||
int theme = getTheme();
|
int theme = getTheme();
|
||||||
if (theme == R.style.Theme_AntennaPod_Dark) {
|
if (theme == R.style.Theme_AntennaPod_Dark) {
|
||||||
return R.style.Theme_AntennaPod_Dark_NoTitle;
|
return R.style.Theme_AntennaPod_Dark_NoTitle;
|
||||||
|
}else if (theme == R.style.Theme_AntennaPod_TrueBlack){
|
||||||
|
return R.style.Theme_AntennaPod_TrueBlack_NoTitle;
|
||||||
} else {
|
} else {
|
||||||
return R.style.Theme_AntennaPod_Light_NoTitle;
|
return R.style.Theme_AntennaPod_Light_NoTitle;
|
||||||
}
|
}
|
||||||
|
@ -603,6 +605,8 @@ public class UserPreferences {
|
||||||
return R.style.Theme_AntennaPod_Light;
|
return R.style.Theme_AntennaPod_Light;
|
||||||
case 1:
|
case 1:
|
||||||
return R.style.Theme_AntennaPod_Dark;
|
return R.style.Theme_AntennaPod_Dark;
|
||||||
|
case 2:
|
||||||
|
return R.style.Theme_AntennaPod_TrueBlack;
|
||||||
default:
|
default:
|
||||||
return R.style.Theme_AntennaPod_Light;
|
return R.style.Theme_AntennaPod_Light;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,8 @@ public class ThemeUtils {
|
||||||
int theme = UserPreferences.getTheme();
|
int theme = UserPreferences.getTheme();
|
||||||
if (theme == R.style.Theme_AntennaPod_Dark) {
|
if (theme == R.style.Theme_AntennaPod_Dark) {
|
||||||
return R.color.selection_background_color_dark;
|
return R.color.selection_background_color_dark;
|
||||||
|
}else if (theme == R.style.Theme_AntennaPod_TrueBlack){
|
||||||
|
return R.color.selection_background_color_trueblack;
|
||||||
} else if (theme == R.style.Theme_AntennaPod_Light) {
|
} else if (theme == R.style.Theme_AntennaPod_Light) {
|
||||||
return R.color.selection_background_color_light;
|
return R.color.selection_background_color_light;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<color name="selection_background_color_dark">#484B4D</color>
|
<color name="selection_background_color_dark">#484B4D</color>
|
||||||
|
<color name="selection_background_color_trueblack">#000000</color>
|
||||||
<color name="selection_background_color_light">#E3E3E3</color>
|
<color name="selection_background_color_light">#E3E3E3</color>
|
||||||
</resources>
|
</resources>
|
|
@ -6,6 +6,19 @@
|
||||||
<style name="Theme.AntennaPod.Dark" parent="Theme.Base.AntennaPod.Dark">
|
<style name="Theme.AntennaPod.Dark" parent="Theme.Base.AntennaPod.Dark">
|
||||||
<item name="android:windowContentTransitions">true</item>
|
<item name="android:windowContentTransitions">true</item>
|
||||||
</style>
|
</style>
|
||||||
|
<style name="Theme.AntennaPod.TrueBlack" parent="Theme.Base.AntennaPod.TrueBlack">
|
||||||
|
<item name="android:windowContentTransitions">true</item>
|
||||||
|
<item name="android:navigationBarColor">@color/black</item>
|
||||||
|
<item name="android:colorAccent">@color/white</item>
|
||||||
|
<item name="android:colorPrimary">@color/black</item>
|
||||||
|
<item name="android:colorPrimaryDark">@color/black</item>
|
||||||
|
</style>
|
||||||
|
<style name="Theme.AntennaPod.TrueBlack.NoTitle" parent="Theme.Base.AntennaPod.TrueBlack.NoTitle">
|
||||||
|
<item name="android:navigationBarColor">@color/black</item>
|
||||||
|
<item name="android:colorAccent">@color/white</item>
|
||||||
|
<item name="android:colorPrimary">@color/black</item>
|
||||||
|
<item name="android:colorPrimaryDark">@color/black</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="Widget.AntennaPod.Button" parent="Widget.AppCompat.Button">
|
<style name="Widget.AntennaPod.Button" parent="Widget.AppCompat.Button">
|
||||||
<item name="textAllCaps">true</item>
|
<item name="textAllCaps">true</item>
|
||||||
|
|
|
@ -137,10 +137,12 @@
|
||||||
<string-array name="theme_options">
|
<string-array name="theme_options">
|
||||||
<item>@string/pref_theme_title_light</item>
|
<item>@string/pref_theme_title_light</item>
|
||||||
<item>@string/pref_theme_title_dark</item>
|
<item>@string/pref_theme_title_dark</item>
|
||||||
|
<item>@string/pref_theme_title_trueblack</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
<string-array name="theme_values">
|
<string-array name="theme_values">
|
||||||
<item>0</item>
|
<item>0</item>
|
||||||
<item>1</item>
|
<item>1</item>
|
||||||
|
<item>2</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="nav_drawer_titles">
|
<string-array name="nav_drawer_titles">
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
|
|
||||||
<color name="highlight_light">#DDDDDD</color>
|
<color name="highlight_light">#DDDDDD</color>
|
||||||
<color name="highlight_dark">#414141</color>
|
<color name="highlight_dark">#414141</color>
|
||||||
|
<color name="highlight_trueblack">#000000</color>
|
||||||
|
|
||||||
<color name="antennapod_blue">#147BAF</color>
|
<color name="antennapod_blue">#147BAF</color>
|
||||||
|
|
||||||
|
|
|
@ -374,6 +374,7 @@
|
||||||
<string name="pref_episode_cache_title">Episode Cache</string>
|
<string name="pref_episode_cache_title">Episode Cache</string>
|
||||||
<string name="pref_theme_title_light">Light</string>
|
<string name="pref_theme_title_light">Light</string>
|
||||||
<string name="pref_theme_title_dark">Dark</string>
|
<string name="pref_theme_title_dark">Dark</string>
|
||||||
|
<string name="pref_theme_title_trueblack">True Black</string>
|
||||||
<string name="pref_episode_cache_unlimited">Unlimited</string>
|
<string name="pref_episode_cache_unlimited">Unlimited</string>
|
||||||
<string name="pref_update_interval_hours_plural">hours</string>
|
<string name="pref_update_interval_hours_plural">hours</string>
|
||||||
<string name="pref_update_interval_hours_singular">hour</string>
|
<string name="pref_update_interval_hours_singular">hour</string>
|
||||||
|
|
|
@ -127,6 +127,26 @@
|
||||||
<item name="attr/ic_cast_disconnect">@drawable/ic_cast_disconnect_white_36dp</item>
|
<item name="attr/ic_cast_disconnect">@drawable/ic_cast_disconnect_white_36dp</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.AntennaPod.TrueBlack" parent="Theme.Base.AntennaPod.TrueBlack">
|
||||||
|
<!-- Room for API dependent attributes -->
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.Base.AntennaPod.TrueBlack" parent="Theme.Base.AntennaPod.Dark">
|
||||||
|
<item name="attr/non_transparent_background">@color/black</item>
|
||||||
|
<item name="attr/overlay_background">@color/overlay_dark</item>
|
||||||
|
<item name="attr/overlay_drawable">@drawable/overlay_drawable_dark</item>
|
||||||
|
<item name="attr/dragview_background">@drawable/ic_drag_vertical_white_48dp</item>
|
||||||
|
<item name="attr/dragview_float_background">@color/black</item>
|
||||||
|
<item name="attr/nav_drawer_background">@color/black</item>
|
||||||
|
<item name="android:textColorPrimary">@color/white</item>
|
||||||
|
<item name="android:color">@color/white</item>
|
||||||
|
<item name="android:windowBackground">@color/black</item>
|
||||||
|
<item name="android:actionBarStyle">@color/black</item>
|
||||||
|
<item name="colorPrimary">@color/black</item>
|
||||||
|
<item name="colorPrimaryDark">@color/black</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
<style name="Theme.AntennaPod.Light.NoTitle" parent="Theme.Base.AntennaPod.Light.NoTitle">
|
<style name="Theme.AntennaPod.Light.NoTitle" parent="Theme.Base.AntennaPod.Light.NoTitle">
|
||||||
<!-- Room for API dependent attributes -->
|
<!-- Room for API dependent attributes -->
|
||||||
</style>
|
</style>
|
||||||
|
@ -255,6 +275,26 @@
|
||||||
<item name="attr/ic_cast_disconnect">@drawable/ic_cast_disconnect_white_36dp</item>
|
<item name="attr/ic_cast_disconnect">@drawable/ic_cast_disconnect_white_36dp</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.AntennaPod.TrueBlack.NoTitle" parent="Theme.Base.AntennaPod.TrueBlack.NoTitle">
|
||||||
|
<!-- Room for API dependent attributes -->
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.Base.AntennaPod.TrueBlack.NoTitle" parent="Theme.Base.AntennaPod.Dark.NoTitle">
|
||||||
|
<item name="attr/non_transparent_background">@color/black</item>
|
||||||
|
<item name="attr/overlay_background">@color/black</item>
|
||||||
|
<item name="attr/overlay_drawable">@drawable/overlay_drawable_dark</item>
|
||||||
|
<item name="attr/dragview_background">@drawable/ic_drag_vertical_white_48dp</item>
|
||||||
|
<item name="attr/dragview_float_background">@color/black</item>
|
||||||
|
<item name="attr/nav_drawer_background">@color/black</item>
|
||||||
|
<item name="android:textColorPrimary">@color/white</item>
|
||||||
|
<item name="android:color">@color/white</item>
|
||||||
|
<item name="android:windowBackground">@color/black</item>
|
||||||
|
<item name="android:actionBarStyle">@color/black</item>
|
||||||
|
<item name="colorPrimary">@color/black</item>
|
||||||
|
<item name="colorPrimaryDark">@color/black</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
<style name="Theme.AntennaPod.Dark.Splash" parent="Theme.AppCompat.NoActionBar">
|
<style name="Theme.AntennaPod.Dark.Splash" parent="Theme.AppCompat.NoActionBar">
|
||||||
<item name="android:windowBackground">@drawable/bg_splash</item>
|
<item name="android:windowBackground">@drawable/bg_splash</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue