Some other changes

This commit is contained in:
tom79 2019-11-07 19:07:19 +01:00
parent d687d0682c
commit ac026bc869
14 changed files with 135 additions and 103 deletions

View File

@ -124,5 +124,6 @@ dependencies {
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0' implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
implementation 'com.github.smarteist:autoimageslider:1.3.2' implementation 'com.github.smarteist:autoimageslider:1.3.2'
//debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.0-beta-2' //debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.0-beta-2'
implementation 'com.jaredrummler:cyanea:1.0.2' implementation 'com.jaredrummler:colorpicker:1.1.0'
implementation 'com.afollestad:aesthetic:1.0.0-beta05'
} }

View File

@ -8,6 +8,8 @@ import android.content.res.Configuration;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import com.afollestad.aesthetic.Aesthetic;
import com.afollestad.aesthetic.AestheticActivity;
import com.google.android.material.snackbar.Snackbar; import com.google.android.material.snackbar.Snackbar;
import androidx.core.app.ActivityCompat; import androidx.core.app.ActivityCompat;
@ -19,13 +21,13 @@ import android.view.View;
import android.widget.Toast; import android.widget.Toast;
import com.franmontiel.localechanger.LocaleChanger; import com.franmontiel.localechanger.LocaleChanger;
import com.jaredrummler.cyanea.app.CyaneaAppCompatActivity;
import com.vanniktech.emoji.EmojiManager; import com.vanniktech.emoji.EmojiManager;
import com.vanniktech.emoji.one.EmojiOneProvider; import com.vanniktech.emoji.one.EmojiOneProvider;
import java.util.Timer; import java.util.Timer;
import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.Helper;
import app.fedilab.android.helper.ThemeHelper;
import es.dmoral.toasty.Toasty; import es.dmoral.toasty.Toasty;
/** /**
@ -34,7 +36,7 @@ import es.dmoral.toasty.Toasty;
*/ */
@SuppressLint("Registered") @SuppressLint("Registered")
public class BaseActivity extends CyaneaAppCompatActivity { public class BaseActivity extends AestheticActivity {
public static final int READ_WRITE_STORAGE = 52; public static final int READ_WRITE_STORAGE = 52;
@ -67,7 +69,6 @@ public class BaseActivity extends CyaneaAppCompatActivity {
.build()); .build());
}*/ }*/
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
} }
@Override @Override

View File

@ -116,6 +116,7 @@ import app.fedilab.android.fragments.WhoToFollowFragment;
import app.fedilab.android.helper.CrossActions; import app.fedilab.android.helper.CrossActions;
import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.Helper;
import app.fedilab.android.helper.MenuFloating; import app.fedilab.android.helper.MenuFloating;
import app.fedilab.android.helper.ThemeHelper;
import app.fedilab.android.services.BackupStatusService; import app.fedilab.android.services.BackupStatusService;
import app.fedilab.android.services.LiveNotificationDelayedService; import app.fedilab.android.services.LiveNotificationDelayedService;
import app.fedilab.android.services.LiveNotificationService; import app.fedilab.android.services.LiveNotificationService;
@ -284,19 +285,15 @@ public abstract class BaseMainActivity extends BaseActivity
return; return;
} }
final int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK); final int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
int themeSwitcher;
switch (theme) { switch (theme) {
case Helper.THEME_LIGHT: case Helper.THEME_LIGHT:
setTheme(R.style.AppTheme_NoActionBar_Fedilab); themeSwitcher = R.style.AppTheme_NoActionBar_Fedilab;
break;
case Helper.THEME_DARK:
setTheme(R.style.AppThemeDark_NoActionBar);
break;
case Helper.THEME_BLACK:
setTheme(R.style.AppThemeBlack_NoActionBar);
break; break;
default: default:
setTheme(R.style.AppThemeDark_NoActionBar); themeSwitcher = R.style.AppThemeDark_NoActionBar;
} }
ThemeHelper.changeTheme(BaseMainActivity.this, themeSwitcher);
setContentView(R.layout.activity_main); setContentView(R.layout.activity_main);
//Test if user is still log in //Test if user is still log in
@ -485,6 +482,10 @@ public abstract class BaseMainActivity extends BaseActivity
tootShow(); tootShow();
DrawerLayout drawer = findViewById(R.id.drawer_layout); DrawerLayout drawer = findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START); drawer.closeDrawer(GravityCompat.START);
if( tab.getIcon() != null) {
tab.getIcon().setColorFilter(R.attr.colorAccent, PorterDuff.Mode.SRC_IN);
}
} }
@Override @Override
@ -501,6 +502,9 @@ public abstract class BaseMainActivity extends BaseActivity
displayStatusFragment.scrollToTop(); displayStatusFragment.scrollToTop();
} }
} }
if( tab.getIcon() != null) {
tab.getIcon().setColorFilter(R.attr.colorAccent, PorterDuff.Mode.SRC_IN);
}
} }
}); });
@ -2095,6 +2099,9 @@ public abstract class BaseMainActivity extends BaseActivity
} }
DrawerLayout drawer = findViewById(R.id.drawer_layout); DrawerLayout drawer = findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START); drawer.closeDrawer(GravityCompat.START);
if( tab.getIcon() != null) {
tab.getIcon().setColorFilter(R.attr.colorAccent, PorterDuff.Mode.SRC_IN);
}
} }
@Override @Override
@ -2145,6 +2152,11 @@ public abstract class BaseMainActivity extends BaseActivity
displayStatusFragment.scrollToTop(); displayStatusFragment.scrollToTop();
} }
} }
DrawerLayout drawer = findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START);
if( tab.getIcon() != null) {
tab.getIcon().setColorFilter(R.attr.colorAccent, PorterDuff.Mode.SRC_IN);
}
} }
}); });

View File

@ -81,9 +81,9 @@ public class InstanceHealthActivity extends BaseActivity {
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE); SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK); int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
if (theme == Helper.THEME_LIGHT) { if (theme == Helper.THEME_LIGHT) {
setTheme(R.style.Cyanea_AlertDialog_Theme_Light); setTheme(R.style.Dialog);
} else { } else {
setTheme(R.style.Cyanea_AlertDialog_Theme_Dark); setTheme(R.style.DialogDark);
} }
setContentView(R.layout.activity_instance_social); setContentView(R.layout.activity_instance_social);
getWindow().setLayout(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); getWindow().setLayout(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);

View File

@ -52,9 +52,9 @@ public class LiveNotificationSettingsAccountsActivity extends BaseActivity {
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE); SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK); int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
if (theme == Helper.THEME_LIGHT) { if (theme == Helper.THEME_LIGHT) {
setTheme(R.style.Cyanea_AlertDialog_Theme_Light); setTheme(R.style.Dialog);
} else { } else {
setTheme(R.style.Cyanea_AlertDialog_Theme_Dark); setTheme(R.style.DialogDark);
} }
setContentView(R.layout.activity_livenotifications_all_accounts); setContentView(R.layout.activity_livenotifications_all_accounts);
getWindow().setLayout(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); getWindow().setLayout(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);

View File

@ -22,12 +22,9 @@ import android.os.StrictMode;
import androidx.multidex.MultiDex; import androidx.multidex.MultiDex;
import androidx.multidex.MultiDexApplication; import androidx.multidex.MultiDexApplication;
import androidx.core.content.ContextCompat;
import com.evernote.android.job.JobManager; import com.evernote.android.job.JobManager;
import com.franmontiel.localechanger.LocaleChanger; import com.franmontiel.localechanger.LocaleChanger;
import com.jaredrummler.cyanea.Cyanea;
import com.jaredrummler.cyanea.CyaneaApp;
import net.gotev.uploadservice.UploadService; import net.gotev.uploadservice.UploadService;
@ -84,13 +81,11 @@ public class MainApplication extends MultiDexApplication {
ApplicationJob.cancelAllJob(BackupNotificationsSyncJob.BACKUP_NOTIFICATIONS_SYNC); ApplicationJob.cancelAllJob(BackupNotificationsSyncJob.BACKUP_NOTIFICATIONS_SYNC);
BackupNotificationsSyncJob.schedule(false); BackupNotificationsSyncJob.schedule(false);
Cyanea.init(this, super.getResources());
StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder(); StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
StrictMode.setVmPolicy(builder.build()); StrictMode.setVmPolicy(builder.build());
try { try {
List<Locale> SUPPORTED_LOCALES = new ArrayList<>(); List<Locale> SUPPORTED_LOCALES = new ArrayList<>();

View File

@ -69,9 +69,9 @@ public class ManageAccountsInListActivity extends BaseActivity implements OnList
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE); SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK); int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
if (theme == Helper.THEME_LIGHT) { if (theme == Helper.THEME_LIGHT) {
setTheme(R.style.Cyanea_AlertDialog_Theme_Light); setTheme(R.style.Dialog);
} else { } else {
setTheme(R.style.Cyanea_AlertDialog_Theme_Dark); setTheme(R.style.DialogDark);
} }
setContentView(R.layout.activity_manage_accounts_list); setContentView(R.layout.activity_manage_accounts_list);
getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);

View File

@ -51,9 +51,9 @@ public class ProxyActivity extends BaseActivity {
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE); SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK); int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
if (theme == Helper.THEME_LIGHT) { if (theme == Helper.THEME_LIGHT) {
setTheme(R.style.Cyanea_AlertDialog_Theme_Light); setTheme(R.style.Dialog);
} else { } else {
setTheme(R.style.Cyanea_AlertDialog_Theme_Dark); setTheme(R.style.DialogDark);
} }
setContentView(R.layout.activity_proxy); setContentView(R.layout.activity_proxy);
getWindow().setLayout(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); getWindow().setLayout(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);

View File

@ -59,9 +59,9 @@ public class TagCacheActivity extends BaseActivity {
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE); SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK); int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
if (theme == Helper.THEME_LIGHT) { if (theme == Helper.THEME_LIGHT) {
setTheme(R.style.Cyanea_AlertDialog_Theme_Light); setTheme(R.style.Dialog);
} else { } else {
setTheme(R.style.Cyanea_AlertDialog_Theme_Dark); setTheme(R.style.DialogDark);
} }
getWindow().setLayout(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); getWindow().setLayout(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);

View File

@ -58,9 +58,9 @@ public class TootInfoActivity extends BaseActivity {
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE); SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK); int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
if (theme == Helper.THEME_LIGHT) { if (theme == Helper.THEME_LIGHT) {
setTheme(R.style.Cyanea_AlertDialog_Theme_Light); setTheme(R.style.Dialog);
} else { } else {
setTheme(R.style.Cyanea_AlertDialog_Theme_Dark); setTheme(R.style.DialogDark);
} }
setContentView(R.layout.activity_toot_info); setContentView(R.layout.activity_toot_info);
getWindow().setLayout(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT); getWindow().setLayout(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT);

View File

@ -141,6 +141,7 @@ import app.fedilab.android.helper.CrossActions;
import app.fedilab.android.helper.CustomTextView; import app.fedilab.android.helper.CustomTextView;
import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.Helper;
import app.fedilab.android.helper.MastalabAutoCompleteTextView; import app.fedilab.android.helper.MastalabAutoCompleteTextView;
import app.fedilab.android.helper.ThemeHelper;
import app.fedilab.android.interfaces.OnPostStatusActionInterface; import app.fedilab.android.interfaces.OnPostStatusActionInterface;
import app.fedilab.android.interfaces.OnRetrieveImageInterface; import app.fedilab.android.interfaces.OnRetrieveImageInterface;
import app.fedilab.android.interfaces.OnRetrieveRelationshipQuickReplyInterface; import app.fedilab.android.interfaces.OnRetrieveRelationshipQuickReplyInterface;
@ -1180,11 +1181,11 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
AlertDialog.Builder builderInner; AlertDialog.Builder builderInner;
int style; int style;
if (theme == Helper.THEME_DARK) { if (theme == Helper.THEME_DARK) {
style = R.style.Cyanea_AlertDialog_Theme_Dark; style = R.style.DialogDark;
} else if (theme == Helper.THEME_BLACK) { } else if (theme == Helper.THEME_BLACK) {
style = R.style.Cyanea_AlertDialog_Theme_Dark; style = R.style.DialogDark;
} else { } else {
style = R.style.Cyanea_AlertDialog_Theme_Light; style = R.style.Dialog;
} }
builderInner = new AlertDialog.Builder(context, style); builderInner = new AlertDialog.Builder(context, style);
builderInner.setTitle(R.string.comment); builderInner.setTitle(R.string.comment);
@ -2074,10 +2075,9 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
if( holder.status_boosted_by_info != null && reblogColor != -1 ){ if( holder.status_boosted_by_info != null && reblogColor != -1 ){
holder.status_boosted_by_info.setBackgroundColor(reblogColor); holder.status_boosted_by_info.setBackgroundColor(reblogColor);
} }
int statusColor = prefs.getInt("theme_statuses_color", -1); int statusColor = prefs.getInt("theme_statuses_color", ThemeHelper.getAttColor(context, R.attr.cardviewColor));
if( holder.main_card_container != null && statusColor != -1 ){ holder.main_card_container.setCardBackgroundColor(ThemeHelper.getAttColor(context, R.attr.cardviewColor));
holder.main_card_container.setCardBackgroundColor(statusColor);
}
if( holder.main_linear_container != null && statusColor != -1 ){ if( holder.main_linear_container != null && statusColor != -1 ){
holder.main_linear_container.setBackgroundColor(statusColor); holder.main_linear_container.setBackgroundColor(statusColor);
} }
@ -2528,11 +2528,11 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
int style; int style;
if (theme == Helper.THEME_DARK) { if (theme == Helper.THEME_DARK) {
style = R.style.Cyanea_AlertDialog_Theme_Dark; style = R.style.DialogDark;
} else if (theme == Helper.THEME_BLACK) { } else if (theme == Helper.THEME_BLACK) {
style = R.style.Cyanea_AlertDialog_Theme_Dark; style = R.style.DialogDark;
} else { } else {
style = R.style.Cyanea_AlertDialog_Theme_Light; style = R.style.Dialog;
} }
AlertDialog.Builder dialog = new AlertDialog.Builder(context, style); AlertDialog.Builder dialog = new AlertDialog.Builder(context, style);
dialog.setTitle(R.string.toot_visibility_tilte); dialog.setTitle(R.string.toot_visibility_tilte);
@ -2950,11 +2950,11 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
}); });
int style; int style;
if (theme == Helper.THEME_DARK) { if (theme == Helper.THEME_DARK) {
style = R.style.Cyanea_AlertDialog_Theme_Dark; style = R.style.DialogDark;
} else if (theme == Helper.THEME_BLACK) { } else if (theme == Helper.THEME_BLACK) {
style = R.style.Cyanea_AlertDialog_Theme_Dark; style = R.style.DialogDark;
} else { } else {
style = R.style.Cyanea_AlertDialog_Theme_Light; style = R.style.Dialog;
} }
holder.status_remove.setOnClickListener(new View.OnClickListener() { holder.status_remove.setOnClickListener(new View.OnClickListener() {
@Override @Override
@ -4012,11 +4012,11 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK); int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
int style; int style;
if (theme == Helper.THEME_DARK) { if (theme == Helper.THEME_DARK) {
style = R.style.Cyanea_AlertDialog_Theme_Dark; style = R.style.DialogDark;
} else if (theme == Helper.THEME_BLACK) { } else if (theme == Helper.THEME_BLACK) {
style = R.style.Cyanea_AlertDialog_Theme_Dark; style = R.style.DialogDark;
} else { } else {
style = R.style.Cyanea_AlertDialog_Theme_Light; style = R.style.Dialog;
} }
AlertDialog.Builder dialogBuilderBoost = new AlertDialog.Builder(context, style); AlertDialog.Builder dialogBuilderBoost = new AlertDialog.Builder(context, style);
@ -4173,11 +4173,11 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
stepSpliToot = 1; stepSpliToot = 1;
int style; int style;
if (theme == Helper.THEME_DARK) { if (theme == Helper.THEME_DARK) {
style = R.style.Cyanea_AlertDialog_Theme_Dark; style = R.style.DialogDark;
} else if (theme == Helper.THEME_BLACK) { } else if (theme == Helper.THEME_BLACK) {
style = R.style.Cyanea_AlertDialog_Theme_Dark; style = R.style.DialogDark;
} else { } else {
style = R.style.Cyanea_AlertDialog_Theme_Light; style = R.style.Dialog;
} }
AlertDialog.Builder builderInner = new AlertDialog.Builder(context, style); AlertDialog.Builder builderInner = new AlertDialog.Builder(context, style);
builderInner.setTitle(R.string.message_preview); builderInner.setTitle(R.string.message_preview);

View File

@ -1,25 +1,46 @@
package app.fedilab.android.helper; package app.fedilab.android.helper;
import android.app.Activity; import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.util.TypedValue;
import com.afollestad.aesthetic.Aesthetic;
import com.jaredrummler.cyanea.Cyanea;
import app.fedilab.android.R; import app.fedilab.android.R;
import static android.content.Context.MODE_PRIVATE;
public class ThemeHelper { public class ThemeHelper {
public static void changeTheme(Activity activity){ public static void changeTheme(Context context, int theme){
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
Cyanea.Editor editor = Cyanea.getInstance().edit(); Aesthetic.get()
editor.accent(R.color.colorAccent); .activityTheme(theme)
editor.background(R.color.black); .attribute(R.attr.cardviewColor,null, R.color.mastodonC1, true)
editor.backgroundDarkResource(R.color.black); .colorAccent(null, R.color.mastodonC4)
editor.apply(); .colorPrimary(null,R.color.mastodonC1)
.colorPrimaryDark(null,R.color.mastodonC1)
.colorNavigationBar(null,R.color.mastodonC1)
.colorStatusBar(null,R.color.mastodonC1)
.toolbarIconColor(null,R.color.white)
.colorWindowBackground(null,R.color.mastodonC1)
if( activity != null){
activity.recreate();
} .apply();
}
public static int getAttColor(Context context, int attColor){
TypedValue typedValue = new TypedValue();
Resources.Theme theme = context.getTheme();
theme.resolveAttribute(attColor, typedValue, true);
return typedValue.data;
} }
} }

View File

@ -55,7 +55,6 @@
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:visibility="gone" android:visibility="gone"
android:layout_width="0dp" android:layout_width="0dp"
@ -87,7 +86,6 @@
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<ImageView <ImageView
android:layout_marginLeft="5dp"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:visibility="gone" android:visibility="gone"
android:id="@+id/display_timeline" android:id="@+id/display_timeline"

View File

@ -1,67 +1,71 @@
<resources xmlns:tools="http://schemas.android.com/tools"> <resources xmlns:tools="http://schemas.android.com/tools">
<attr name="cardviewColor" type="color"/>
<!-- Light theme --> <!-- Light theme -->
<style name="AppTheme" parent="Theme.Cyanea.Dark.LightActionBar"> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="cardviewColor">@color/white</item>
</style> </style>
<style name="AppTheme_NoActionBar_Fedilab" parent="Theme.Cyanea.Light.NoActionBar"> <style name="AppTheme_NoActionBar_Fedilab" parent="Theme.AppCompat.Light.NoActionBar">
<item name="cardviewColor">@color/white</item>
</style> </style>
<style name="Dialog" parent="Cyanea.AlertDialog.Theme.Light">
</style>
<style name="DialogDark" parent="Cyanea.AlertDialog.Theme.Dark">
</style>
<style name="DialogBlack" parent="Cyanea.AlertDialog.Theme.Dark">
</style>
<style name="TransparentLight" parent="Theme.Cyanea.Light">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
</style>
<style name="TransparentDark" parent="Theme.Cyanea.Dark">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
</style>
<style name="TransparentBlack" parent="Theme.Cyanea.Dark">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
</style>
<!-- BLACK theme --> <!-- BLACK theme -->
<style name="AppThemeBlack" parent="Theme.Cyanea.Dark"> <style name="AppThemeBlack" parent="Theme.AppCompat">
<item name="cardviewColor">@color/black</item>
</style> </style>
<style name="AppThemeBlack_NoActionBar" parent="Theme.Cyanea.Dark.NoActionBar"> <style name="AppThemeBlack_NoActionBar" parent="Theme.AppCompat.NoActionBar">
<item name="cardviewColor">@color/black</item>
</style> </style>
<!-- Dark theme --> <!-- Dark theme -->
<style name="AppThemeDark" parent="Theme.Cyanea.Dark"> <style name="AppThemeDark" parent="Theme.AppCompat">
<item name="cardviewColor">@color/mastodonC1</item>
</style> </style>
<style name="AppThemeDark_NoActionBar" parent="Theme.Cyanea.Dark.NoActionBar"> <style name="AppThemeDark_NoActionBar" parent="Theme.AppCompat.NoActionBar">
<item name="cardviewColor">@color/mastodonC1</item>
</style> </style>
<style name="Dialog" parent="Theme.AppCompat.Light.Dialog.Alert">
</style>
<style name="DialogDark" parent="Theme.AppCompat.Dialog.Alert">
</style>
<style name="DialogBlack" parent="Theme.AppCompat.Dialog.Alert">
</style>
<style name="TransparentLight" parent="Theme.AppCompat.Light">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
</style>
<style name="TransparentDark" parent="Theme.AppCompat">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
</style>
<style name="TransparentBlack" parent="Theme.AppCompat">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
</style>
<!-- Light theme --> <!-- Light theme -->
<style name="AppAdminTheme" parent="Theme.Cyanea.Dark"> <style name="AppAdminTheme" parent="Theme.AppCompat">
</style> </style>