From afc40e92af93b73b070cd4bcf7c43c006d0b7068 Mon Sep 17 00:00:00 2001 From: Surya Dhanush Date: Mon, 14 Sep 2020 14:44:13 +0530 Subject: [PATCH] Add Whatsnew activity Update README.md Signed-off-by: Surya Dhanush --- .idea/markdown-navigator-enh.xml | 29 ++++++++++ .idea/markdown-navigator.xml | 55 +++++++++++++++++++ README.md | 4 ++ .../java/com/cyberviy/ViyP/AboutActivity.java | 47 ++++++++++++++++ app/src/main/java/com/cyberviy/ViyP/Help.java | 8 ++- app/src/main/res/layout/activity_about.xml | 25 ++++++++- app/src/main/res/layout/activity_help.xml | 1 + app/src/main/res/layout/list_items.xml | 9 +-- app/src/main/res/layout/list_whats_new.xml | 10 ++++ app/src/main/res/values/dimens.xml | 3 +- 10 files changed, 180 insertions(+), 11 deletions(-) create mode 100644 .idea/markdown-navigator-enh.xml create mode 100644 .idea/markdown-navigator.xml create mode 100644 app/src/main/res/layout/list_whats_new.xml diff --git a/.idea/markdown-navigator-enh.xml b/.idea/markdown-navigator-enh.xml new file mode 100644 index 0000000..12fb99d --- /dev/null +++ b/.idea/markdown-navigator-enh.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/markdown-navigator.xml b/.idea/markdown-navigator.xml new file mode 100644 index 0000000..4463382 --- /dev/null +++ b/.idea/markdown-navigator.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/README.md b/README.md index ed444fd..5296d70 100644 --- a/README.md +++ b/README.md @@ -33,5 +33,9 @@ **8) OPEN SOURCE** - We are open source, That means full transparency. +**Thanks to** +- iam-v0id (Suggestions and README) + + # SCREENSHOTS diff --git a/app/src/main/java/com/cyberviy/ViyP/AboutActivity.java b/app/src/main/java/com/cyberviy/ViyP/AboutActivity.java index e458b9c..5728f0f 100644 --- a/app/src/main/java/com/cyberviy/ViyP/AboutActivity.java +++ b/app/src/main/java/com/cyberviy/ViyP/AboutActivity.java @@ -1,14 +1,61 @@ package com.cyberviy.ViyP; +import android.content.pm.PackageInfo; +import android.content.pm.PackageManager; import android.os.Bundle; +import android.view.MenuItem; +import android.widget.ArrayAdapter; +import android.widget.ListView; +import android.widget.TextView; +import androidx.appcompat.app.ActionBar; import androidx.appcompat.app.AppCompatActivity; public class AboutActivity extends AppCompatActivity { + TextView ver; + + String version; + String[] whatsnew = { + "Improved UI", + "Fingerprint Auth", + "Secure core mode v1.SCM", + "Random Password Generator v1.RPG", + "Add passwords from RPG using copy", + "Minor Bug fixes and Improvements", + }; + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_about); + try { + PackageInfo pInfo = getApplicationContext().getPackageManager().getPackageInfo(getPackageName(), 0); + version = "Version " + pInfo.versionName; + } catch (PackageManager.NameNotFoundException e) { + e.printStackTrace(); + } + ver = findViewById(R.id.version); + ver.setText(version); + ActionBar actionBar = getSupportActionBar(); + if (actionBar != null) { + actionBar.setDisplayHomeAsUpEnabled(true); + } + + ArrayAdapter adapter = new ArrayAdapter(this, R.layout.list_whats_new, whatsnew); + ListView listView = findViewById(R.id.listView); + listView.setAdapter(adapter); + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + switch (item.getItemId()) { + case android.R.id.home: + // app icon in action bar clicked; goto parent activity. + this.finish(); + return true; + default: + return super.onOptionsItemSelected(item); + } } } \ No newline at end of file diff --git a/app/src/main/java/com/cyberviy/ViyP/Help.java b/app/src/main/java/com/cyberviy/ViyP/Help.java index f8abb8e..4847676 100644 --- a/app/src/main/java/com/cyberviy/ViyP/Help.java +++ b/app/src/main/java/com/cyberviy/ViyP/Help.java @@ -28,6 +28,8 @@ protected void onCreate(Bundle savedInstanceState) { } ver = findViewById(R.id.version); ver.setText(version); + + ActionBar actionBar = getSupportActionBar(); if (actionBar != null) { actionBar.setDisplayHomeAsUpEnabled(true); @@ -38,10 +40,14 @@ public void githubLink(View view) { Intent intent = new Intent(); intent.setAction(Intent.ACTION_VIEW); intent.addCategory(Intent.CATEGORY_BROWSABLE); - intent.setData(Uri.parse(String.format("https://github.com/%s", "suryaViyyapu/viyP"))); + intent.setData(Uri.parse(String.format("https://github.com/%s", "suryaviyyapu/viyp"))); startActivity(intent); } + public void whats_new(View view) { + startActivity(new Intent(this, AboutActivity.class)); + } + @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { diff --git a/app/src/main/res/layout/activity_about.xml b/app/src/main/res/layout/activity_about.xml index fe43886..1eabd26 100644 --- a/app/src/main/res/layout/activity_about.xml +++ b/app/src/main/res/layout/activity_about.xml @@ -1,8 +1,29 @@ - - \ No newline at end of file + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_help.xml b/app/src/main/res/layout/activity_help.xml index 0dbc12e..ca65f7d 100644 --- a/app/src/main/res/layout/activity_help.xml +++ b/app/src/main/res/layout/activity_help.xml @@ -77,6 +77,7 @@ android:layout_weight="1" android:fontFamily="@font/capriola" android:gravity="center" + android:onClick="whats_new" android:text="What\'s new" /> diff --git a/app/src/main/res/layout/list_items.xml b/app/src/main/res/layout/list_items.xml index 062bd0f..37bb236 100644 --- a/app/src/main/res/layout/list_items.xml +++ b/app/src/main/res/layout/list_items.xml @@ -33,7 +33,7 @@ - - - - - diff --git a/app/src/main/res/layout/list_whats_new.xml b/app/src/main/res/layout/list_whats_new.xml new file mode 100644 index 0000000..eac9e47 --- /dev/null +++ b/app/src/main/res/layout/list_whats_new.xml @@ -0,0 +1,10 @@ + + + \ No newline at end of file diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index d7ed78b..effb392 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -3,7 +3,8 @@ 16dp 16dp 50dp - 16sp + 18sp + 24sp 30dp