Commit 56ddcc60 authored by Gilbert Ndresaj's avatar Gilbert Ndresaj

Custom Icon Color

parent f6982c69
......@@ -196,6 +196,12 @@ public class SettingsActivity extends ThemedActivity {
}, getAccentColor());
}
@OnClick(R.id.ll_custom_icon_color)
public void onChangedCustomIconClicked(View view) {
updateTheme();
updateUiElements();
}
@OnClick(R.id.ll_white_list)
public void onWhiteListClicked(View view) {
startActivity(new Intent(getApplicationContext(), BlackWhiteListActivity.class));
......
......@@ -45,6 +45,7 @@ public abstract class ThemedActivity extends AppCompatActivity implements UiElem
private boolean coloredNavBar;
private boolean obscuredStatusBar;
private boolean applyThemeSingleImgAct;
private boolean customIconColor;
@Override
......@@ -68,6 +69,7 @@ public abstract class ThemedActivity extends AppCompatActivity implements UiElem
coloredNavBar = SP.getBoolean(getString(R.string.preference_colored_nav_bar), false);
obscuredStatusBar = SP.getBoolean(getString(R.string.preference_translucent_status_bar),true);
applyThemeSingleImgAct = SP.getBoolean(getString(R.string.preference_apply_theme_pager), true);
customIconColor = SP.getBoolean(getString(R.string.preference_custom_icon_color), false);
}
@CallSuper
......
......@@ -150,10 +150,12 @@ public class ThemeHelper {
}
public int getIconColor(){
switch (baseTheme){
case DARK: case AMOLED: return getColor(org.horaapps.leafpic.R.color.md_white_1000);
case LIGHT: default: return getColor(org.horaapps.leafpic.R.color.md_light_primary_icon);
}
if(!(SP.getBoolean(this.context.getString(R.string.preference_custom_icon_color), false))){
switch (baseTheme){
case DARK: case AMOLED: return getColor(org.horaapps.leafpic.R.color.md_white_1000);
case LIGHT: default: return getColor(org.horaapps.leafpic.R.color.md_light_primary_icon);
}
} else return getAccentColor();
}
public int getButtonBackgroundColor(){
......
......@@ -170,6 +170,18 @@
app:settingIcon="gmd-dashboard"
app:settingTitle="@string/album_card_view"/>
<!-- CUSTOM ICON COLOR -->
<org.horaapps.leafpic.views.SettingWithSwitchView
android:id="@+id/ll_custom_icon_color"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:settingCaption="@string/custom_icon_color_sub"
app:settingDefaultValue="false"
app:settingIcon="gmd-border-color"
app:settingMinApi="21"
app:settingPreferenceKey="@string/preference_custom_icon_color"
app:settingTitle="@string/custom_icon_color"/>
<!-- TRANSLUCENT STATUS BAR-->
<org.horaapps.leafpic.views.SettingWithSwitchView
android:id="@+id/option_statusbar"
......
......@@ -17,6 +17,7 @@
<string name="preference_transparency">set_alpha</string>
<string name="preference_map_provider">map_provider</string>
<string name="preference_show_tips">show_tips</string>
<string name="preference_custom_icon_color">custom_icon_color</string>
<string name="preference_internal_uri_extsdcard_photos">uri_extsdcard_photos</string>
<string name="preference_show_fab">show_fab</string>
......
......@@ -218,6 +218,8 @@ and this could make the media inaccessible from other apps. Use the exclude opti
<string name="colored_navbar_sub">Apply the primary color to the navigation bar.</string>
<string name="internal_player">Internal Video Player</string>
<string name="internal_player_sub">Use the embedded video player</string>
<string name="custom_icon_color">Custom Icon Color</string>
<string name="custom_icon_color_sub">Apply Accent color on icons.</string>
<!--DONATE STRINGS-->
<string name="donate_googleplay">Google Play Store</string>
......
......@@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.4.0-alpha4'
classpath 'com.android.tools.build:gradle:2.4.0-alpha5'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment