mirror of https://github.com/M66B/NetGuard.git
Added brief usage instruction
This commit is contained in:
parent
3903519da6
commit
5b4b604ee1
|
@ -277,6 +277,19 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences
|
|||
}
|
||||
});
|
||||
|
||||
// Hint usage
|
||||
final LinearLayout llUsage = (LinearLayout) findViewById(R.id.llUsage);
|
||||
Button btnUsage = (Button) findViewById(R.id.btnUsage);
|
||||
boolean hintUsage = prefs.getBoolean("hint_usage", true);
|
||||
llUsage.setVisibility(hintUsage ? View.VISIBLE : View.GONE);
|
||||
btnUsage.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
prefs.edit().putBoolean("hint_usage", false).apply();
|
||||
llUsage.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
|
||||
// Hint white listing
|
||||
final LinearLayout llWhitelist = (LinearLayout) findViewById(R.id.llWhitelist);
|
||||
Button btnWhitelist = (Button) findViewById(R.id.btnWhitelist);
|
||||
|
|
|
@ -21,13 +21,39 @@
|
|||
android:id="@+id/tvDisabled"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:padding="8dp"
|
||||
android:text="@string/msg_disabled"
|
||||
android:textAppearance="@style/TextMedium"
|
||||
android:textColor="?attr/colorOff"
|
||||
android:visibility="gone" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llUsage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/msg_usage"
|
||||
android:textAppearance="@style/TextSmall" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnUsage"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="@android:string/ok"
|
||||
android:textAppearance="@style/TextSmall" />
|
||||
</LinearLayout>
|
||||
|
||||
<android.support.v4.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipeRefresh"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -47,10 +73,10 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp">
|
||||
android:padding="8dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvWhitelist"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
|
@ -74,10 +100,10 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp">
|
||||
android:padding="8dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPush"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
|
@ -101,10 +127,10 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp">
|
||||
android:padding="8dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSystem"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
|
|
|
@ -184,6 +184,7 @@ Your internet traffic is not being sent to a remote VPN server.</string>
|
|||
<string name="msg_metered">Network is metered</string>
|
||||
<string name="msg_queue">NetGuard is busy</string>
|
||||
<string name="msg_update">Update available, tap to download</string>
|
||||
<string name="msg_usage">You can allow (greenish) or deny (reddish) Wi-Fi or mobile internet access to by tapping on the icons next to an application</string>
|
||||
<string name="msg_whitelist">Internet access is allowed by default, this can be changed in the settings</string>
|
||||
<string name="msg_push">Push messages are mostly handled by the system component Play services, which is allowed internet access by default</string>
|
||||
<string name="msg_system">Managing system applications can be enabled in the settings</string>
|
||||
|
|
Loading…
Reference in New Issue