Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .idea/gradle.xml

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

15 changes: 10 additions & 5 deletions .idea/misc.xml

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

Binary file added Screenshots/Add Password.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/Added List.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/Stored List.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/View Password.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/email.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/password.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 20 additions & 15 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.nitsilchar.hp.passwordStorage">

<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application
android:allowBackup="true"
Expand All @@ -12,33 +12,38 @@
android:roundIcon="@mipmap/icon"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name="com.nitsilchar.hp.passwordStorage.activity.MainActivity"
android:label="@string/manifest_label_main"></activity>
<activity android:name="com.nitsilchar.hp.passwordStorage.activity.DetailsActivity"
<activity
android:name=".activity.MainActivity"
android:label="@string/manifest_label_main" />
<activity
android:name=".activity.DetailsActivity"
android:label="Information">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.nitsilchar.hp.passwordStorage.activity.MainActivity"/>
android:value="com.nitsilchar.hp.passwordStorage.activity.MainActivity" />
</activity>
<activity android:name="com.nitsilchar.hp.passwordStorage.activity.LoginRegistrationActivity"></activity>
<activity android:name="com.nitsilchar.hp.passwordStorage.activity.LoginActivity"
<activity android:name=".activity.LoginRegistrationActivity" />
<activity
android:name=".activity.LoginActivity"
android:label="@string/manifest_label_login"
android:theme="@style/AppThemeNoBar"/>
<activity android:name="com.nitsilchar.hp.passwordStorage.activity.RegistrationActivity"
android:theme="@style/AppThemeNoBar" />
<activity
android:name=".activity.RegistrationActivity"
android:label="@string/manifest_label_register"
android:theme="@style/AppThemeNoBar"/>
<activity android:name="com.nitsilchar.hp.passwordStorage.activity.SplashActivity">
android:theme="@style/AppThemeNoBar" />
<activity android:name=".activity.SplashActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity android:name=".activity.ResetPasswordActivity"></activity>
<meta-data
android:name="io.fabric.ApiKey"
android:value="17f1fea763a098c9beeff1537f9e9c9b96034009"
/>
android:value="17f1fea763a098c9beeff1537f9e9c9b96034009" />


</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import android.widget.Button;
import android.widget.EditText;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;

import com.crashlytics.android.Crashlytics;
Expand All @@ -31,8 +32,10 @@ public class LoginActivity extends AppCompatActivity implements View.OnClickList
String str_Password, str_getEmail, str_getPass;
EditText edt_Email, edt_Password;
Button login,register, newuser;
TextView t1;
CardView cardView1,cardView2;
boolean b=false;

Properties prop;
private FirebaseAuth auth;
private ProgressBar progressBar;
Expand All @@ -55,7 +58,14 @@ protected void onCreate(Bundle savedInstanceState) {
edt_Password = (EditText) findViewById(R.id.edt_password);
cardView1=(CardView)findViewById(R.id.card1);
cardView2=(CardView)findViewById(R.id.card2);
t1=(TextView)findViewById(R.id.resetpw);
progressBar=(ProgressBar)findViewById(R.id.progressBar);
t1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(LoginActivity.this,ResetPasswordActivity.class));
}
});
b=splashActivity.containsPass("password");
if(b==true){
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
package com.nitsilchar.hp.passwordStorage.activity;

import android.content.Intent;
import android.support.annotation.NonNull;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;

import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseAuth;
import com.nitsilchar.hp.passwordStorage.R;

public class ResetPasswordActivity extends AppCompatActivity implements View.OnClickListener {

public EditText input_email;
public String et1;
public Button btnResetPass;
private TextView btnBack;
private RelativeLayout activity_forgot;

private FirebaseAuth auth;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_reset_password);

//View
input_email = (EditText)findViewById(R.id.forgot_email);
btnResetPass = (Button)findViewById(R.id.forgot_btn_reset);
btnBack = (TextView)findViewById(R.id.forgot_btn_back);
activity_forgot = (RelativeLayout)findViewById(R.id.activity_forgot_password);

btnResetPass.setOnClickListener(this);
btnBack.setOnClickListener(this);

//Init Firebase
auth = FirebaseAuth.getInstance();

}

@Override
public void onClick(View view) {

et1=input_email.getText().toString();

if(view.getId() == R.id.forgot_btn_back)
{



startActivity(new Intent(this,LoginActivity.class));
finish();
}
else
if(view.getId() == R.id.forgot_btn_reset)
{


resetPassword(input_email.getText().toString());

}
}

private void resetPassword(final String email) {
auth.sendPasswordResetEmail(email)
.addOnCompleteListener(this, new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {



if(task.isSuccessful())
{
Toast.makeText(getApplicationContext(),
"We have sent password to email: "+email, Toast.LENGTH_LONG).show();
Snackbar snackBar = Snackbar.make(activity_forgot,"We have sent password to email: "+email,Snackbar.LENGTH_SHORT);
snackBar.show();
}
else{
Toast.makeText(getApplicationContext(),
"failed!!!", Toast.LENGTH_LONG).show();
Snackbar snackBar = Snackbar.make(activity_forgot,"Failed to send password",Snackbar.LENGTH_SHORT);
snackBar.show();
}
}
});
}
}
7 changes: 7 additions & 0 deletions app/src/main/res/drawable/border.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<stroke
android:width="2dp"
android:color="#cdcdcd" />
</shape>
23 changes: 23 additions & 0 deletions app/src/main/res/drawable/button2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<corners
android:radius="14dp"
/>
<solid
android:color="#5DB060"
/>
<padding
android:left="0dp"
android:top="0dp"
android:right="0dp"
android:bottom="0dp"
/>
<size
android:width="270dp"
android:height="60dp"
/>
<stroke
android:width="3dp"
android:color="#5DB060"
/>
</shape>
23 changes: 23 additions & 0 deletions app/src/main/res/drawable/button_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<corners
android:radius="14dp"
/>
<solid
android:color="#6FD172"
/>
<padding
android:left="0dp"
android:top="0dp"
android:right="0dp"
android:bottom="0dp"
/>
<size
android:width="270dp"
android:height="60dp"
/>
<stroke
android:width="0dp"
android:color="#6FD172"
/>
</shape>
27 changes: 20 additions & 7 deletions app/src/main/res/drawable/edittext.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>

<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">

<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<corners
android:radius="14dp"
/>
<solid
android:color="#4D000000" />

android:color="#4D000000"
/>
<padding
android:left="0dp"
android:top="0dp"
android:right="0dp"
android:bottom="0dp"
/>
<size
android:width="270dp"
android:height="60dp"
/>
<stroke
android:width="3dp"
android:color="#4D000000"
/>
</shape>
20 changes: 18 additions & 2 deletions app/src/main/res/layout-sw320dp/activity_login.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
android:textStyle="bold" />

<LinearLayout
android:background="@drawable/border"
android:padding="15dp"

android:id="@+id/layout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand All @@ -27,6 +30,7 @@
android:orientation="vertical">

<LinearLayout
android:layout_marginTop="80dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
Expand Down Expand Up @@ -75,7 +79,7 @@
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="@dimen/space"
android:background="@drawable/greenbutton">
android:background="@drawable/button_background">

<Button
android:id="@+id/btn_login"
Expand All @@ -94,12 +98,24 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:layout_marginTop="10dp"
android:gravity="center"
android:background="?attr/selectableItemBackground"
android:background="@drawable/button2"
android:text="@string/newuser"
android:textColor="@android:color/white"
android:textSize="@dimen/space"
android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/resetpw"
android:layout_marginTop="@dimen/header_text_marginTop"
android:fontFamily="sans-serif-smallcaps"
android:gravity="center"
android:text="@string/res"
android:textColor="@android:color/white"
android:textStyle="bold" />


</LinearLayout>

Expand Down
Loading