diff --git a/.idea/codestream.xml b/.idea/codestream.xml
new file mode 100644
index 0000000..a4e0c03
--- /dev/null
+++ b/.idea/codestream.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index b66ec6b..9801de3 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -11,8 +11,7 @@
android:theme="@style/Theme.Samarpan">
-
+ android:exported="false" />
+
+
diff --git a/app/src/main/ic_launcher-playstore.png b/app/src/main/ic_launcher-playstore.png
new file mode 100644
index 0000000..b8480e2
Binary files /dev/null and b/app/src/main/ic_launcher-playstore.png differ
diff --git a/app/src/main/java/com/hazard/samarpan/user/UserDashboardFragment.kt b/app/src/main/java/com/hazard/samarpan/user/UserDashboardFragment.kt
index 1b536bd..abac635 100644
--- a/app/src/main/java/com/hazard/samarpan/user/UserDashboardFragment.kt
+++ b/app/src/main/java/com/hazard/samarpan/user/UserDashboardFragment.kt
@@ -45,10 +45,8 @@ class UserDashboardFragment : Fragment() {
clothRecycler.adapter = ClothAdapter(clothList)
btnLogout?.setOnClickListener{
- Firebase.auth.signOut()
- val intent= Intent(context, MainActivity::class.java)
+ val intent = Intent(context,UserProfileActivity::class.java)
startActivity(intent)
- activity?.finish()
}
donate?.setOnClickListener {
diff --git a/app/src/main/java/com/hazard/samarpan/user/UserProfileActivity.kt b/app/src/main/java/com/hazard/samarpan/user/UserProfileActivity.kt
new file mode 100644
index 0000000..76d8fdf
--- /dev/null
+++ b/app/src/main/java/com/hazard/samarpan/user/UserProfileActivity.kt
@@ -0,0 +1,74 @@
+package com.hazard.samarpan.user
+
+import android.content.Intent
+import android.os.Bundle
+import android.util.Log
+import android.widget.Button
+import android.widget.TextView
+import android.widget.Toast
+import androidx.appcompat.app.AppCompatActivity
+import com.google.firebase.auth.FirebaseAuth
+import com.google.firebase.auth.FirebaseUser
+import com.google.firebase.firestore.ktx.firestore
+import com.google.firebase.ktx.Firebase
+import com.hazard.samarpan.R
+import com.hazard.samarpan.common.MainActivity
+
+class UserProfileActivity : AppCompatActivity() {
+ private lateinit var registerAuth: FirebaseAuth
+ private var TAG : String = "UserProfileActivity"
+ private var userName: TextView? = null
+ private var userPhone: TextView? = null
+ private var userAddress: TextView? = null
+ private var userEmail: TextView? = null
+ private var userPin: TextView? = null
+ private var logOutBtn: Button? = null
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContentView(R.layout.activity_user_profile)
+ registerAuth = FirebaseAuth.getInstance()
+ userName = findViewById(R.id.user_profile_name)
+ userPhone = findViewById(R.id.user_profile_phone)
+ userAddress = findViewById(R.id.user_profile_address)
+ userEmail = findViewById(R.id.user_profile_emailid)
+ userPin = findViewById(R.id.user_profile_pin)
+ logOutBtn = findViewById(R.id.userLogout)
+ logOutBtn?.setOnClickListener{
+ registerAuth.signOut()
+ Toast.makeText(this,"Logged out successfully!",Toast.LENGTH_SHORT).show()
+ val intent = Intent(this,MainActivity::class.java)
+ startActivity(intent)
+ finish()
+ }
+ }
+
+ override fun onResume() {
+ (super.onResume())
+ readUserData()
+ }
+
+ private fun readUserData()
+ {
+ val dbInstance = Firebase.firestore
+ val user: FirebaseUser? = registerAuth.currentUser
+ val docRef = dbInstance.collection("users").document(
+ user?.uid ?: ""
+ )
+ docRef.get()
+ .addOnSuccessListener { document ->
+ if (document != null) {
+ userName?.text = document.data?.get("Full Name").toString()
+ userPhone?.text = document.data?.get("PhoneNumber").toString()
+ userAddress?.text = document.data?.get("Address").toString()
+ userPin?.text = document.data?.get("Pin Code").toString()
+ userEmail?.text = document.data?.get("Email").toString()
+ } else {
+ Log.d(TAG, "No such document")
+ }
+ }
+ .addOnFailureListener { exception ->
+ Log.d(TAG, "get failed with ", exception)
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml
index 07d5da9..ca3826a 100644
--- a/app/src/main/res/drawable/ic_launcher_background.xml
+++ b/app/src/main/res/drawable/ic_launcher_background.xml
@@ -1,170 +1,74 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ xmlns:android="http://schemas.android.com/apk/res/android">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_baseline_account_circle_24.xml b/app/src/main/res/drawable/profile_ico.xml
similarity index 100%
rename from app/src/main/res/drawable/ic_baseline_account_circle_24.xml
rename to app/src/main/res/drawable/profile_ico.xml
diff --git a/app/src/main/res/layout/activity_user_profile.xml b/app/src/main/res/layout/activity_user_profile.xml
new file mode 100644
index 0000000..185edcd
--- /dev/null
+++ b/app/src/main/res/layout/activity_user_profile.xml
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/user_dashboard_fragment.xml b/app/src/main/res/layout/user_dashboard_fragment.xml
index 0f6284f..8ce6473 100644
--- a/app/src/main/res/layout/user_dashboard_fragment.xml
+++ b/app/src/main/res/layout/user_dashboard_fragment.xml
@@ -43,7 +43,7 @@
android:backgroundTint="@color/theme_transparent_button"
android:contentDescription="Profile"
android:padding="15dp"
- android:src="@drawable/ic_baseline_account_circle_24"
+ android:src="@drawable/profile_ico"
app:tint="@color/profile_button_color" />
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..e8e1f80
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/app/src/main/res/mipmap-hdpi/ic_launcher.webp
deleted file mode 100644
index c209e78..0000000
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000..3acbd63
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 0000000..94d8ba0
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
deleted file mode 100644
index b2dfe3d..0000000
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..ea984bc
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/app/src/main/res/mipmap-mdpi/ic_launcher.webp
deleted file mode 100644
index 4f0f1d6..0000000
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000..ac9424c
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 0000000..a1fc862
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
deleted file mode 100644
index 62b611d..0000000
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..b9c4bd5
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
deleted file mode 100644
index 948a307..0000000
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000..f8808df
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..aad555e
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
deleted file mode 100644
index 1b9a695..0000000
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..19d478e
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
deleted file mode 100644
index 28d4b77..0000000
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000..0a851d7
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..9badefd
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
deleted file mode 100644
index 9287f50..0000000
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..3584165
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
deleted file mode 100644
index aa7d642..0000000
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000..84b4d72
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..bbe6721
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
deleted file mode 100644
index 9126ae3..0000000
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index fea6d34..7aceb3c 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -27,7 +27,7 @@
Now share your books with your friends
Hello blank fragment
-
+ PLACEHOLDER
diff --git a/gradle.properties b/gradle.properties
index 98bed16..ca36a32 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -18,4 +18,5 @@ android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
-kotlin.code.style=official
\ No newline at end of file
+kotlin.code.style=official
+org.gradle.unsafe.configuration-cache=true
\ No newline at end of file