Added an AMOLED Black theme, changed from tabs to spaces for some files
This commit is contained in:
parent
b400ef0647
commit
9f8dff8c5d
@ -162,7 +162,8 @@ public class BrowserActivity extends ThemableActivity implements BrowserControll
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
|
||||
mPreferences = PreferenceManager.getInstance();
|
||||
mDarkTheme = mPreferences.getUseDarkTheme() || isIncognito();
|
||||
//TODO make sure dark theme flag gets set correctly
|
||||
mDarkTheme = mPreferences.getUseTheme() != 0 || isIncognito();
|
||||
mActivity = this;
|
||||
mWebViews.clear();
|
||||
|
||||
|
@ -14,162 +14,201 @@ import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.CompoundButton.OnCheckedChangeListener;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import acr.browser.lightning.preference.PreferenceManager;
|
||||
import acr.browser.lightning.R;
|
||||
|
||||
public class DisplaySettingsActivity extends ThemableSettingsActivity {
|
||||
|
||||
// mPreferences variables
|
||||
private PreferenceManager mPreferences;
|
||||
private CheckBox cbHideStatusBar, cbFullScreen, cbWideViewPort, cbOverView, cbTextReflow,
|
||||
cbDarkTheme;
|
||||
// mPreferences variables
|
||||
private PreferenceManager mPreferences;
|
||||
private CheckBox cbHideStatusBar, cbFullScreen, cbWideViewPort, cbOverView, cbTextReflow;
|
||||
private String[] mThemeOptions;
|
||||
private TextView mThemeText;
|
||||
private int mCurrentTheme;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.display_settings);
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.display_settings);
|
||||
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
mPreferences = PreferenceManager.getInstance();
|
||||
initialize();
|
||||
}
|
||||
mPreferences = PreferenceManager.getInstance();
|
||||
mThemeOptions = this.getResources().getStringArray(R.array.themes);
|
||||
initialize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
finish();
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
finish();
|
||||
return true;
|
||||
}
|
||||
|
||||
private void initialize() {
|
||||
private void initialize() {
|
||||
|
||||
RelativeLayout rHideStatusBar, rFullScreen, rWideViewPort, rOverView, rTextReflow, rTextSize, rDarkTheme;
|
||||
LayoutClickListener clickListener = new LayoutClickListener();
|
||||
CheckBoxToggleListener toggleListener = new CheckBoxToggleListener();
|
||||
RelativeLayout rHideStatusBar, rFullScreen, rWideViewPort, rOverView, rTextReflow, rTextSize, rDarkTheme;
|
||||
LayoutClickListener clickListener = new LayoutClickListener();
|
||||
CheckBoxToggleListener toggleListener = new CheckBoxToggleListener();
|
||||
|
||||
rHideStatusBar = (RelativeLayout) findViewById(R.id.rHideStatusBar);
|
||||
rFullScreen = (RelativeLayout) findViewById(R.id.rFullScreen);
|
||||
rWideViewPort = (RelativeLayout) findViewById(R.id.rWideViewPort);
|
||||
rOverView = (RelativeLayout) findViewById(R.id.rOverView);
|
||||
rTextReflow = (RelativeLayout) findViewById(R.id.rTextReflow);
|
||||
rTextSize = (RelativeLayout) findViewById(R.id.rTextSize);
|
||||
rDarkTheme = (RelativeLayout) findViewById(R.id.rDarkTheme);
|
||||
rHideStatusBar = (RelativeLayout) findViewById(R.id.rHideStatusBar);
|
||||
rFullScreen = (RelativeLayout) findViewById(R.id.rFullScreen);
|
||||
rWideViewPort = (RelativeLayout) findViewById(R.id.rWideViewPort);
|
||||
rOverView = (RelativeLayout) findViewById(R.id.rOverView);
|
||||
rTextReflow = (RelativeLayout) findViewById(R.id.rTextReflow);
|
||||
rTextSize = (RelativeLayout) findViewById(R.id.rTextSize);
|
||||
rDarkTheme = (RelativeLayout) findViewById(R.id.rTheme);
|
||||
|
||||
rHideStatusBar.setOnClickListener(clickListener);
|
||||
rFullScreen.setOnClickListener(clickListener);
|
||||
rWideViewPort.setOnClickListener(clickListener);
|
||||
rOverView.setOnClickListener(clickListener);
|
||||
rTextReflow.setOnClickListener(clickListener);
|
||||
rTextSize.setOnClickListener(clickListener);
|
||||
rDarkTheme.setOnClickListener(clickListener);
|
||||
rHideStatusBar.setOnClickListener(clickListener);
|
||||
rFullScreen.setOnClickListener(clickListener);
|
||||
rWideViewPort.setOnClickListener(clickListener);
|
||||
rOverView.setOnClickListener(clickListener);
|
||||
rTextReflow.setOnClickListener(clickListener);
|
||||
rTextSize.setOnClickListener(clickListener);
|
||||
rDarkTheme.setOnClickListener(clickListener);
|
||||
|
||||
cbHideStatusBar = (CheckBox) findViewById(R.id.cbHideStatusBar);
|
||||
cbFullScreen = (CheckBox) findViewById(R.id.cbFullScreen);
|
||||
cbWideViewPort = (CheckBox) findViewById(R.id.cbWideViewPort);
|
||||
cbOverView = (CheckBox) findViewById(R.id.cbOverView);
|
||||
cbTextReflow = (CheckBox) findViewById(R.id.cbTextReflow);
|
||||
cbDarkTheme = (CheckBox) findViewById(R.id.cbDarkTheme);
|
||||
mThemeText = (TextView) findViewById(R.id.textViewTheme);
|
||||
|
||||
cbHideStatusBar.setChecked(mPreferences.getHideStatusBarEnabled());
|
||||
cbFullScreen.setChecked(mPreferences.getFullScreenEnabled());
|
||||
cbWideViewPort.setChecked(mPreferences.getUseWideViewportEnabled());
|
||||
cbOverView.setChecked(mPreferences.getOverviewModeEnabled());
|
||||
cbTextReflow.setChecked(mPreferences.getTextReflowEnabled());
|
||||
cbDarkTheme.setChecked(mPreferences.getUseDarkTheme());
|
||||
mCurrentTheme = mPreferences.getUseTheme();
|
||||
mThemeText.setText(mThemeOptions[mPreferences.getUseTheme()]);
|
||||
|
||||
cbHideStatusBar.setOnCheckedChangeListener(toggleListener);
|
||||
cbFullScreen.setOnCheckedChangeListener(toggleListener);
|
||||
cbWideViewPort.setOnCheckedChangeListener(toggleListener);
|
||||
cbOverView.setOnCheckedChangeListener(toggleListener);
|
||||
cbTextReflow.setOnCheckedChangeListener(toggleListener);
|
||||
cbDarkTheme.setOnCheckedChangeListener(toggleListener);
|
||||
}
|
||||
cbHideStatusBar = (CheckBox) findViewById(R.id.cbHideStatusBar);
|
||||
cbFullScreen = (CheckBox) findViewById(R.id.cbFullScreen);
|
||||
cbWideViewPort = (CheckBox) findViewById(R.id.cbWideViewPort);
|
||||
cbOverView = (CheckBox) findViewById(R.id.cbOverView);
|
||||
cbTextReflow = (CheckBox) findViewById(R.id.cbTextReflow);
|
||||
|
||||
private class LayoutClickListener implements OnClickListener {
|
||||
cbHideStatusBar.setChecked(mPreferences.getHideStatusBarEnabled());
|
||||
cbFullScreen.setChecked(mPreferences.getFullScreenEnabled());
|
||||
cbWideViewPort.setChecked(mPreferences.getUseWideViewportEnabled());
|
||||
cbOverView.setChecked(mPreferences.getOverviewModeEnabled());
|
||||
cbTextReflow.setChecked(mPreferences.getTextReflowEnabled());
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.rHideStatusBar:
|
||||
cbHideStatusBar.setChecked(!cbHideStatusBar.isChecked());
|
||||
break;
|
||||
case R.id.rFullScreen:
|
||||
cbFullScreen.setChecked(!cbFullScreen.isChecked());
|
||||
break;
|
||||
case R.id.rWideViewPort:
|
||||
cbWideViewPort.setChecked(!cbWideViewPort.isChecked());
|
||||
break;
|
||||
case R.id.rOverView:
|
||||
cbOverView.setChecked(!cbOverView.isChecked());
|
||||
break;
|
||||
case R.id.rTextReflow:
|
||||
cbTextReflow.setChecked(!cbTextReflow.isChecked());
|
||||
break;
|
||||
case R.id.rTextSize:
|
||||
textSizePicker();
|
||||
break;
|
||||
case R.id.rDarkTheme:
|
||||
cbDarkTheme.setChecked(!cbDarkTheme.isChecked());
|
||||
break;
|
||||
}
|
||||
}
|
||||
cbHideStatusBar.setOnCheckedChangeListener(toggleListener);
|
||||
cbFullScreen.setOnCheckedChangeListener(toggleListener);
|
||||
cbWideViewPort.setOnCheckedChangeListener(toggleListener);
|
||||
cbOverView.setOnCheckedChangeListener(toggleListener);
|
||||
cbTextReflow.setOnCheckedChangeListener(toggleListener);
|
||||
}
|
||||
|
||||
}
|
||||
private class LayoutClickListener implements OnClickListener {
|
||||
|
||||
private class CheckBoxToggleListener implements OnCheckedChangeListener {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.rHideStatusBar:
|
||||
cbHideStatusBar.setChecked(!cbHideStatusBar.isChecked());
|
||||
break;
|
||||
case R.id.rFullScreen:
|
||||
cbFullScreen.setChecked(!cbFullScreen.isChecked());
|
||||
break;
|
||||
case R.id.rWideViewPort:
|
||||
cbWideViewPort.setChecked(!cbWideViewPort.isChecked());
|
||||
break;
|
||||
case R.id.rOverView:
|
||||
cbOverView.setChecked(!cbOverView.isChecked());
|
||||
break;
|
||||
case R.id.rTextReflow:
|
||||
cbTextReflow.setChecked(!cbTextReflow.isChecked());
|
||||
break;
|
||||
case R.id.rTextSize:
|
||||
textSizePicker();
|
||||
break;
|
||||
case R.id.rTheme:
|
||||
themePicker();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
switch (buttonView.getId()) {
|
||||
case R.id.cbHideStatusBar:
|
||||
mPreferences.setHideStatusBarEnabled(isChecked);
|
||||
break;
|
||||
case R.id.cbFullScreen:
|
||||
mPreferences.setFullScreenEnabled(isChecked);
|
||||
break;
|
||||
case R.id.cbWideViewPort:
|
||||
mPreferences.setUseWideViewportEnabled(isChecked);
|
||||
break;
|
||||
case R.id.cbOverView:
|
||||
mPreferences.setOverviewModeEnabled(isChecked);
|
||||
break;
|
||||
case R.id.cbTextReflow:
|
||||
mPreferences.setTextReflowEnabled(isChecked);
|
||||
break;
|
||||
case R.id.cbDarkTheme:
|
||||
mPreferences.setUseDarkTheme(isChecked);
|
||||
restart();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
private class CheckBoxToggleListener implements OnCheckedChangeListener {
|
||||
|
||||
private void textSizePicker() {
|
||||
AlertDialog.Builder picker = new AlertDialog.Builder(DisplaySettingsActivity.this);
|
||||
picker.setTitle(getResources().getString(R.string.title_text_size));
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
switch (buttonView.getId()) {
|
||||
case R.id.cbHideStatusBar:
|
||||
mPreferences.setHideStatusBarEnabled(isChecked);
|
||||
break;
|
||||
case R.id.cbFullScreen:
|
||||
mPreferences.setFullScreenEnabled(isChecked);
|
||||
break;
|
||||
case R.id.cbWideViewPort:
|
||||
mPreferences.setUseWideViewportEnabled(isChecked);
|
||||
break;
|
||||
case R.id.cbOverView:
|
||||
mPreferences.setOverviewModeEnabled(isChecked);
|
||||
break;
|
||||
case R.id.cbTextReflow:
|
||||
mPreferences.setTextReflowEnabled(isChecked);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int n = mPreferences.getTextSize();
|
||||
}
|
||||
|
||||
picker.setSingleChoiceItems(R.array.text_size, n - 1,
|
||||
new DialogInterface.OnClickListener() {
|
||||
private void textSizePicker() {
|
||||
AlertDialog.Builder picker = new AlertDialog.Builder(DisplaySettingsActivity.this);
|
||||
picker.setTitle(getResources().getString(R.string.title_text_size));
|
||||
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
mPreferences.setTextSize(which + 1);
|
||||
}
|
||||
});
|
||||
picker.setNeutralButton(getResources().getString(R.string.action_ok),
|
||||
new DialogInterface.OnClickListener() {
|
||||
int n = mPreferences.getTextSize();
|
||||
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
picker.setSingleChoiceItems(R.array.text_size, n - 1,
|
||||
new DialogInterface.OnClickListener() {
|
||||
|
||||
}
|
||||
});
|
||||
picker.show();
|
||||
}
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
mPreferences.setTextSize(which + 1);
|
||||
}
|
||||
});
|
||||
picker.setNeutralButton(getResources().getString(R.string.action_ok),
|
||||
new DialogInterface.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
|
||||
}
|
||||
});
|
||||
picker.show();
|
||||
}
|
||||
|
||||
private void themePicker() {
|
||||
|
||||
AlertDialog.Builder picker = new AlertDialog.Builder(DisplaySettingsActivity.this);
|
||||
picker.setTitle(getResources().getString(R.string.url_contents));
|
||||
|
||||
int n = mPreferences.getUseTheme();
|
||||
picker.setSingleChoiceItems(mThemeOptions, n, new DialogInterface.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
mPreferences.setUseTheme(which);
|
||||
if (which < mThemeOptions.length) {
|
||||
mThemeText.setText(mThemeOptions[which]);
|
||||
}
|
||||
}
|
||||
});
|
||||
picker.setNeutralButton(getResources().getString(R.string.action_ok),
|
||||
new DialogInterface.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
if (mCurrentTheme != mPreferences.getUseTheme()) {
|
||||
restart();
|
||||
}
|
||||
}
|
||||
});
|
||||
picker.setOnCancelListener(new DialogInterface.OnCancelListener() {
|
||||
@Override
|
||||
public void onCancel(DialogInterface dialog) {
|
||||
if (mCurrentTheme != mPreferences.getUseTheme()) {
|
||||
restart();
|
||||
}
|
||||
}
|
||||
});
|
||||
picker.show();
|
||||
}
|
||||
}
|
||||
|
@ -9,33 +9,35 @@ import acr.browser.lightning.preference.PreferenceManager;
|
||||
|
||||
public abstract class ThemableActivity extends AppCompatActivity {
|
||||
|
||||
private boolean mDark;
|
||||
private int mTheme;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
mDark = PreferenceManager.getInstance().getUseDarkTheme();
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
mTheme = PreferenceManager.getInstance().getUseTheme();
|
||||
|
||||
// set the theme
|
||||
if (mDark) {
|
||||
setTheme(R.style.Theme_DarkTheme);
|
||||
}
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
// set the theme
|
||||
if (mTheme == 1) {
|
||||
setTheme(R.style.Theme_DarkTheme);
|
||||
} else if (mTheme == 2) {
|
||||
setTheme(R.style.Theme_BlackTheme);
|
||||
}
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
if (PreferenceManager.getInstance().getUseDarkTheme() != mDark) {
|
||||
restart();
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
if (PreferenceManager.getInstance().getUseTheme() != mTheme) {
|
||||
restart();
|
||||
}
|
||||
}
|
||||
|
||||
protected void restart() {
|
||||
final Bundle outState = new Bundle();
|
||||
onSaveInstanceState(outState);
|
||||
final Intent intent = new Intent(this, getClass());
|
||||
finish();
|
||||
overridePendingTransition(0, 0);
|
||||
startActivity(intent);
|
||||
}
|
||||
protected void restart() {
|
||||
final Bundle outState = new Bundle();
|
||||
onSaveInstanceState(outState);
|
||||
final Intent intent = new Intent(this, getClass());
|
||||
finish();
|
||||
overridePendingTransition(0, 0);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package acr.browser.lightning.activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
|
||||
@ -9,33 +10,36 @@ import acr.browser.lightning.preference.PreferenceManager;
|
||||
|
||||
public abstract class ThemableSettingsActivity extends AppCompatActivity {
|
||||
|
||||
private boolean mDark;
|
||||
private int mTheme;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
mDark = PreferenceManager.getInstance().getUseDarkTheme();
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
mTheme = PreferenceManager.getInstance().getUseTheme();
|
||||
|
||||
// set the theme
|
||||
if (mDark) {
|
||||
setTheme(R.style.Theme_SettingsTheme_Dark);
|
||||
}
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
// set the theme
|
||||
if (mTheme == 1) {
|
||||
setTheme(R.style.Theme_SettingsTheme_Dark);
|
||||
} else if (mTheme == 2) {
|
||||
setTheme(R.style.Theme_SettingsTheme_Black);
|
||||
this.getWindow().setBackgroundDrawable(new ColorDrawable(this.getResources().getColor(R.color.black)));
|
||||
}
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
if (PreferenceManager.getInstance().getUseDarkTheme() != mDark) {
|
||||
restart();
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
if (PreferenceManager.getInstance().getUseTheme() != mTheme) {
|
||||
restart();
|
||||
}
|
||||
}
|
||||
|
||||
protected void restart() {
|
||||
final Bundle outState = new Bundle();
|
||||
onSaveInstanceState(outState);
|
||||
final Intent intent = new Intent(this, getClass());
|
||||
finish();
|
||||
overridePendingTransition(0, 0);
|
||||
startActivity(intent);
|
||||
}
|
||||
protected void restart() {
|
||||
final Bundle outState = new Bundle();
|
||||
onSaveInstanceState(outState);
|
||||
final Intent intent = new Intent(this, getClass());
|
||||
finish();
|
||||
overridePendingTransition(0, 0);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
|
@ -116,6 +116,7 @@ public class SearchAdapter extends BaseAdapter implements Filterable {
|
||||
if (!mUseGoogle && mSuggestions != null) {
|
||||
mSuggestions.clear();
|
||||
}
|
||||
mDatabaseHandler = HistoryDatabase.getInstance(mContext.getApplicationContext());
|
||||
}
|
||||
|
||||
public void refreshBookmarks() {
|
||||
|
@ -45,7 +45,7 @@ public class PreferenceManager {
|
||||
public static final String URL_BOX_CONTENTS = "urlContent";
|
||||
public static final String INVERT_COLORS = "invertColors";
|
||||
public static final String READING_TEXT_SIZE = "readingTextSize";
|
||||
public static final String DARK_THEME = "darkTheme";
|
||||
public static final String THEME = "Theme";
|
||||
public static final String DEFAULT_BOOKMARKS = "defaultBookmarks";
|
||||
|
||||
public static final String USE_PROXY = "useProxy";
|
||||
@ -218,8 +218,8 @@ public class PreferenceManager {
|
||||
return mPrefs.getInt(Name.URL_BOX_CONTENTS, 0);
|
||||
}
|
||||
|
||||
public boolean getUseDarkTheme() {
|
||||
return mPrefs.getBoolean(Name.DARK_THEME, false);
|
||||
public int getUseTheme() {
|
||||
return mPrefs.getInt(Name.THEME, 0);
|
||||
}
|
||||
|
||||
public boolean getUseProxy() {
|
||||
@ -390,8 +390,8 @@ public class PreferenceManager {
|
||||
putInt(Name.URL_BOX_CONTENTS, choice);
|
||||
}
|
||||
|
||||
public void setUseDarkTheme(boolean use) {
|
||||
putBoolean(Name.DARK_THEME, use);
|
||||
public void setUseTheme(int theme) {
|
||||
putInt(Name.THEME, theme);
|
||||
}
|
||||
|
||||
public void setUseProxy(boolean enable) {
|
||||
|
19
app/src/main/res/drawable/toolbar_elevate_black.xml
Normal file
19
app/src/main/res/drawable/toolbar_elevate_black.xml
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<item>
|
||||
<shape
|
||||
android:shape="rectangle" >
|
||||
|
||||
<solid android:color="@color/black" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:bottom="1dp">
|
||||
<shape
|
||||
android:shape="rectangle" >
|
||||
|
||||
<solid android:color="@color/black" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
@ -2,19 +2,19 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical" >
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/toolbar_settings" />
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/scrollView1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rHideStatusBar"
|
||||
@ -24,7 +24,7 @@
|
||||
android:minHeight="60dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingTop="10dp" >
|
||||
android:paddingTop="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@ -59,7 +59,7 @@
|
||||
android:minHeight="60dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingTop="10dp" >
|
||||
android:paddingTop="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@ -87,31 +87,43 @@
|
||||
android:background="?attr/dividerColor" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rDarkTheme"
|
||||
android:id="@+id/rTheme"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/listChoiceBackgroundIndicator"
|
||||
android:minHeight="60dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingTop="10dp" >
|
||||
android:paddingTop="10dp">
|
||||
|
||||
<TextView
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="30dp"
|
||||
android:text="@string/dark_theme"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="30dp"
|
||||
android:text="@string/theme"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewTheme"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="30dp"
|
||||
android:text="CURRENT THEME"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/light" />
|
||||
</LinearLayout>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbDarkTheme"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
@ -129,14 +141,14 @@
|
||||
android:minHeight="60dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingTop="10dp" >
|
||||
android:paddingTop="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:orientation="vertical" >
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
@ -180,14 +192,14 @@
|
||||
android:minHeight="60dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingTop="10dp" >
|
||||
android:paddingTop="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:orientation="vertical" >
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
@ -231,7 +243,7 @@
|
||||
android:minHeight="60dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingTop="10dp" >
|
||||
android:paddingTop="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
@ -265,7 +277,7 @@
|
||||
android:background="?attr/listChoiceBackgroundIndicator"
|
||||
android:minHeight="60dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingTop="10dp" >
|
||||
android:paddingTop="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -211,7 +211,7 @@
|
||||
<item >Cím</item>
|
||||
</string-array>
|
||||
<string name="invert_color">Negatív szín</string>
|
||||
<string name="dark_theme">Sötét téma használata</string>
|
||||
<string name="dark_theme">Sötét téma </string>
|
||||
<string name="change_after_restart">A téma megváltoztatásának érvénybelépéséhez indítsa újra a böngészőt.</string>
|
||||
<string name="tabs">Lapok</string>
|
||||
</resources>
|
||||
|
@ -211,7 +211,7 @@
|
||||
<item >Título</item>
|
||||
</string-array>
|
||||
<string name="invert_color">Inverter cores</string>
|
||||
<string name="dark_theme">Utilizar tema escuro</string>
|
||||
<string name="dark_theme">Tema escuro</string>
|
||||
<string name="change_after_restart">Esta opção será aplicada depois de reiniciar a aplicação.</string>
|
||||
<string name="tabs">Separadores</string>
|
||||
</resources>
|
||||
|
@ -208,7 +208,7 @@
|
||||
<item >Наслов</item>
|
||||
</string-array>
|
||||
<string name="invert_color">Обрнута боја</string>
|
||||
<string name="dark_theme">Тамна тема</string>
|
||||
<string name="change_after_restart">Промена теме ће бити извршена по поновном покретању прегледача.</string>
|
||||
<string name="tabs">Језичци</string>
|
||||
<string name="dark_theme">Тамна тема</string>
|
||||
</resources>
|
||||
|
@ -33,6 +33,22 @@
|
||||
<item name="dividerColor">@color/divider_dark</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.SettingsTheme.Black" parent="Theme.AppCompat">
|
||||
|
||||
<!-- customize the color palette -->
|
||||
<item name="toolbarSettingsBackground">@color/black</item>
|
||||
<item name="listBackground">?attr/listChoiceBackgroundIndicator</item>
|
||||
<item name="colorPrimary">@color/black</item>
|
||||
<item name="colorPrimaryDark">@color/black</item>
|
||||
<item name="colorAccent">@color/accent_color</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<item name="invertColorDrawable">@drawable/ic_action_invert_dark</item>
|
||||
<item name="textSizeDrawable">@drawable/ic_action_text_size_dark</item>
|
||||
<item name="dividerColor">@color/divider_dark</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.LightTheme" parent="Theme.AppCompat.Light">
|
||||
|
||||
<!-- customize the color palette -->
|
||||
@ -101,4 +117,35 @@
|
||||
<item name="android:windowTranslucentStatus">false</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.BlackTheme" parent="Theme.AppCompat">
|
||||
|
||||
<!-- customize the color palette -->
|
||||
<item name="searchBackground">@drawable/card_bg_elevate</item>
|
||||
<item name="colorPrimary">@color/black</item>
|
||||
<item name="colorPrimaryDark">@color/black</item>
|
||||
<item name="colorAccent">@color/accent_color</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="progressBackgroundColor">#00000000</item>
|
||||
<item name="listBackground">?attr/listChoiceBackgroundIndicator</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<item name="progressColor">@color/gray_medium</item>
|
||||
<item name="numberColor">@color/gray_dark</item>
|
||||
<item name="autoCompleteTitleColor">@color/black</item>
|
||||
<item name="autoCompleteUrlColor">@color/gray_medium</item>
|
||||
<item name="arrowBackDrawable">@drawable/ic_action_back_dark</item>
|
||||
<item name="arrowForwardDrawable">@drawable/ic_action_forward_dark</item>
|
||||
<item name="actionOverflowButtonStyle">@style/overFlowButtonStyle</item>
|
||||
<item name="drawerBackground">@color/black</item>
|
||||
<item name="plusDrawable">@drawable/ic_action_plus_dark</item>
|
||||
<item name="deleteDrawable">@drawable/ic_action_delete_dark</item>
|
||||
<item name="starDrawable">@drawable/ic_action_star_dark</item>
|
||||
<item name="tabDrawable">@drawable/ic_action_tabs_dark</item>
|
||||
<item name="dividerColor">@color/black</item>
|
||||
<item name="selectedBackground">@drawable/list_bg_dark</item>
|
||||
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
||||
<item name="android:statusBarColor">@color/black</item>
|
||||
<item name="android:windowTranslucentStatus">false</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
@ -26,4 +26,10 @@
|
||||
<item>@string/size_small</item>
|
||||
<item>@string/size_smallest</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="themes">
|
||||
<item>@string/light_theme</item>
|
||||
<item>@string/dark_theme</item>
|
||||
<item>@string/black_theme</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
|
@ -211,7 +211,10 @@
|
||||
<item >Title</item>
|
||||
</string-array>
|
||||
<string name="invert_color">Invert color</string>
|
||||
<string name="dark_theme">Use Dark Theme</string>
|
||||
<string name="dark_theme">Dark Theme</string>
|
||||
<string name="change_after_restart">The theme change will take effect after you restart the browser.</string>
|
||||
<string name="tabs">Tabs</string>
|
||||
<string name="theme">App Theme</string>
|
||||
<string name="light_theme">Light Theme</string>
|
||||
<string name="black_theme">Black Theme (AMOLED)</string>
|
||||
</resources>
|
||||
|
@ -33,6 +33,22 @@
|
||||
<item name="dividerColor">@color/divider_dark</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.SettingsTheme.Black" parent="Theme.AppCompat">
|
||||
|
||||
<!-- customize the color palette -->
|
||||
<item name="toolbarSettingsBackground">@drawable/toolbar_elevate_black</item>
|
||||
<item name="listBackground">@drawable/list_bg</item>
|
||||
<item name="colorPrimary">@color/black</item>
|
||||
<item name="colorPrimaryDark">@color/black</item>
|
||||
<item name="colorAccent">@color/accent_color</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<item name="invertColorDrawable">@drawable/ic_action_invert_dark</item>
|
||||
<item name="textSizeDrawable">@drawable/ic_action_text_size_dark</item>
|
||||
<item name="dividerColor">@color/divider_dark</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.LightTheme" parent="Theme.AppCompat.Light">
|
||||
|
||||
<!-- customize the color palette -->
|
||||
@ -89,6 +105,34 @@
|
||||
<item name="selectedBackground">@drawable/list_bg_dark</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.BlackTheme" parent="Theme.AppCompat">
|
||||
|
||||
<!-- customize the color palette -->
|
||||
<item name="searchBackground">@drawable/card_bg_elevate</item>
|
||||
<item name="colorPrimary">@color/black</item>
|
||||
<item name="colorPrimaryDark">@color/black</item>
|
||||
<item name="colorAccent">@color/accent_color</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="progressBackgroundColor">@color/black</item>
|
||||
<item name="listBackground">@drawable/list_bg</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<item name="progressColor">@color/gray_medium</item>
|
||||
<item name="numberColor">@color/gray_dark</item>
|
||||
<item name="autoCompleteTitleColor">@color/black</item>
|
||||
<item name="autoCompleteUrlColor">@color/gray_medium</item>
|
||||
<item name="arrowBackDrawable">@drawable/ic_action_back_dark</item>
|
||||
<item name="arrowForwardDrawable">@drawable/ic_action_forward_dark</item>
|
||||
<item name="actionOverflowButtonStyle">@style/overFlowButtonStyle</item>
|
||||
<item name="drawerBackground">@color/black</item>
|
||||
<item name="plusDrawable">@drawable/ic_action_plus_dark</item>
|
||||
<item name="deleteDrawable">@drawable/ic_action_delete_dark</item>
|
||||
<item name="starDrawable">@drawable/ic_action_star_dark</item>
|
||||
<item name="tabDrawable">@drawable/ic_action_tabs_dark</item>
|
||||
<item name="dividerColor">@color/black</item>
|
||||
<item name="selectedBackground">@drawable/list_bg_dark</item>
|
||||
</style>
|
||||
|
||||
<style name="overFlowButtonStyle" parent="@style/Widget.AppCompat.ActionButton.Overflow">
|
||||
<item name="android:minWidth">48dp</item>
|
||||
<item name="android:padding">0dp</item>
|
||||
|
Loading…
Reference in New Issue
Block a user