Fixes with colors
This commit is contained in:
parent
c92543e0ae
commit
0609721c96
|
@ -429,6 +429,15 @@ public abstract class BaseMainActivity extends BaseActivity
|
|||
pTabLocal.setCustomView(R.layout.tab_badge);
|
||||
|
||||
|
||||
|
||||
|
||||
Helper.changeDrawableColor(getApplicationContext(),R.drawable.ic_subscriptions, R.attr.iconColorMenu);
|
||||
Helper.changeDrawableColor(getApplicationContext(),R.drawable.ic_overview, R.attr.iconColorMenu);
|
||||
Helper.changeDrawableColor(getApplicationContext(),R.drawable.ic_trending_up, R.attr.iconColorMenu);
|
||||
Helper.changeDrawableColor(getApplicationContext(),R.drawable.ic_recently_added, R.attr.iconColorMenu);
|
||||
Helper.changeDrawableColor(getApplicationContext(),R.drawable.ic_home, R.attr.iconColorMenu);
|
||||
|
||||
|
||||
@SuppressWarnings("ConstantConditions") @SuppressLint("CutPasteId")
|
||||
ImageView iconSub = pTabsub.getCustomView().findViewById(R.id.tab_icon);
|
||||
|
||||
|
@ -520,6 +529,10 @@ public abstract class BaseMainActivity extends BaseActivity
|
|||
//TabLayout.Tab pfTabDiscover = tabLayout.newTab();
|
||||
|
||||
|
||||
Helper.changeDrawableColor(getApplicationContext(),R.drawable.ic_notifications, R.attr.iconColorMenu);
|
||||
Helper.changeDrawableColor(getApplicationContext(),R.drawable.ic_people, R.attr.iconColorMenu);
|
||||
Helper.changeDrawableColor(getApplicationContext(),R.drawable.ic_home, R.attr.iconColorMenu);
|
||||
|
||||
pfTabHome.setCustomView(R.layout.tab_badge);
|
||||
pfTabLocal.setCustomView(R.layout.tab_badge);
|
||||
pfTabNotification.setCustomView(R.layout.tab_badge);
|
||||
|
|
|
@ -181,9 +181,6 @@ public class LoginActivity extends BaseActivity {
|
|||
case Helper.THEME_LIGHT:
|
||||
setTheme(R.style.AppTheme_Fedilab);
|
||||
break;
|
||||
case Helper.THEME_DARK:
|
||||
setTheme(R.style.AppThemeDark);
|
||||
break;
|
||||
case Helper.THEME_BLACK:
|
||||
setTheme(R.style.AppThemeBlack);
|
||||
break;
|
||||
|
@ -196,7 +193,7 @@ public class LoginActivity extends BaseActivity {
|
|||
if (actionBar != null) {
|
||||
LayoutInflater inflater = (LayoutInflater) this.getSystemService(LAYOUT_INFLATER_SERVICE);
|
||||
assert inflater != null;
|
||||
View view = inflater.inflate(R.layout.simple_bar, new LinearLayout(getApplicationContext()), false);
|
||||
View view = inflater.inflate(R.layout.simple_bar, new LinearLayout(LoginActivity.this), false);
|
||||
view.setBackground(new ColorDrawable(ContextCompat.getColor(LoginActivity.this, R.color.cyanea_primary)));
|
||||
actionBar.setCustomView(view, new ActionBar.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
|
||||
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
|
||||
|
@ -746,7 +743,7 @@ public class LoginActivity extends BaseActivity {
|
|||
menu.findItem(R.id.action_custom_tabs).setChecked(!embedded_browser);
|
||||
boolean security_provider = sharedpreferences.getBoolean(Helper.SET_SECURITY_PROVIDER, true);
|
||||
menu.findItem(R.id.action_provider).setChecked(security_provider);
|
||||
return super.onCreateOptionsMenu(menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -729,7 +729,7 @@ public class TootActivity extends BaseActivity implements UploadStatusDelegate,
|
|||
|
||||
|
||||
autocomplete = false;
|
||||
|
||||
setContentView(R.layout.activity_toot);
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
LayoutInflater inflater = (LayoutInflater) this.getSystemService(LAYOUT_INFLATER_SERVICE);
|
||||
|
@ -792,7 +792,7 @@ public class TootActivity extends BaseActivity implements UploadStatusDelegate,
|
|||
pp_progress = actionBar.getCustomView().findViewById(R.id.pp_progress);
|
||||
|
||||
}
|
||||
setContentView(R.layout.activity_toot);
|
||||
|
||||
|
||||
//By default the toot is not restored so the id -1 is defined
|
||||
currentToId = -1;
|
||||
|
|
|
@ -270,7 +270,6 @@ public class ManageTimelines {
|
|||
public TabLayout createTabs(Context context, TabLayout tabLayout, java.util.List<ManageTimelines> manageTimelines) {
|
||||
|
||||
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
|
||||
tabLayout.removeAllTabs();
|
||||
int position = 0;
|
||||
for (ManageTimelines tl : manageTimelines) {
|
||||
|
@ -281,6 +280,14 @@ public class ManageTimelines {
|
|||
if (tb.getCustomView() != null)
|
||||
icon = tb.getCustomView().findViewById(R.id.tab_icon);
|
||||
}
|
||||
|
||||
Helper.changeDrawableColor(context,R.drawable.ic_home, R.attr.iconColorMenu);
|
||||
Helper.changeDrawableColor(context,R.drawable.ic_notifications, R.attr.iconColorMenu);
|
||||
Helper.changeDrawableColor(context,R.drawable.ic_direct_messages, R.attr.iconColorMenu);
|
||||
Helper.changeDrawableColor(context,R.drawable.ic_people, R.attr.iconColorMenu);
|
||||
Helper.changeDrawableColor(context,R.drawable.ic_public, R.attr.iconColorMenu);
|
||||
Helper.changeDrawableColor(context,R.drawable.ic_color_lens, R.attr.iconColorMenu);
|
||||
Helper.changeDrawableColor(context,R.drawable.ic_video_peertube, R.attr.iconColorMenu);
|
||||
if (icon != null) {
|
||||
switch (tl.getType()) {
|
||||
case HOME:
|
||||
|
|
|
@ -13,6 +13,7 @@ import android.graphics.BitmapFactory;
|
|||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
|
@ -267,7 +268,9 @@ public class ColorSettingsFragment extends PreferenceFragmentCompat implements S
|
|||
Preference pref_import = findPreference("pref_import");
|
||||
Preference pref_export = findPreference("pref_export");
|
||||
Preference reset_pref = findPreference("reset_pref");
|
||||
if (!sharedpreferences.getBoolean("use_custom_theme", false)) {
|
||||
Log.v(Helper.TAG,"preferenceScreen! " + preferenceScreen);
|
||||
Log.v(Helper.TAG,"theme_link_color! " + theme_link_color);
|
||||
if (!sharedpreferences.getBoolean("use_custom_theme", false) ) {
|
||||
preferenceScreen.removePreference(theme_link_color);
|
||||
preferenceScreen.removePreference(theme_boost_header_color);
|
||||
preferenceScreen.removePreference(theme_text_header_1_line);
|
||||
|
@ -380,7 +383,7 @@ public class ColorSettingsFragment extends PreferenceFragmentCompat implements S
|
|||
editor.remove("theme_accent");
|
||||
editor.remove("theme_text_color");
|
||||
editor.remove("theme_primary");
|
||||
editor.remove("use_custom_theme");
|
||||
//editor.remove("use_custom_theme");
|
||||
editor.commit();
|
||||
}
|
||||
|
||||
|
|
|
@ -161,7 +161,7 @@
|
|||
android:layout_gravity="start"
|
||||
android:fitsSystemWindows="false"
|
||||
app:itemTextColor="?attr/textColor"
|
||||
android:background="?colorPrimaryDark"
|
||||
|
||||
app:headerLayout="@layout/nav_header_main"
|
||||
app:menu="@menu/activity_main_drawer" />
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/tab_icon"
|
||||
android:layout_alignEnd="@+id/tab_icon"
|
||||
android:layout_alignRight="@+id/tab_icon"
|
||||
android:background="@drawable/shape_counter"
|
||||
android:paddingLeft="2dp"
|
||||
android:paddingRight="2dp"
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
android:contentInsetStart="0dp"
|
||||
android:contentInsetLeft="0dp"
|
||||
android:contentInsetEnd="0dp"
|
||||
android:background="?colorPrimary"
|
||||
android:contentInsetRight="0dp"
|
||||
app:contentInsetEnd="0dp"
|
||||
app:contentInsetLeft="0dp"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<item name="android:textColor">@color/black</item>
|
||||
<item name="linkColor">@color/light_link_toot</item>
|
||||
<item name="android:popupMenuStyle">@style/Fedilab.PopupMenu.Light</item>
|
||||
|
||||
<item name="android:itemBackground">@drawable/menu_selector</item>
|
||||
</style>
|
||||
|
||||
|
||||
|
@ -37,6 +37,7 @@
|
|||
<item name="android:textColor">@color/black</item>
|
||||
<item name="linkColor">@color/light_link_toot</item>
|
||||
<item name="android:popupMenuStyle">@style/Fedilab.PopupMenu.Light</item>
|
||||
<item name="android:itemBackground">@drawable/menu_selector</item>
|
||||
</style>
|
||||
<!-- BLACK theme -->
|
||||
<style name="AppThemeBlack" parent="Theme.Cyanea.Dark">
|
||||
|
@ -50,6 +51,7 @@
|
|||
<item name="android:textColor">@color/dark_text</item>
|
||||
<item name="linkColor">@color/black_link_toot</item>
|
||||
<item name="android:popupMenuStyle">@style/Fedilab.PopupMenu.Dark</item>
|
||||
<item name="android:itemBackground">@drawable/menu_selector</item>
|
||||
</style>
|
||||
|
||||
<style name="AppThemeBlack_NoActionBar" parent="Theme.Cyanea.Dark.NoActionBar">
|
||||
|
@ -63,6 +65,7 @@
|
|||
<item name="android:textColor">@color/dark_text</item>
|
||||
<item name="linkColor">@color/black_link_toot</item>
|
||||
<item name="android:popupMenuStyle">@style/Fedilab.PopupMenu.Dark</item>
|
||||
<item name="android:itemBackground">@drawable/menu_selector</item>
|
||||
</style>
|
||||
|
||||
|
||||
|
@ -135,6 +138,7 @@
|
|||
<item name="textColor">@color/black</item>
|
||||
<item name="android:textColor">@color/black</item>
|
||||
<item name="linkColor">@color/light_link_toot</item>
|
||||
<item name="android:itemBackground">@drawable/menu_selector</item>
|
||||
</style>
|
||||
|
||||
<style name="TransparentDark" parent="Theme.Cyanea.Dark">
|
||||
|
@ -156,17 +160,20 @@
|
|||
<item name="android:windowContentOverlay">@null</item>
|
||||
<item name="android:textColor">@color/dark_text</item>
|
||||
<item name="linkColor">@color/black_link_toot</item>
|
||||
<item name="android:itemBackground">@drawable/menu_selector</item>
|
||||
</style>
|
||||
|
||||
<style name="Fedilab.PopupMenu.Light" parent="Cyanea.PopupMenu.Light">
|
||||
<item name="android:colorBackground">@color/cyanea_primary_reference</item>
|
||||
<item name="android:popupBackground">@color/cyanea_primary_reference</item>
|
||||
</style>
|
||||
<style name="Fedilab.PopupMenu.Dark" parent="Cyanea.PopupMenu.Dark">
|
||||
<item name="android:colorBackground">@color/cyanea_primary_reference</item>
|
||||
<item name="android:popupBackground">@color/cyanea_primary_reference</item>
|
||||
</style>
|
||||
|
||||
<!-- Light theme -->
|
||||
<style name="AppAdminTheme" parent="Theme.Cyanea.Dark">
|
||||
<style name="AppAdminTheme" parent="AppThemeDark">
|
||||
|
||||
</style>
|
||||
|
||||
|
|
Loading…
Reference in New Issue