1
0
Fork 0
mirror of https://github.com/M66B/NetGuard.git synced 2024-12-24 16:56:18 +00:00

Added refresh menu

This commit is contained in:
M66B 2015-10-26 09:53:17 +01:00
parent 16c5e9e22d
commit 4cf6c952f4
8 changed files with 10 additions and 0 deletions

View file

@ -206,6 +206,10 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences
// Handle item selection
switch (item.getItemId()) {
case R.id.menu_refresh:
fillApplicationList();
return true;
case R.id.menu_whitelist_wifi:
prefs.edit().putBoolean("whitelist_wifi", !prefs.getBoolean("whitelist_wifi", true)).apply();
fillApplicationList();

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 734 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

View file

@ -7,6 +7,11 @@
android:title="@string/menu_search"
netguard:actionViewClass="android.support.v7.widget.SearchView"
netguard:showAsAction="ifRoom|collapseActionView" />
<item
android:id="@+id/menu_refresh"
android:icon="@drawable/ic_refresh_white_24dp"
android:title="@string/menu_refresh"
netguard:showAsAction="ifRoom" />
<item
android:id="@+id/menu_whitelist_wifi"
android:checkable="true"

View file

@ -3,6 +3,7 @@
<string name="app_copyright" translatable="false">Copyright \u00A9 2015 by M. Bokhorst (M66B)</string>
<string name="menu_search">Search applications</string>
<string name="menu_refresh">Refresh applications</string>
<string name="menu_whitelist_wifi">Default block Wi-Fi</string>
<string name="menu_whitelist_other">Default block mobile</string>
<string name="menu_reset_wifi">Reset Wi-Fi rules</string>