diff --git a/.idea/misc.xml b/.idea/misc.xml index 196d97f..2aec464 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -7,10 +7,16 @@ + + + + + + diff --git a/app/src/main/java/com/hazard/samarpan/UserLoginFragment.kt b/app/src/main/java/com/hazard/samarpan/LoginFragment.kt similarity index 90% rename from app/src/main/java/com/hazard/samarpan/UserLoginFragment.kt rename to app/src/main/java/com/hazard/samarpan/LoginFragment.kt index 2e069d3..e1a9af2 100644 --- a/app/src/main/java/com/hazard/samarpan/UserLoginFragment.kt +++ b/app/src/main/java/com/hazard/samarpan/LoginFragment.kt @@ -1,6 +1,6 @@ package com.hazard.samarpan -import NgoSignup1 +import NgoSignup1Fragment import android.os.Bundle import android.text.TextUtils import android.view.LayoutInflater @@ -17,19 +17,19 @@ import com.google.firebase.auth.ktx.auth import com.google.firebase.ktx.Firebase -class UserLoginFragment: Fragment() { +class LoginFragment: Fragment() { private var itemView: View?=null private var userSignUp: LinearLayout?=null private var email: TextInputEditText?=null private var password: TextInputEditText?=null private var btnLogin: Button?=null - lateinit var ngoSignUp: TextView + private lateinit var ngoSignUp: TextView private lateinit var registerAuth: FirebaseAuth override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { - itemView =layoutInflater.inflate(R.layout.user_login_fragment,container,false) + itemView =layoutInflater.inflate(R.layout.login_fragment,container,false) email=itemView?.findViewById(R.id.donor_email) password=itemView?.findViewById(R.id.donor_password) @@ -41,7 +41,7 @@ class UserLoginFragment: Fragment() { registerAuth= Firebase.auth ngoSignUp.setOnClickListener{ - activity?.supportFragmentManager?.beginTransaction()?.replace(R.id.fragment_container1, NgoSignup1())?.addToBackStack(null)?.commit() + activity?.supportFragmentManager?.beginTransaction()?.replace(R.id.fragment_container1, NgoSignup1Fragment())?.addToBackStack(null)?.commit() } userSignUp?.setOnClickListener { @@ -75,4 +75,5 @@ class UserLoginFragment: Fragment() { return itemView } + } \ No newline at end of file diff --git a/app/src/main/java/com/hazard/samarpan/MainActivity.kt b/app/src/main/java/com/hazard/samarpan/MainActivity.kt index a51daba..94478fa 100644 --- a/app/src/main/java/com/hazard/samarpan/MainActivity.kt +++ b/app/src/main/java/com/hazard/samarpan/MainActivity.kt @@ -14,7 +14,7 @@ class MainActivity : AppCompatActivity() { } private fun addFragment() { - val userSignInLayout=UserLoginFragment() + val userSignInLayout=LoginFragment() supportFragmentManager.beginTransaction().add(R.id.fragment_container1,userSignInLayout).commit() } } \ No newline at end of file diff --git a/app/src/main/java/com/hazard/samarpan/NgoSignup1.kt b/app/src/main/java/com/hazard/samarpan/NgoSignup1Fragment.kt similarity index 74% rename from app/src/main/java/com/hazard/samarpan/NgoSignup1.kt rename to app/src/main/java/com/hazard/samarpan/NgoSignup1Fragment.kt index 9b444a7..9ed33a1 100644 --- a/app/src/main/java/com/hazard/samarpan/NgoSignup1.kt +++ b/app/src/main/java/com/hazard/samarpan/NgoSignup1Fragment.kt @@ -4,10 +4,10 @@ import android.view.View import android.view.ViewGroup import android.widget.Button import androidx.fragment.app.Fragment -import com.hazard.samarpan.NgoSignup2 +import com.hazard.samarpan.NgoSignup2Fragment import com.hazard.samarpan.R -class NgoSignup1 : Fragment() { +class NgoSignup1Fragment : Fragment() { lateinit var nextBtn: Button @@ -21,7 +21,9 @@ class NgoSignup1 : Fragment() { nextBtn = v.findViewById(R.id.btn_ngosignup1_next) nextBtn.setOnClickListener { activity?.supportFragmentManager?.beginTransaction() - ?.replace(R.id.fragment_container1, NgoSignup2())?.addToBackStack(null)?.commit() + ?.replace(R.id.fragment_container1, + NgoSignup2Fragment() + )?.addToBackStack(null)?.commit() } return v diff --git a/app/src/main/java/com/hazard/samarpan/NgoSignup2.java b/app/src/main/java/com/hazard/samarpan/NgoSignup2Fragment.java similarity index 95% rename from app/src/main/java/com/hazard/samarpan/NgoSignup2.java rename to app/src/main/java/com/hazard/samarpan/NgoSignup2Fragment.java index 2e34e5a..d5bb857 100644 --- a/app/src/main/java/com/hazard/samarpan/NgoSignup2.java +++ b/app/src/main/java/com/hazard/samarpan/NgoSignup2Fragment.java @@ -11,7 +11,7 @@ import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; -public class NgoSignup2 extends Fragment { +public class NgoSignup2Fragment extends Fragment { @Nullable @Override diff --git a/app/src/main/java/com/hazard/samarpan/UserRegisterFragment.kt b/app/src/main/java/com/hazard/samarpan/UserRegisterFragment.kt index 574aa1f..c8a8f57 100644 --- a/app/src/main/java/com/hazard/samarpan/UserRegisterFragment.kt +++ b/app/src/main/java/com/hazard/samarpan/UserRegisterFragment.kt @@ -46,7 +46,7 @@ class UserRegisterFragment: Fragment(){ registerAuth= Firebase.auth btnSignIn?.setOnClickListener { - val userLogin=UserLoginFragment() + val userLogin=LoginFragment() activity?.supportFragmentManager?.beginTransaction()?.replace(R.id.fragment_container1,userLogin)?.commit() } btnRegister?.setOnClickListener{ @@ -90,6 +90,7 @@ class UserRegisterFragment: Fragment(){ } return itemView } + override fun onStart() { super.onStart() // check if the user is signed in then don't open login or register page directly send to the required activity diff --git a/app/src/main/res/drawable/login_button.xml b/app/src/main/res/drawable/button_design.xml similarity index 82% rename from app/src/main/res/drawable/login_button.xml rename to app/src/main/res/drawable/button_design.xml index 892c643..7fd72b7 100644 --- a/app/src/main/res/drawable/login_button.xml +++ b/app/src/main/res/drawable/button_design.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/app/src/main/res/drawable/login_facebook.xml b/app/src/main/res/drawable/login_facebook.xml deleted file mode 100644 index c53486a..0000000 --- a/app/src/main/res/drawable/login_facebook.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/twitter_icon.xml b/app/src/main/res/drawable/twitter_icon.xml deleted file mode 100644 index c6ebcc2..0000000 --- a/app/src/main/res/drawable/twitter_icon.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/font/bungee.xml b/app/src/main/res/font/bungee.xml deleted file mode 100644 index 465b0f5..0000000 --- a/app/src/main/res/font/bungee.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/app/src/main/res/font/zeyada.xml b/app/src/main/res/font/zeyada.xml deleted file mode 100644 index 69c1f5b..0000000 --- a/app/src/main/res/font/zeyada.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/app/src/main/res/layout/dropdown_menu_popup_item.xml b/app/src/main/res/layout/dropdown_menu_popup_item.xml index 5e5488d..7d9a0f4 100644 --- a/app/src/main/res/layout/dropdown_menu_popup_item.xml +++ b/app/src/main/res/layout/dropdown_menu_popup_item.xml @@ -4,6 +4,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="16dp" + android:fontFamily="@font/roboto" + android:textColor="@color/theme_text_color_body" android:ellipsize="end" android:maxLines="1" android:textAppearance="?attr/textAppearanceSubtitle1" diff --git a/app/src/main/res/layout/login_fragment.xml b/app/src/main/res/layout/login_fragment.xml new file mode 100644 index 0000000..dd80b90 --- /dev/null +++ b/app/src/main/res/layout/login_fragment.xml @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +