diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..7643783
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ xmlns:android
+
+ ^$
+
+
+
+
+
+
+
+
+ xmlns:.*
+
+ ^$
+
+
+ BY_NAME
+
+
+
+
+
+
+ .*:id
+
+ http://schemas.android.com/apk/res/android
+
+
+
+
+
+
+
+
+ .*:name
+
+ http://schemas.android.com/apk/res/android
+
+
+
+
+
+
+
+
+ name
+
+ ^$
+
+
+
+
+
+
+
+
+ style
+
+ ^$
+
+
+
+
+
+
+
+
+ .*
+
+ ^$
+
+
+ BY_NAME
+
+
+
+
+
+
+ .*
+
+ http://schemas.android.com/apk/res/android
+
+
+ ANDROID_ATTRIBUTE_ORDER
+
+
+
+
+
+
+ .*
+
+ .*
+
+
+ BY_NAME
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
new file mode 100644
index 0000000..79ee123
--- /dev/null
+++ b/.idea/codeStyles/codeStyleConfig.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 625b371..e9969a1 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -7,7 +7,7 @@
-
+
diff --git a/app/src/main/java/com/hazard/samarpan/UserLoginFragment.kt b/app/src/main/java/com/hazard/samarpan/UserLoginFragment.kt
index e75be4d..5acb7df 100644
--- a/app/src/main/java/com/hazard/samarpan/UserLoginFragment.kt
+++ b/app/src/main/java/com/hazard/samarpan/UserLoginFragment.kt
@@ -6,7 +6,7 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Button
-import android.widget.TextView
+import android.widget.LinearLayout
import android.widget.Toast
import androidx.fragment.app.Fragment
import com.google.android.material.textfield.TextInputEditText
@@ -17,8 +17,7 @@ import com.google.firebase.ktx.Firebase
class UserLoginFragment: Fragment() {
private var itemView: View?=null
-
- private var userSignUp: TextView?=null
+ private var userSignUp: LinearLayout?=null
private var email: TextInputEditText?=null
private var password: TextInputEditText?=null
private var btnLogin: Button?=null
@@ -55,10 +54,10 @@ class UserLoginFragment: Fragment() {
if(task.isSuccessful){
// logic for navigating to the dashboard
- Toast.makeText(activity,"Logged in Successfully", Toast.LENGTH_LONG).show()
+ Toast.makeText(activity,"Logged in Successfully", Toast.LENGTH_SHORT).show()
}
else{
- Toast.makeText(activity,task.exception!!.message.toString(), Toast.LENGTH_LONG).show()
+ Toast.makeText(activity,task.exception!!.message.toString(), Toast.LENGTH_SHORT).show()
}
}
}
diff --git a/app/src/main/java/com/hazard/samarpan/UserRegisterFragment.kt b/app/src/main/java/com/hazard/samarpan/UserRegisterFragment.kt
index 41d6854..ee5432f 100644
--- a/app/src/main/java/com/hazard/samarpan/UserRegisterFragment.kt
+++ b/app/src/main/java/com/hazard/samarpan/UserRegisterFragment.kt
@@ -51,8 +51,10 @@ class UserRegisterFragment: Fragment(){
btnRegister?.setOnClickListener{
val mail=email?.text.toString().trim()
val pass=password?.text.toString().trim()
- if(TextUtils.isEmpty(mail) || TextUtils.isEmpty(pass)){
+ if(TextUtils.isEmpty(mail)){
email?.error = "Email cannot be empty"
+ }
+ if(TextUtils.isEmpty(pass)){
password?.error = "Password cannot be empty"
}
if (!(mail.matches(emailPattern.toRegex()))) {
@@ -68,7 +70,7 @@ class UserRegisterFragment: Fragment(){
//if registration is done successfully
if(task.isSuccessful){
- Toast.makeText(activity,"You were registered successfully.", Toast.LENGTH_LONG).show()
+ Toast.makeText(activity,"You were registered successfully.", Toast.LENGTH_SHORT).show()
/* add the intent to go to the main dashboard of the application and also add finish() so that
if the user presses back after registration they don't go back to the registration page
it basically clears all the previous activities
diff --git a/app/src/main/res/drawable/login_background.xml b/app/src/main/res/drawable/login_background.xml
deleted file mode 100644
index 89304e2..0000000
--- a/app/src/main/res/drawable/login_background.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/app/src/main/res/drawable/login_button.xml b/app/src/main/res/drawable/login_button.xml
index 480a1b2..892c643 100644
--- a/app/src/main/res/drawable/login_button.xml
+++ b/app/src/main/res/drawable/login_button.xml
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/app/src/main/res/font/righteous.ttf b/app/src/main/res/font/righteous.ttf
new file mode 100644
index 0000000..cc556d5
Binary files /dev/null and b/app/src/main/res/font/righteous.ttf differ
diff --git a/app/src/main/res/font/roboto.xml b/app/src/main/res/font/roboto.xml
new file mode 100644
index 0000000..2641caf
--- /dev/null
+++ b/app/src/main/res/font/roboto.xml
@@ -0,0 +1,7 @@
+
+
+
diff --git a/app/src/main/res/font/roboto_medium.ttf b/app/src/main/res/font/roboto_medium.ttf
new file mode 100644
index 0000000..4b4e1c6
Binary files /dev/null and b/app/src/main/res/font/roboto_medium.ttf differ
diff --git a/app/src/main/res/layout/user_login_fragment.xml b/app/src/main/res/layout/user_login_fragment.xml
index 28ceacd..73cc460 100644
--- a/app/src/main/res/layout/user_login_fragment.xml
+++ b/app/src/main/res/layout/user_login_fragment.xml
@@ -3,8 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
- android:padding="20dp"
- android:background="@drawable/login_background"
+ android:padding="30dp"
android:layout_height="match_parent">
@@ -14,15 +13,6 @@
android:layout_height="100dp"
android:src="@drawable/ic_launcher_foreground" />
-
-
+
@@ -50,13 +42,13 @@
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:hint="Email">
+ android:textColorHint="@color/theme_text_color_body"
+ android:hint="@string/et_email">
+ android:layout_height="wrap_content" />
@@ -64,16 +56,16 @@
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="5dp"
- app:passwordToggleEnabled="true"
- android:hint="Password">
+ android:layout_marginTop="6dp"
+ android:textColorHint="@color/theme_text_color_body"
+ android:hint="@string/et_password"
+ app:passwordToggleEnabled="true">
+ android:inputType="textPassword" />
@@ -82,12 +74,12 @@
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_margin="5dp"
- android:background="#00000000"
+ android:background="@color/theme_transparent_button"
android:elevation="0dp"
- android:fontFamily="monospace"
- android:text="Forgot Password?"
+ android:fontFamily="@font/roboto"
+ android:text="@string/btn_forgotPass_login"
android:textAllCaps="false"
- android:textColor="@color/black" />
+ android:textColor="@color/theme_text_color_body" />
-
-
-
-
-
-
-
-
-
+ android:layout_marginTop="20dp"
+ android:orientation="horizontal">
+
+ android:textColor="@color/theme_text_color_body"
+ android:text="Don\'t have an account?" />
+
+ android:textColor="@color/theme_text_color_bold"
+ android:textStyle="bold" />
@@ -181,12 +127,13 @@
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_marginTop="20dp"
- android:background="#00000000"
+ android:layout_gravity="center"
+ android:background="@color/theme_transparent_button"
android:elevation="0dp"
- android:fontFamily="monospace"
- android:text="Register as NGO"
+ android:fontFamily="@font/roboto"
+ android:text="@string/btn_ngoRegister_login"
android:textAllCaps="false"
- android:textColor="@color/black" />
+ android:textColor="@color/theme_text_color_bold" />
+