Skip to content

Commit

Permalink
Add Whatsnew activity
Browse files Browse the repository at this point in the history
Update README.md

Signed-off-by: Surya Dhanush <[email protected]>
  • Loading branch information
suryaviyyapu committed Sep 14, 2020
1 parent ec4c951 commit afc40e9
Show file tree
Hide file tree
Showing 10 changed files with 180 additions and 11 deletions.
29 changes: 29 additions & 0 deletions .idea/markdown-navigator-enh.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

55 changes: 55 additions & 0 deletions .idea/markdown-navigator.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,9 @@
**8) OPEN SOURCE**
- We are open source, That means full transparency.

**Thanks to**
- <a href="https://github.com/iam-v0id">iam-v0id</a> (Suggestions and README)


# SCREENSHOTS
<img src=https://github.com/suryaviyyapu/ViyP/blob/master/screenshots/1.jpg width="270" height="565"> <img src=https://github.com/suryaviyyapu/ViyP/blob/master/screenshots/2.jpg width="270" height="565"> <img src=https://github.com/suryaviyyapu/ViyP/blob/master/screenshots/3.jpg width="270" height="565">
47 changes: 47 additions & 0 deletions app/src/main/java/com/cyberviy/ViyP/AboutActivity.java
Original file line number Diff line number Diff line change
@@ -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);
}
}
}
8 changes: 7 additions & 1 deletion app/src/main/java/com/cyberviy/ViyP/Help.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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()) {
Expand Down
25 changes: 23 additions & 2 deletions app/src/main/res/layout/activity_about.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".AboutActivity">

</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Version"
android:layout_margin="5dp"
android:textSize="@dimen/text_hi_size" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Changelog"
android:layout_margin="5dp"
android:textSize="@dimen/text_medium_size" />

<ListView
android:id="@+id/listView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:listitem="@layout/list_whats_new" />
</LinearLayout>
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_help.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
android:layout_weight="1"
android:fontFamily="@font/capriola"
android:gravity="center"
android:onClick="whats_new"
android:text="What\'s new" />
</LinearLayout>

Expand Down
9 changes: 2 additions & 7 deletions app/src/main/res/layout/list_items.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<TextView
android:id="@+id/provider"
android:maxLines="2"
android:textSize="@dimen/text_medium_size"
android:textSize="@dimen/default_text_size"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLength="24"
Expand All @@ -45,17 +45,12 @@
<TextView
android:id="@+id/imp_cat"
android:padding="4dp"
android:textSize="@dimen/text_medium_size"
android:textSize="@dimen/default_text_size"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/capriola"
android:textAppearance="?attr/textAppearanceBody1"
android:text="Mail" />
<!-- <TextView-->
<!-- android:id="@+id/imp_cat2"-->
<!-- android:text="P******d"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"/>-->


</LinearLayout>
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/res/layout/list_whats_new.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?><!-- Single List Item Design -->

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/label"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10dip"
android:textSize="16sp"
android:fontFamily="@font/capriola"
android:textStyle="normal"></TextView>
3 changes: 2 additions & 1 deletion app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="text_view_size">50dp</dimen>
<dimen name="text_medium_size">16sp</dimen>
<dimen name="text_medium_size">18sp</dimen>
<dimen name="text_hi_size">24sp</dimen>

<!--SLIDE-->
<dimen name="dots_height">30dp</dimen>
Expand Down

0 comments on commit afc40e9

Please sign in to comment.