filtering
Floens 10 years ago
parent 93d30e2b0a
commit cf50fdfe6a
  1. 2
      Clover/app/src/main/java/org/floens/chan/chan/ChanParser.java
  2. 2
      Clover/app/src/main/java/org/floens/chan/core/model/PostLinkable.java
  3. 10
      Clover/app/src/main/java/org/floens/chan/test/TestActivity.java
  4. 13
      Clover/app/src/main/java/org/floens/chan/ui/activity/StartActivity.java
  5. 2
      Clover/app/src/main/java/org/floens/chan/ui/cell/PostCell.java
  6. 7
      Clover/app/src/main/java/org/floens/chan/ui/controller/DeveloperSettingsController.java
  7. 2
      Clover/app/src/main/java/org/floens/chan/ui/controller/ImageViewerController.java
  8. 6
      Clover/app/src/main/java/org/floens/chan/ui/controller/MainSettingsController.java
  9. 2
      Clover/app/src/main/java/org/floens/chan/ui/controller/PostRepliesController.java
  10. 3
      Clover/app/src/main/java/org/floens/chan/ui/controller/RootNavigationController.java
  11. 4
      Clover/app/src/main/java/org/floens/chan/ui/controller/ViewThreadController.java
  12. 2
      Clover/app/src/main/java/org/floens/chan/ui/fragment/FolderPickFragment.java
  13. 4
      Clover/app/src/main/java/org/floens/chan/ui/layout/ReplyLayout.java
  14. 32
      Clover/app/src/main/java/org/floens/chan/ui/theme/Theme.java
  15. 174
      Clover/app/src/main/java/org/floens/chan/ui/theme/ThemeHelper.java
  16. 2
      Clover/app/src/main/java/org/floens/chan/ui/toolbar/Toolbar.java
  17. 129
      Clover/app/src/main/java/org/floens/chan/utils/ThemeHelper.java
  18. 2
      Clover/app/src/main/res/drawable/setting_description_bottom.xml
  19. 21
      Clover/app/src/main/res/drawable/setting_description_bottom_dark.xml
  20. 2
      Clover/app/src/main/res/drawable/setting_description_top.xml
  21. 21
      Clover/app/src/main/res/drawable/setting_description_top_dark.xml
  22. 2
      Clover/app/src/main/res/layout/cell_board_edit.xml
  23. 2
      Clover/app/src/main/res/layout/cell_board_edit_header.xml
  24. 2
      Clover/app/src/main/res/layout/cell_header.xml
  25. 2
      Clover/app/src/main/res/layout/cell_link.xml
  26. 4
      Clover/app/src/main/res/layout/cell_pin.xml
  27. 2
      Clover/app/src/main/res/layout/cell_thread_status.xml
  28. 2
      Clover/app/src/main/res/layout/controller_board_edit.xml
  29. 5
      Clover/app/src/main/res/layout/controller_navigation_drawer.xml
  30. 2
      Clover/app/src/main/res/layout/layout_reply_input.xml
  31. 4
      Clover/app/src/main/res/layout/layout_thread_list.xml
  32. 4
      Clover/app/src/main/res/layout/setting_description.xml
  33. 2
      Clover/app/src/main/res/layout/setting_divider.xml
  34. 4
      Clover/app/src/main/res/layout/setting_group.xml
  35. 2
      Clover/app/src/main/res/layout/settings_layout.xml
  36. 6
      Clover/app/src/main/res/layout/settings_pass.xml
  37. 2
      Clover/app/src/main/res/layout/settings_watch.xml
  38. 4
      Clover/app/src/main/res/layout/toolbar_menu.xml
  39. 2
      Clover/app/src/main/res/layout/toolbar_menu_item.xml
  40. 4
      Clover/app/src/main/res/values/attrs.xml
  41. 23
      Clover/app/src/main/res/values/styles.xml

@ -38,7 +38,7 @@ import org.floens.chan.core.model.PostLinkable;
import org.floens.chan.core.settings.ChanSettings;
import org.floens.chan.utils.AndroidUtils;
import org.floens.chan.utils.Logger;
import org.floens.chan.utils.ThemeHelper;
import org.floens.chan.ui.theme.ThemeHelper;
import org.jsoup.Jsoup;
import org.jsoup.helper.StringUtil;
import org.jsoup.nodes.Document;

@ -22,7 +22,7 @@ import android.text.TextPaint;
import android.text.style.ClickableSpan;
import android.view.View;
import org.floens.chan.utils.ThemeHelper;
import org.floens.chan.ui.theme.ThemeHelper;
import java.util.ArrayList;
import java.util.List;

@ -34,7 +34,7 @@ import org.floens.chan.core.model.ChanThread;
import org.floens.chan.core.model.Loadable;
import org.floens.chan.core.model.Post;
import org.floens.chan.utils.Logger;
import org.floens.chan.utils.ThemeHelper;
import org.floens.chan.ui.theme.ThemeHelper;
import java.io.File;
@ -56,7 +56,7 @@ public class TestActivity extends Activity implements View.OnClickListener {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ThemeHelper.getInstance().reloadPostViewColors(this);
ThemeHelper.getInstance().addContext(this);
LinearLayout linearLayout = new LinearLayout(this);
linearLayout.setOrientation(LinearLayout.VERTICAL);
@ -93,6 +93,12 @@ public class TestActivity extends Activity implements View.OnClickListener {
fileCache = new FileCache(fileCacheDir, 50 * 1024 * 1024, Chan.getInstance().getUserAgent());
}
@Override
protected void onDestroy() {
super.onDestroy();
ThemeHelper.getInstance().removeContext(this);
}
@Override
public void onClick(View v) {
if (v == clearCache) {

@ -33,12 +33,12 @@ import org.floens.chan.core.model.Board;
import org.floens.chan.core.model.Loadable;
import org.floens.chan.core.model.Pin;
import org.floens.chan.core.settings.ChanSettings;
import org.floens.chan.ui.theme.ThemeHelper;
import org.floens.chan.ui.controller.BrowseController;
import org.floens.chan.ui.controller.RootNavigationController;
import org.floens.chan.ui.controller.ViewThreadController;
import org.floens.chan.ui.state.ChanState;
import org.floens.chan.utils.Logger;
import org.floens.chan.utils.ThemeHelper;
import java.util.ArrayList;
import java.util.List;
@ -58,8 +58,7 @@ public class StartActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTheme(R.style.Chan_Theme);
ThemeHelper.getInstance().reloadPostViewColors(this);
ThemeHelper.getInstance().addContext(this);
contentView = (ViewGroup) findViewById(android.R.id.content);
@ -111,6 +110,12 @@ public class StartActivity extends AppCompatActivity {
}
}
public void restart() {
Intent intent = getIntent();
finish();
startActivity(intent);
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
@ -206,6 +211,8 @@ public class StartActivity extends AppCompatActivity {
stackTop().onDestroy();
stack.clear();
ThemeHelper.getInstance().removeContext(this);
}
@Override

@ -56,7 +56,7 @@ import org.floens.chan.ui.helper.PostHelper;
import org.floens.chan.ui.view.FloatingMenu;
import org.floens.chan.ui.view.FloatingMenuItem;
import org.floens.chan.ui.view.ThumbnailView;
import org.floens.chan.utils.ThemeHelper;
import org.floens.chan.ui.theme.ThemeHelper;
import org.floens.chan.utils.Time;
import java.util.ArrayList;

@ -31,6 +31,9 @@ import org.floens.chan.core.model.SavedReply;
import java.util.Random;
import static org.floens.chan.utils.AndroidUtils.dp;
import static org.floens.chan.utils.AndroidUtils.getAttrColor;
public class DeveloperSettingsController extends Controller {
private TextView summaryText;
@ -46,7 +49,6 @@ public class DeveloperSettingsController extends Controller {
LinearLayout wrapper = new LinearLayout(context);
wrapper.setOrientation(LinearLayout.VERTICAL);
wrapper.setBackgroundColor(0xffffffff);
Button crashButton = new Button(context);
@ -61,7 +63,7 @@ public class DeveloperSettingsController extends Controller {
wrapper.addView(crashButton);
summaryText = new TextView(context);
summaryText.setPadding(0, 25, 0, 0);
summaryText.setPadding(0, dp(25), 0, 0);
wrapper.addView(summaryText);
setDbSummary();
@ -107,6 +109,7 @@ public class DeveloperSettingsController extends Controller {
ScrollView scrollView = new ScrollView(context);
scrollView.addView(wrapper);
view = scrollView;
view.setBackgroundColor(getAttrColor(context, R.attr.backcolor));
}
private void setDbSummary() {

@ -126,7 +126,7 @@ public class ImageViewerController extends Controller implements View.OnClickLis
view.setOnClickListener(this);
previewImage = (TransitionImageView) view.findViewById(R.id.preview_image);
pager = (OptionalSwipeViewPager) view.findViewById(R.id.pager);
pager.setOnPageChangeListener(presenter);
pager.addOnPageChangeListener(presenter);
loadingBar = (LoadingBar) view.findViewById(R.id.loading_bar);
AndroidUtils.waitForMeasure(view, new AndroidUtils.OnMeasuredCallback() {

@ -25,6 +25,7 @@ import android.widget.Toast;
import org.floens.chan.R;
import org.floens.chan.core.settings.ChanSettings;
import org.floens.chan.ui.activity.StartActivity;
import org.floens.chan.ui.settings.BooleanSettingView;
import org.floens.chan.ui.settings.LinkSettingView;
import org.floens.chan.ui.settings.ListSettingView;
@ -50,6 +51,7 @@ public class MainSettingsController extends SettingsController implements Toolba
private LinkSettingView passLink;
private int clickCount;
private SettingView developerView;
private SettingView theme;
public MainSettingsController(Context context) {
super(context);
@ -99,6 +101,8 @@ public class MainSettingsController extends SettingsController implements Toolba
if (item == imageAutoLoadView) {
videoAutoLoadView.setEnabled(ChanSettings.imageAutoLoad.get());
} else if (item == theme) {
((StartActivity)context).restart();
}
}
@ -141,7 +145,7 @@ public class MainSettingsController extends SettingsController implements Toolba
// Browsing group
SettingsGroup browsing = new SettingsGroup(s(R.string.settings_group_browsing));
browsing.add(new ListSettingView(this, ChanSettings.theme, s(R.string.setting_theme), new ListSettingView.Item[]{
theme = browsing.add(new ListSettingView(this, ChanSettings.theme, s(R.string.setting_theme), new ListSettingView.Item[]{
new ListSettingView.Item(s(R.string.setting_theme_light), "light"),
new ListSettingView.Item(s(R.string.setting_theme_dark), "dark"),
new ListSettingView.Item(s(R.string.setting_theme_black), "black")

@ -42,7 +42,7 @@ import org.floens.chan.ui.cell.PostCell;
import org.floens.chan.ui.helper.PostPopupHelper;
import org.floens.chan.ui.view.LoadView;
import org.floens.chan.ui.view.ThumbnailView;
import org.floens.chan.utils.ThemeHelper;
import org.floens.chan.ui.theme.ThemeHelper;
public class PostRepliesController extends Controller {
private static final int TRANSITION_DURATION = 200;

@ -34,6 +34,7 @@ import org.floens.chan.core.manager.WatchManager;
import org.floens.chan.core.model.Pin;
import org.floens.chan.ui.adapter.PinAdapter;
import org.floens.chan.ui.helper.SwipeListener;
import org.floens.chan.ui.theme.ThemeHelper;
import org.floens.chan.ui.toolbar.Toolbar;
import org.floens.chan.utils.AndroidUtils;
@ -67,6 +68,8 @@ public class RootNavigationController extends NavigationController implements Pi
recyclerView = (RecyclerView) view.findViewById(R.id.drawer_recycler_view);
recyclerView.setHasFixedSize(true);
toolbar.setBackgroundColor(ThemeHelper.getInstance().getTheme().primaryColor.color);
pinAdapter = new PinAdapter(this);
recyclerView.setAdapter(pinAdapter);

@ -35,6 +35,8 @@ import org.floens.chan.utils.AndroidUtils;
import java.util.Arrays;
import static org.floens.chan.utils.AndroidUtils.getAttrColor;
public class ViewThreadController extends ThreadController implements ThreadLayout.ThreadLayoutCallback, ToolbarMenuItem.ToolbarMenuItemCallback {
private static final int POST_ID = 1;
private static final int PIN_ID = 2;
@ -57,7 +59,7 @@ public class ViewThreadController extends ThreadController implements ThreadLayo
public void onCreate() {
super.onCreate();
view.setBackgroundColor(0xffffffff);
view.setBackgroundColor(getAttrColor(context, R.attr.backcolor));
navigationItem.hasDrawer = true;
navigationItem.menu = new ToolbarMenu(context);

@ -29,7 +29,7 @@ import android.widget.ListView;
import android.widget.TextView;
import org.floens.chan.R;
import org.floens.chan.utils.ThemeHelper;
import org.floens.chan.ui.theme.ThemeHelper;
import java.io.File;
import java.util.ArrayList;

@ -43,7 +43,7 @@ import org.floens.chan.ui.view.SelectionListeningEditText;
import org.floens.chan.utils.AndroidUtils;
import org.floens.chan.utils.AnimationUtils;
import org.floens.chan.utils.ImageDecoder;
import org.floens.chan.utils.ThemeHelper;
import org.floens.chan.ui.theme.ThemeHelper;
import java.io.File;
@ -133,7 +133,7 @@ public class ReplyLayout extends LoadView implements View.OnClickListener, Anima
setView(replyInputLayout);
setBackgroundColor(0xffffffff);
setBackgroundColor(getAttrColor(getContext(), R.attr.backcolor));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
setElevation(dp(4f));
}

@ -0,0 +1,32 @@
/*
* Clover - 4chan browser https://github.com/Floens/Clover/
* Copyright (C) 2014 Floens
*
* 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.
*
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.floens.chan.ui.theme;
public class Theme {
public final String name;
public final int resValue;
public final boolean isLightTheme;
public final ThemeHelper.PrimaryColor primaryColor;
public Theme(String name, int resValue, boolean isLightTheme, ThemeHelper.PrimaryColor primaryColor) {
this.name = name;
this.resValue = resValue;
this.isLightTheme = isLightTheme;
this.primaryColor = primaryColor;
}
}

@ -0,0 +1,174 @@
/*
* Clover - 4chan browser https://github.com/Floens/Clover/
* Copyright (C) 2014 Floens
*
* 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.
*
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.floens.chan.ui.theme;
import android.app.Activity;
import android.app.ActivityManager;
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Build;
import org.floens.chan.R;
import org.floens.chan.core.settings.ChanSettings;
import org.floens.chan.utils.Logger;
import java.util.ArrayList;
import java.util.List;
public class ThemeHelper {
private static final String TAG = "ThemeHelper";
public static ThemeHelper instance = new ThemeHelper();
public static ThemeHelper getInstance() {
return instance;
}
private List<Context> contexts = new ArrayList<>();
private List<Theme> themes = new ArrayList<>();
private Theme theme;
private int quoteColor;
private int highlightQuoteColor;
private int linkColor;
private int spoilerColor;
private int inlineQuoteColor;
public ThemeHelper() {
themes.add(new Theme("light", R.style.Chan_Theme, true, PrimaryColor.GREEN));
themes.add(new Theme("dark", R.style.Chan_Theme_Dark, false, PrimaryColor.DARK));
themes.add(new Theme("black", R.style.Chan_Theme_Black, false, PrimaryColor.BLACK));
}
public void updateCurrentTheme() {
String settingTheme = ChanSettings.theme.get();
for (Theme theme : themes) {
if (theme.name.equals(settingTheme)) {
this.theme = theme;
return;
}
}
Logger.e(TAG, "No theme found for setting " + settingTheme + ", using the first one");
theme = themes.get(0);
}
public Theme getTheme() {
return theme;
}
public Context getThemedContext() {
return contexts.size() > 0 ? contexts.get(contexts.size() - 1) : null;
}
public void addContext(Activity context) {
if (contexts.contains(context)) {
Logger.e(TAG, "addContext: context already added");
} else {
contexts.add(context);
}
updateCurrentTheme();
context.setTheme(theme.resValue);
TypedArray ta = context.obtainStyledAttributes(new int[]{
R.attr.post_quote_color,
R.attr.post_highlight_quote_color,
R.attr.post_link_color,
R.attr.post_spoiler_color,
R.attr.post_inline_quote_color
});
quoteColor = ta.getColor(0, 0);
highlightQuoteColor = ta.getColor(1, 0);
linkColor = ta.getColor(2, 0);
spoilerColor = ta.getColor(3, 0);
inlineQuoteColor = ta.getColor(4, 0);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
context.getWindow().setStatusBarColor(theme.primaryColor.dark);
context.getWindow().setNavigationBarColor(0xff000000);
context.setTaskDescription(new ActivityManager.TaskDescription(null, null, theme.primaryColor.color));
}
ta.recycle();
}
public void removeContext(Activity context) {
if (!contexts.remove(context)) {
Logger.e(TAG, "removeContext: context not found");
}
}
public int getQuoteColor() {
return quoteColor;
}
public int getHighlightQuoteColor() {
return highlightQuoteColor;
}
public int getLinkColor() {
return linkColor;
}
public int getSpoilerColor() {
return spoilerColor;
}
public int getInlineQuoteColor() {
return inlineQuoteColor;
}
public enum PrimaryColor {
RED("red", 0xFF44336, 0xFFD32F2F),
PINK("pink", 0xFFE91E63, 0xFFC2185B),
PURPLE("purple", 0xFF9C27B0, 0xFF7B1FA2),
DEEP_PURPLE("deep purple", 0xFF673AB7, 0xFF512DA8),
INDIGO("indigo", 0xFF3F51B5, 0xFF303F9F),
BLUE("blue", 0xFF2196F3, 0xFF1976D2),
LIGHT_BLUE("light blue", 0xFF03A9F4, 0xFF0288D1),
CYAN("cyan", 0xFF00BCD4, 0xFF0097A7),
TEAL("teal", 0xFF009688, 0xFF00796B),
GREEN("green", 0xFF4CAF50, 0xFF388E3C),
LIGHT_GREEN("light green", 0xFF8BC34A, 0xFF689F38),
LIME("lime", 0xFFCDDC39, 0xFFAFB42B),
YELLOW("yellow", 0xFFFFEB3B, 0xFFFBC02D),
AMBER("amber", 0xFFFFC107, 0xFFFFA000),
ORANGE("orange", 0xFFFF9800, 0xFFF57C00),
DEEP_ORANGE("deep orange", 0xFFFF5722, 0xFFE64A19),
BROWN("brown", 0xFF795548, 0xFF5D4037),
GREY("grey", 0xFF9E9E9E, 0xFF616161),
BLUE_GREY("blue grey", 0xFF607D8B, 0xFF455A64),
DARK("dark", 0xff212121, 0xff000000),
BLACK("black", 0xff000000, 0xff000000);
public final String name;
public final int color;
public final int dark;
PrimaryColor(String name, int color, int dark) {
this.name = name;
this.color = color;
this.dark= dark;
}
}
}

@ -357,7 +357,7 @@ public class Toolbar extends LinearLayout implements View.OnClickListener, LoadV
final TextView titleView = (TextView) menu.findViewById(R.id.title);
titleView.setTypeface(AndroidUtils.ROBOTO_MEDIUM);
titleView.setText(item.title);
// black: titleView.setTextColor(Color.argb((int)(0.87 * 255.0), 0, 0, 0));
titleView.setTextColor(0xffffffff);
if (item.middleMenu != null) {
item.middleMenu.setAnchor(titleView, Gravity.LEFT, dp(5), dp(5));

@ -1,129 +0,0 @@
/*
* Clover - 4chan browser https://github.com/Floens/Clover/
* Copyright (C) 2014 Floens
*
* 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.
*
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.floens.chan.utils;
import android.app.Activity;
import android.content.Context;
import android.content.res.TypedArray;
import org.floens.chan.R;
import org.floens.chan.core.settings.ChanSettings;
public class ThemeHelper {
public enum Theme {
LIGHT("light", R.style.Chan_Theme, true),
DARK("dark", R.style.Chan_Theme_Dark, false),
BLACK("black", R.style.Chan_Theme_Black, false);
public String name;
public int resValue;
public boolean isLightTheme;
Theme(String name, int resValue, boolean isLightTheme) {
this.name = name;
this.resValue = resValue;
this.isLightTheme = isLightTheme;
}
}
private static ThemeHelper instance;
private Context context;
private int quoteColor;
private int highlightQuoteColor;
private int linkColor;
private int spoilerColor;
private int inlineQuoteColor;
public static ThemeHelper getInstance() {
if (instance == null) {
instance = new ThemeHelper();
}
return instance;
}
public static void setTheme(Activity activity) {
activity.setTheme(ThemeHelper.getInstance().getTheme().resValue);
}
public ThemeHelper() {
}
public Theme getTheme() {
String themeName = ChanSettings.theme.get();
Theme theme = null;
switch (themeName) {
case "light":
theme = Theme.LIGHT;
break;
case "dark":
theme = Theme.DARK;
break;
case "black":
theme = Theme.BLACK;
break;
}
return theme;
}
public Context getThemedContext() {
return context;
}
public void reloadPostViewColors(Context context) {
this.context = context;
TypedArray ta = context.obtainStyledAttributes(new int[]{
R.attr.post_quote_color,
R.attr.post_highlight_quote_color,
R.attr.post_link_color,
R.attr.post_spoiler_color,
R.attr.post_inline_quote_color
});
quoteColor = ta.getColor(0, 0);
highlightQuoteColor = ta.getColor(1, 0);
linkColor = ta.getColor(2, 0);
spoilerColor = ta.getColor(3, 0);
inlineQuoteColor = ta.getColor(4, 0);
ta.recycle();
}
public int getQuoteColor() {
return quoteColor;
}
public int getHighlightQuoteColor() {
return highlightQuoteColor;
}
public int getLinkColor() {
return linkColor;
}
public int getSpoilerColor() {
return spoilerColor;
}
public int getInlineQuoteColor() {
return inlineQuoteColor;
}
}

@ -16,6 +16,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="#55000000" android:state_enabled="false" />
<item android:color="#89000000" android:state_enabled="false" />
<item android:color="#89000000" />
</selector>

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?><!--
Clover - 4chan browser https://github.com/Floens/Clover/
Copyright (C) 2014 Floens
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.
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="#b2ffffff" android:state_enabled="false" />
<item android:color="#b2ffffff" />
</selector>

@ -17,5 +17,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="#89000000" android:state_enabled="false" />
<item android:color="#ff000000" />
<item android:color="#DE000000" />
</selector>

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?><!--
Clover - 4chan browser https://github.com/Floens/Clover/
Copyright (C) 2014 Floens
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.
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="#b2ffffff" android:state_enabled="false" />
<item android:color="#ffffffff" />
</selector>

@ -42,7 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:singleLine="true"
android:textColor="#ff212121"
android:textColor="?text_color_primary"
android:textSize="14sp" />
</LinearLayout>

@ -28,7 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:layout_weight="1"
android:gravity="center_vertical"
android:padding="16dp"
android:textColor="#ff757575"
android:textColor="?text_color_primary"
android:textSize="14sp" />
</LinearLayout>

@ -31,7 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:singleLine="true"
android:textColor="#ff757575"
android:textColor="?text_color_primary"
android:textSize="14sp" />
<ImageView

@ -42,7 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:singleLine="true"
android:textColor="#ff212121"
android:textColor="?text_color_primary"
android:textSize="14sp" />
</LinearLayout>

@ -40,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:singleLine="true"
android:textColor="#ff212121"
android:textColor="?text_color_primary"
android:textSize="14sp" />
<TextView
@ -51,7 +51,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:gravity="center"
android:paddingRight="16dp"
android:singleLine="true"
android:textColor="#ff000000"
android:textColor="?text_color_primary"
android:textSize="14sp" />
</LinearLayout>

@ -25,6 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:textColor="#ff757575" />
android:textColor="?text_color_primary" />
</org.floens.chan.ui.cell.ThreadStatusCell>

@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffffff"
android:background="?backcolor"
android:orientation="vertical">
<android.support.v7.widget.RecyclerView

@ -25,14 +25,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:id="@+id/root_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffffff"
android:background="?backcolor"
android:orientation="vertical">
<org.floens.chan.ui.toolbar.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="@dimen/toolbar_height"
android:background="@color/primary"
android:elevation="4dp"
tools:ignore="UnusedAttribute" />
@ -49,7 +48,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:layout_width="200dp"
android:layout_height="match_parent"
android:layout_gravity="left"
android:background="#ffffffff">
android:background="?backcolor">
<android.support.v7.widget.RecyclerView
android:id="@+id/drawer_recycler_view"

@ -28,7 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:layout_width="match_parent"
android:layout_height="0dp"
android:padding="8dp"
android:textColor="#ffff0000"
android:textColor="#fff44336"
android:visibility="gone" />
<LinearLayout

@ -31,12 +31,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:id="@+id/search_status"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="#ffffffff"
android:background="?backcolor"
android:elevation="4dp"
android:gravity="center"
android:padding="8dp"
android:singleLine="true"
android:textColor="#ff757575"
android:textColor="?text_color_secondary"
android:visibility="gone"
tools:ignore="UnusedAttribute" />

@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:singleLine="true"
android:textColor="@drawable/setting_description_top"
android:textColor="?setting_description_top"
android:textSize="16sp" />
<TextView
@ -38,7 +38,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:singleLine="true"
android:textColor="@drawable/setting_description_bottom"
android:textColor="?setting_description_bottom"
android:textSize="14sp" />
</merge>

@ -19,4 +19,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="1px"
android:background="#22000000" />
android:background="?divider_color" />

@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:layout_height="wrap_content"
android:layout_marginBottom="6dp"
android:layout_marginTop="6dp"
android:background="#ffffffff"
android:background="?backcolor"
android:elevation="4dp"
android:orientation="vertical"
tools:ignore="UnusedAttribute">
@ -37,7 +37,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:paddingRight="16dp"
android:paddingTop="16dp"
android:singleLine="true"
android:textColor="#89000000"
android:textColor="?text_color_secondary"
android:textSize="16sp" />
</LinearLayout>

@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffe5e5e5">
android:background="?backcolor_secondary">
<LinearLayout
android:id="@+id/scrollview_content"

@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffffff">
android:background="?backcolor">
<LinearLayout
android:id="@+id/container"
@ -75,7 +75,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/setting_pass_authenticated"
android:textColor="#dd000000"
android:textColor="?text_color_primary"
android:textSize="20sp" />
</org.floens.chan.ui.view.CrossfadeView>
@ -92,7 +92,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:paddingLeft="4dp"
android:paddingRight="4dp"
android:paddingTop="16dp"
android:textColor="#dd000000"
android:textColor="?text_color_primary"
android:textSize="14sp" />
</LinearLayout>

@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:id="@+id/crossfade"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffe5e5e5">
android:background="?backcolor_secondary">
<include layout="@layout/settings_layout" />

@ -41,7 +41,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:minWidth="150dp"
android:paddingLeft="16dp"
android:singleLine="true"
android:textColor="#ffffffff"
android:textColor="?text_color_primary"
android:textSize="20dp" />
<TextView
@ -55,7 +55,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:paddingLeft="16dp"
android:paddingTop="29dp"
android:singleLine="true"
android:textColor="#ffededed"
android:textColor="?text_color_secondary"
android:textSize="14dp" />
</FrameLayout>

@ -24,5 +24,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:singleLine="true"
android:textColor="#ff000000"
android:textColor="?text_color_primary"
android:textSize="16sp" />

@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<attr name="text_color_hint" format="color" />
<attr name="backcolor" format="color" />
<attr name="backcolor_secondary" format="color" />
<attr name="post_saved_reply_color" format="color" />
<attr name="post_highlighted_color" format="color" />
@ -44,4 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<attr name="dropdown_light_pressed_color" format="color" />
<attr name="dropdown_dark_color" format="color" />
<attr name="dropdown_dark_pressed_color" format="color" />
<attr name="setting_description_top" format="reference" />
<attr name="setting_description_bottom" format="reference" />
</resources>

@ -22,17 +22,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<!-- Main light theme -->
<style name="Chan.Theme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primary_dark</item>
<item name="colorAccent">@color/accent</item>
<item name="colorAccent">#ff009688</item>
<item name="android:windowBackground">@android:color/white</item>
<item name="windowActionModeOverlay">true</item>
<item name="dropDownListViewStyle">@style/ToolbarDropDownListViewStyle</item>
<item name="setting_description_top">@drawable/setting_description_top</item>
<item name="setting_description_bottom">@drawable/setting_description_bottom</item>
<item name="backcolor">#ffffffff</item>
<item name="backcolor_secondary">#fff5f5f5</item>
<item name="android:textColor">#DE000000</item>
<item name="text_color_primary">#DE000000</item>
<item name="text_color_secondary">#89000000</item>
<item name="text_color_hint">#42000000</item>
@ -61,14 +64,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<item name="dropdown_dark_pressed_color">#887d7d7d</item>
</style>
<style name="Chan.Theme.Dark">
<style name="Chan.Theme.Dark" parent="Theme.AppCompat.NoActionBar">
<item name="setting_description_top">@drawable/setting_description_top_dark</item>
<item name="setting_description_bottom">@drawable/setting_description_bottom_dark</item>
<item name="backcolor">#ff232323</item>
<item name="backcolor_secondary">#ff303030</item>
<item name="android:textColor">#ffffffff</item>
<item name="text_color_primary">#ffffffff</item>
<item name="text_color_secondary">#b2ffffff</item>
<item name="text_color_hint">#4cffffff</item>
<!--<item name="divider_color">#1effffff</item>-->
<item name="divider_color">#1effffff</item>
<item name="post_saved_reply_color">#ff5C5C5C</item>
<item name="post_highlighted_color">#ff444444</item>
<item name="post_subject_color">#ff625cff</item>
<item name="post_details_color">#ff646464</item>
<item name="post_link_color">#ff625cff</item>
<item name="post_spoiler_color">#ff000000</item>
<item name="post_id_background_light">#00000000</item>
@ -77,6 +91,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<style name="Chan.Theme.Black" parent="Chan.Theme.Dark">
<item name="backcolor">#ff000000</item>
<item name="backcolor_secondary">#ff212121</item>
<item name="post_spoiler_color">#ff2c2c2c</item>
</style>

Loading…
Cancel
Save