From 62255ab18190110be0861585357ab62b5412c1e8 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 27 Jun 2016 10:25:48 +0200 Subject: [PATCH] Added hint about push messages --- .../eu/faircode/netguard/ActivityMain.java | 13 +++++++++ app/src/main/res/layout/main.xml | 27 +++++++++++++++++++ app/src/main/res/values/strings.xml | 1 + 3 files changed, 41 insertions(+) diff --git a/app/src/main/java/eu/faircode/netguard/ActivityMain.java b/app/src/main/java/eu/faircode/netguard/ActivityMain.java index 34a3178a..45f13664 100644 --- a/app/src/main/java/eu/faircode/netguard/ActivityMain.java +++ b/app/src/main/java/eu/faircode/netguard/ActivityMain.java @@ -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); diff --git a/app/src/main/res/layout/main.xml b/app/src/main/res/layout/main.xml index 09a29e8d..393b78d8 100644 --- a/app/src/main/res/layout/main.xml +++ b/app/src/main/res/layout/main.xml @@ -68,6 +68,33 @@ android:textAppearance="@style/TextSmall" /> + + + + +