Added hint about push messages

This commit is contained in:
M66B 2016-06-27 10:25:48 +02:00
parent 0583ee4bc9
commit 62255ab181
3 changed files with 41 additions and 0 deletions

View File

@ -288,6 +288,19 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences
}
});
// Hint push messages
final LinearLayout llPush = (LinearLayout) findViewById(R.id.llPush);
Button btnPush = (Button) findViewById(R.id.btnPush);
boolean hintPush = prefs.getBoolean("hint_push", true);
llPush.setVisibility(hintPush ? View.VISIBLE : View.GONE);
btnPush.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
prefs.edit().putBoolean("hint_push", false).apply();
llPush.setVisibility(View.GONE);
}
});
// Hint system applications
final LinearLayout llSystem = (LinearLayout) findViewById(R.id.llSystem);
Button btnSystem = (Button) findViewById(R.id.btnSystem);

View File

@ -68,6 +68,33 @@
android:textAppearance="@style/TextSmall" />
</LinearLayout>
<LinearLayout
android:id="@+id/llPush"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="8dp">
<TextView
android:id="@+id/tvPush"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:text="@string/msg_push"
android:textAppearance="@style/TextSmall" />
<Button
android:id="@+id/btnPush"
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>
<LinearLayout
android:id="@+id/llSystem"
android:layout_width="match_parent"

View File

@ -181,6 +181,7 @@ Your internet traffic is not being sent to a remote VPN server.</string>
<string name="msg_queue">NetGuard is busy</string>
<string name="msg_update">Update available, tap to download</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>
<string name="msg_issue">Please describe the problem and indicate the time of the problem:</string>