More themes, improvements, updated FAQ

This commit is contained in:
M66B 2016-01-03 09:10:12 +01:00
parent 730844b3cc
commit c1d207c0eb
7 changed files with 118 additions and 23 deletions

16
FAQ.md
View File

@ -14,8 +14,8 @@ Frequently Asked Questions (FAQ)
You can use the settings menu to change from blacklist mode (allow all in *Settings* but block unwanted applications in list) to whitelist mode (block all in *Settings* but allow favorite applications in list).
* Orange = denied internet access
* Green = allowed internet access
* Red/orange/yellow/amber = internet access denied
* Teal/blue/purple/grey = internet access allowd
<a name="FAQ1"></a>
**(1) Can NetGuard completely protect my privacy?**
@ -164,6 +164,12 @@ If you block internet access for an application, there is no way around it.
However, applications could access the internet through other applications, like Google Play services.
You can prevent this by blocking internet access for the other application as well.
Note that some applications keep trying to access the internet,
which is done by sending a connection request packet.
This packet goes into the VPN sinkhole when internet access for the application is blocked.
This packet consists of less than 100 bytes and is counted as outgoing traffic
and will be visible in the speed graph notification as well.
<a name="FAQ20"></a>
**(20) Can I Greenify/hibernate NetGuard?**
@ -210,12 +216,6 @@ There is no need for a select all function,
because you can switch from black list to white list mode using the settings.
See also [question 0](#FAQ0).
<a name="FAQ26"></a>
**(26) Can you make the colors configurable?**
NetGuard is not an application you will use regularly once you have setup the rules,
so IMHO it is not worth the effort to make the colors configurable.
<br />
**If you didn't found the answer to your question, you can ask your questions [here](http://forum.xda-developers.com/showthread.php?t=3233012)**.

View File

@ -258,6 +258,14 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences
public void onReady(IAB iab) {
try {
iab.updatePurchases();
if (!IAB.isPurchased(ActivityPro.SKU_THEME, ActivityMain.this)) {
if (!"teal".equals(prefs.getString("theme", "teal")))
prefs.edit().putString("theme", "teal").apply();
}
if (!IAB.isPurchased(ActivityPro.SKU_SPEED, ActivityMain.this))
prefs.edit().putBoolean("show_stats", false).apply();
iab.unbind();
} catch (Throwable ex) {
Log.e(TAG, ex.toString() + "\n" + Log.getStackTraceString(ex));

View File

@ -734,7 +734,7 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
enabled = Boolean.parseBoolean(value);
else {
// Pro features
if (current == application) {
if (current == application)
if ("theme".equals(key)) {
if (!IAB.isPurchased(ActivityPro.SKU_THEME, context))
return;
@ -742,7 +742,6 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
if (!IAB.isPurchased(ActivityPro.SKU_SPEED, context))
return;
}
}
if ("boolean".equals(type))
current.put(key, Boolean.parseBoolean(value));

View File

@ -319,6 +319,12 @@ public class Util {
context.setTheme(dark ? R.style.AppThemeTealDark : R.style.AppThemeTeal);
else if (theme.equals("blue"))
context.setTheme(dark ? R.style.AppThemeBlueDark : R.style.AppThemeBlue);
else if (theme.equals("purple"))
context.setTheme(dark ? R.style.AppThemePurpleDark : R.style.AppThemePurple);
else if (theme.equals("amber"))
context.setTheme(dark ? R.style.AppThemeAmberDark : R.style.AppThemeAmber);
else if (theme.equals("orange"))
context.setTheme(dark ? R.style.AppThemeOrangeDark : R.style.AppThemeOrange);
}
public static int dips2pixels(int dips, Context context) {

View File

@ -1,20 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Teal 500 -->
<color name="colorTealPrimary">#009688</color>
<!-- Teal 600-->
<color name="colorTealPrimaryDark">#00796B</color>
<!-- Deep orange A200 -->
<color name="colorTealAccent">#FF5722</color>
<!-- https://www.materialpalette.com/teal/deep-orange -->
<color name="colorTealPrimary">#009688</color>
<color name="colorTealPrimaryDark">#00796B</color>
<color name="colorTealAccent">#FF5722</color>
<color name="colorTealOn">#009688</color>
<color name="colorTealOff">#FF5722</color>
<color name="colorBluePrimary">#0066CC</color>
<color name="colorBluePrimaryDark">#003366</color>
<color name="colorBlueAccent">#FF3333</color>
<color name="colorBlueOn">#0066CC</color>
<color name="colorBlueOff">#FF3333</color>
<color name="colorBluePrimary">#2196F3</color>
<color name="colorBluePrimaryDark">#1976D2</color>
<color name="colorBlueAccent">#FF5722</color>
<color name="colorBlueOn">#2196F3</color>
<color name="colorBlueOff">#FF5722</color>
<color name="colorPurplePrimary">#9C27B0</color>
<color name="colorPurplePrimaryDark">#7B1FA2</color>
<color name="colorPurpleAccent">#FF5252</color>
<color name="colorPurpleOn">#9C27B0</color>
<color name="colorPurpleOff">#FF5252</color>
<color name="colorAmberPrimary">#FFC107</color>
<color name="colorAmberPrimaryDark">#FFA000</color>
<color name="colorAmberAccent">#448AFF</color>
<color name="colorAmberOn">#448AFF</color>
<color name="colorAmberOff">#FFC107</color>
<color name="colorOrangePrimary">#FF5722</color>
<color name="colorOrangePrimaryDark">#E64A19</color>
<color name="colorOrangeAccent">#607D8B</color>
<color name="colorOrangeOn">#607D8B</color>
<color name="colorOrangeOff">#FF5722</color>
<color name="colorSend">#FF0000</color>
<color name="colorReceive">#0000FF</color>

View File

@ -109,13 +109,19 @@ Since NetGuard has no internet permission, you know your internet traffic is not
<string name="title_pro_reponse">Response</string>
<string-array name="themeNames">
<item>Teal/Orange</item>
<item>Blue/Red</item>
<item>teal/orange</item>
<item>blue/orange</item>
<item>purple/red</item>
<item>amber/blue</item>
<item>orange/grey</item>
</string-array>
<string-array name="themeValues" translatable="false">
<item>teal</item>
<item>blue</item>
<item>purple</item>
<item>amber</item>
<item>orange</item>
</string-array>
<string name="fingerprint" translatable="false">ef46f813d2c8a064d72c936b9b96d1cccc989378</string>

View File

@ -42,4 +42,64 @@
<item name="expander">@drawable/expander_white</item>
<item name="android:windowDisablePreview">true</item>
</style>
<style name="AppThemePurple" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/colorPurplePrimary</item>
<item name="colorPrimaryDark">@color/colorPurplePrimaryDark</item>
<item name="colorAccent">@color/colorPurpleAccent</item>
<item name="colorOn">@color/colorPurpleOn</item>
<item name="colorOff">@color/colorPurpleOff</item>
<item name="expander">@drawable/expander_black</item>
<item name="android:windowDisablePreview">true</item>
</style>
<style name="AppThemePurpleDark" parent="Theme.AppCompat">
<item name="colorPrimary">@color/colorPurplePrimary</item>
<item name="colorPrimaryDark">@color/colorPurplePrimaryDark</item>
<item name="colorAccent">@color/colorPurpleAccent</item>
<item name="colorOn">@color/colorPurpleOn</item>
<item name="colorOff">@color/colorPurpleOff</item>
<item name="expander">@drawable/expander_white</item>
<item name="android:windowDisablePreview">true</item>
</style>
<style name="AppThemeAmber" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/colorAmberPrimary</item>
<item name="colorPrimaryDark">@color/colorAmberPrimaryDark</item>
<item name="colorAccent">@color/colorAmberAccent</item>
<item name="colorOn">@color/colorAmberOn</item>
<item name="colorOff">@color/colorAmberOff</item>
<item name="expander">@drawable/expander_black</item>
<item name="android:windowDisablePreview">true</item>
</style>
<style name="AppThemeAmberDark" parent="Theme.AppCompat">
<item name="colorPrimary">@color/colorAmberPrimary</item>
<item name="colorPrimaryDark">@color/colorAmberPrimaryDark</item>
<item name="colorAccent">@color/colorAmberAccent</item>
<item name="colorOn">@color/colorAmberOn</item>
<item name="colorOff">@color/colorAmberOff</item>
<item name="expander">@drawable/expander_white</item>
<item name="android:windowDisablePreview">true</item>
</style>
<style name="AppThemeOrange" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/colorOrangePrimary</item>
<item name="colorPrimaryDark">@color/colorOrangePrimaryDark</item>
<item name="colorAccent">@color/colorOrangeAccent</item>
<item name="colorOn">@color/colorOrangeOn</item>
<item name="colorOff">@color/colorOrangeOff</item>
<item name="expander">@drawable/expander_black</item>
<item name="android:windowDisablePreview">true</item>
</style>
<style name="AppThemeOrangeDark" parent="Theme.AppCompat">
<item name="colorPrimary">@color/colorOrangePrimary</item>
<item name="colorPrimaryDark">@color/colorOrangePrimaryDark</item>
<item name="colorAccent">@color/colorOrangeAccent</item>
<item name="colorOn">@color/colorOrangeOn</item>
<item name="colorOff">@color/colorOrangeOff</item>
<item name="expander">@drawable/expander_white</item>
<item name="android:windowDisablePreview">true</item>
</style>
</resources>