From 80ae3dcead04666853f2ffe182fefd28776fb406 Mon Sep 17 00:00:00 2001 From: parveshdhull Date: Fri, 27 Nov 2020 06:14:54 +0530 Subject: [PATCH] Updated Info --- app/build.gradle | 2 +- app/release/output-metadata.json | 2 +- .../Activites/MainActivity.java | 29 ++++++++ app/src/main/res/layout/activity_main.xml | 14 ++++ .../res/layout/custom_message_contact.xml | 69 +++++++++++++++++++ app/src/main/res/values/styles.xml | 2 + 6 files changed, 116 insertions(+), 2 deletions(-) create mode 100755 app/src/main/res/layout/custom_message_contact.xml diff --git a/app/build.gradle b/app/build.gradle index 7ec4c83..a6c5625 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,7 +9,7 @@ android { minSdkVersion 17 targetSdkVersion 29 versionCode 5 - versionName "1.4" + versionName "1.5" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json index c2401eb..6ad935f 100644 --- a/app/release/output-metadata.json +++ b/app/release/output-metadata.json @@ -12,7 +12,7 @@ "filters": [], "properties": [], "versionCode": 5, - "versionName": "1.4", + "versionName": "1.5", "enabled": true, "outputFile": "app-release.apk" } diff --git a/app/src/main/java/espero/jiofibatterynotifier/Activites/MainActivity.java b/app/src/main/java/espero/jiofibatterynotifier/Activites/MainActivity.java index f31ef91..9806503 100644 --- a/app/src/main/java/espero/jiofibatterynotifier/Activites/MainActivity.java +++ b/app/src/main/java/espero/jiofibatterynotifier/Activites/MainActivity.java @@ -5,8 +5,10 @@ import androidx.browser.customtabs.CustomTabsIntent; import androidx.core.content.ContextCompat; +import android.app.Activity; import android.app.ActivityManager; import android.app.AlertDialog; +import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; @@ -27,6 +29,7 @@ import android.os.Vibrator; import android.provider.Settings; import android.util.Log; +import android.view.LayoutInflater; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; @@ -42,6 +45,8 @@ import com.android.volley.toolbox.StringRequest; import com.android.volley.toolbox.Volley; +import java.util.concurrent.Callable; + import espero.jiofibatterynotifier.Classes.SharedPrefMain; import espero.jiofibatterynotifier.Classes.StartUpBootReceiver; import espero.jiofibatterynotifier.R; @@ -401,4 +406,28 @@ protected void onStop() { super.onStop(); } + + public void about(View view2){ + + try { + if(!isFinishing()) { + View view = (LayoutInflater.from(this)).inflate(R.layout.custom_message_contact, null); + + AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.DialogBoxTheme); + builder.setView(view); + builder.setCancelable(false); + builder.setPositiveButton("Ok",null); + + Dialog dialog = builder.create(); + dialog.setCancelable(false); + dialog.setCanceledOnTouchOutside(false); + dialog.show(); + + } + } catch (Exception e) { + e.printStackTrace(); + } + + + } } diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index bb3a546..c3e2ad5 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -221,6 +221,20 @@ +