Avatars Screen
Login flow ui forget password ui
This commit is contained in:
@@ -42,6 +42,8 @@ dependencies {
|
||||
|
||||
implementation 'com.google.android.flexbox:flexbox:3.0.0'
|
||||
|
||||
implementation 'com.github.bumptech.glide:glide:4.16.0'
|
||||
|
||||
implementation libs.androidx.core.ktx
|
||||
implementation libs.androidx.appcompat
|
||||
implementation libs.material
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<activity
|
||||
android:name=".onboard.OnboardActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
android:windowSoftInputMode="adjustPan"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".onboard.WelcomeActivity"
|
||||
|
||||
61
app/src/main/java/com/woka/onboard/AvatarAdapter.kt
Normal file
61
app/src/main/java/com/woka/onboard/AvatarAdapter.kt
Normal file
@@ -0,0 +1,61 @@
|
||||
package com.woka.onboard
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.recyclerview.widget.RecyclerView.ViewHolder
|
||||
import com.bumptech.glide.Glide
|
||||
import com.woka.R
|
||||
import com.woka.databinding.AvatarViewholderBinding
|
||||
import com.woka.onboard.models.Avatar
|
||||
|
||||
class AvatarAdapter(val avatarList: List<Avatar>) :
|
||||
RecyclerView.Adapter<AvatarAdapter.AvatarViewHolder>() {
|
||||
|
||||
var selectedPos: Int? = null
|
||||
|
||||
inner class AvatarViewHolder(val binding: AvatarViewholderBinding) : ViewHolder(binding.root)
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): AvatarViewHolder {
|
||||
return AvatarViewHolder(
|
||||
AvatarViewholderBinding.inflate(
|
||||
LayoutInflater.from(parent.context),
|
||||
parent,
|
||||
false
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int = avatarList.size
|
||||
|
||||
override fun onBindViewHolder(holder: AvatarViewHolder, position: Int) {
|
||||
Glide.with(holder.binding.root)
|
||||
.load(avatarList[position].avatar_image_url)
|
||||
.into(holder.binding.avatar)
|
||||
|
||||
holder.binding.card.apply {
|
||||
if (selectedPos == position){
|
||||
cardElevation = 5f
|
||||
setCardBackgroundColor(holder.itemView.context.getColor(R.color.white))
|
||||
}else{
|
||||
cardElevation = 0f
|
||||
setCardBackgroundColor(holder.itemView.context.getColor(R.color.white_50))
|
||||
}
|
||||
}
|
||||
|
||||
holder.binding.card.setOnClickListener {
|
||||
if (selectedPos == position) return@setOnClickListener
|
||||
|
||||
holder.binding.card.apply {
|
||||
setCardBackgroundColor(holder.itemView.context.getColor(R.color.white))
|
||||
cardElevation = 5f
|
||||
}
|
||||
|
||||
selectedPos?.let {
|
||||
notifyItemChanged(it)
|
||||
}
|
||||
selectedPos = position
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -9,19 +9,29 @@ import androidx.core.widget.addTextChangedListener
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import com.woka.R
|
||||
import com.woka.databinding.FragmentGetCodeBinding
|
||||
import com.woka.onboard.fragments.GetEmailFragment.Companion.IS_RESET_PASSWORD_INTENT
|
||||
import com.woka.onboard.fragments.GetEmailFragment.Companion.IS_UNDER_16
|
||||
import com.woka.utils.closeKeyboard
|
||||
|
||||
/*
|
||||
This fragment is to get the otp code input
|
||||
It is used in three scenarios:
|
||||
1 (Default). Registration process of parent (@Param isUnder16 = false)
|
||||
2. Registration process of child (@Param isUnder16 = true)
|
||||
3. Forget password process ( @Param isResetPasswordIntent = true)
|
||||
*/
|
||||
class GetCodeFragment : Fragment() {
|
||||
|
||||
private lateinit var binding: FragmentGetCodeBinding
|
||||
|
||||
private var isUnder16 = false
|
||||
private var isUnder16: Boolean = false
|
||||
private var isResetPasswordIntent: Boolean = false
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
arguments?.let {
|
||||
isUnder16 = it.getBoolean(IS_UNDER_16, false)
|
||||
isResetPasswordIntent = it.getBoolean(IS_RESET_PASSWORD_INTENT, false)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +50,15 @@ class GetCodeFragment : Fragment() {
|
||||
|
||||
private fun initViews() {
|
||||
binding.apply {
|
||||
if (isResetPasswordIntent){
|
||||
title.text = getString(R.string.please_get_otp_under_16)
|
||||
infoText.text = getString(R.string.request_them_for_the_code_to_reset_your_password)
|
||||
}
|
||||
else if (isUnder16){
|
||||
title.text = getString(R.string.please_get_otp_under_16)
|
||||
infoText.text = getString(R.string.request_them_for_verification_)
|
||||
}
|
||||
|
||||
et1.addTextChangedListener {
|
||||
if (it?.isEmpty() == false){
|
||||
et2.requestFocus()
|
||||
@@ -70,19 +89,6 @@ class GetCodeFragment : Fragment() {
|
||||
et3.requestFocus()
|
||||
}
|
||||
}
|
||||
|
||||
if (isUnder16){
|
||||
title.text = getString(R.string.please_get_otp_under_16)
|
||||
infoText.text = getString(R.string.request_them_for_verification_)
|
||||
}
|
||||
|
||||
binding.next.setOnClickListener {
|
||||
val args = Bundle().apply {
|
||||
putBoolean(IS_UNDER_16, isUnder16)
|
||||
}
|
||||
|
||||
findNavController().navigate(R.id.action_getCodeFragment_to_signUpFragment, args)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,6 +97,18 @@ class GetCodeFragment : Fragment() {
|
||||
backBtn.setOnClickListener {
|
||||
activity?.onBackPressedDispatcher?.onBackPressed()
|
||||
}
|
||||
|
||||
next.setOnClickListener {
|
||||
if (isResetPasswordIntent){
|
||||
findNavController().navigate(R.id.action_getCodeFragment_to_newPasswordFragment2)
|
||||
}else{
|
||||
val args = Bundle().apply {
|
||||
putBoolean(IS_UNDER_16, isUnder16)
|
||||
}
|
||||
|
||||
findNavController().navigate(R.id.action_getCodeFragment_to_signUpFragment, args)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,20 +12,30 @@ import androidx.navigation.fragment.findNavController
|
||||
import com.woka.R
|
||||
import com.woka.databinding.FragmentGetEmailBinding
|
||||
|
||||
/*
|
||||
This fragment is to get the email user input
|
||||
It is used in three scenarios:
|
||||
1 (Default). Registration process of parent (@Param isUnder16 = false)
|
||||
2. Registration process of child (@Param isUnder16 = true)
|
||||
3. Forget password process ( @Param isResetPasswordIntent = true)
|
||||
*/
|
||||
class GetEmailFragment : Fragment() {
|
||||
|
||||
companion object{
|
||||
const val IS_UNDER_16 = "is_under_16"
|
||||
const val IS_RESET_PASSWORD_INTENT = "reset_password_intent"
|
||||
}
|
||||
|
||||
private lateinit var binding: FragmentGetEmailBinding
|
||||
|
||||
private var isUnder16: Boolean = false
|
||||
private var isResetPasswordIntent: Boolean = false
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
arguments?.let {
|
||||
isUnder16 = it.getBoolean(IS_UNDER_16, false)
|
||||
isResetPasswordIntent = it.getBoolean(IS_RESET_PASSWORD_INTENT, false)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +54,17 @@ class GetEmailFragment : Fragment() {
|
||||
|
||||
private fun initViews() {
|
||||
binding.apply {
|
||||
if (isUnder16){
|
||||
if (isResetPasswordIntent){
|
||||
// scenario 3
|
||||
|
||||
title.text = getString(R.string.forgot_your_password)
|
||||
can.text = getString(R.string.please_give_us_your_username)
|
||||
email.hint = getString(R.string.enter_your_username)
|
||||
verificationTxt.text = getString(R.string.we_will_send_a_reset_code_to_your_parent_s_email)
|
||||
verificationTxt.visibility = VISIBLE
|
||||
}else if (isUnder16){
|
||||
// scenario 2
|
||||
|
||||
title.text = getString(R.string.let_s_be_safe)
|
||||
can.text = getString(R.string.can_we_have_your_parent_s_email)
|
||||
email.hint = getString(R.string.enter_your_parent_s_email)
|
||||
@@ -62,8 +82,14 @@ class GetEmailFragment : Fragment() {
|
||||
return@setOnClickListener
|
||||
}
|
||||
|
||||
val args = Bundle().apply {
|
||||
putBoolean(IS_UNDER_16, isUnder16)
|
||||
val args = if (isResetPasswordIntent){
|
||||
Bundle().apply {
|
||||
putBoolean(IS_RESET_PASSWORD_INTENT, isResetPasswordIntent)
|
||||
}
|
||||
}else{
|
||||
Bundle().apply {
|
||||
putBoolean(IS_UNDER_16, isUnder16)
|
||||
}
|
||||
}
|
||||
|
||||
findNavController().navigate(R.id.action_getEmailFragment_to_getCodeFragment, args)
|
||||
|
||||
@@ -10,6 +10,7 @@ import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.core.view.allViews
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import com.woka.R
|
||||
import com.woka.databinding.FragmentGetMoreInfoBinding
|
||||
import com.woka.onboard.InterestTopicView
|
||||
@@ -53,6 +54,10 @@ class GetMoreInfoFragment : Fragment() {
|
||||
genderF.setOnClickListener{selectGender(Gender.FEMALE)}
|
||||
|
||||
backBtn.setOnClickListener { activity?.onBackPressedDispatcher?.onBackPressed() }
|
||||
|
||||
next.setOnClickListener {
|
||||
findNavController().navigate(R.id.action_getMoreInfoFragment_to_selectAvatarFragment)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.woka.onboard.fragments
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.Fragment
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import com.woka.R
|
||||
import com.woka.databinding.FragmentNewPasswordBinding
|
||||
|
||||
class NewPasswordFragment : Fragment() {
|
||||
|
||||
private lateinit var binding: FragmentNewPasswordBinding
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
binding = FragmentNewPasswordBinding.inflate(inflater, container, false)
|
||||
clickEvents()
|
||||
return binding.root
|
||||
}
|
||||
|
||||
private fun clickEvents() {
|
||||
binding.apply {
|
||||
backBtn.setOnClickListener {
|
||||
activity?.onBackPressedDispatcher?.onBackPressed()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -49,12 +49,19 @@ class OnboardFragment : Fragment() {
|
||||
}
|
||||
|
||||
private fun clickEvents(){
|
||||
binding.backBtn.setOnClickListener{
|
||||
activity?.onBackPressedDispatcher?.onBackPressed()
|
||||
}
|
||||
|
||||
binding.createAccount.setOnClickListener {
|
||||
findNavController().navigate(R.id.action_onboardFragment_to_age_select_fragment)
|
||||
binding.apply {
|
||||
backBtn.setOnClickListener{
|
||||
activity?.onBackPressedDispatcher?.onBackPressed()
|
||||
}
|
||||
|
||||
createAccount.setOnClickListener {
|
||||
findNavController().navigate(R.id.action_onboardFragment_to_age_select_fragment)
|
||||
}
|
||||
|
||||
login.setOnClickListener {
|
||||
findNavController().navigate(R.id.action_onboardFragment_to_signInFragment)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,19 +5,83 @@ import androidx.fragment.app.Fragment
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import com.woka.R
|
||||
import android.widget.Toast
|
||||
import com.woka.databinding.FragmentSelectAvatarBinding
|
||||
import com.woka.onboard.AvatarAdapter
|
||||
import com.woka.onboard.models.Avatar
|
||||
|
||||
class SelectAvatarFragment : Fragment() {
|
||||
|
||||
private lateinit var binding: FragmentSelectAvatarBinding
|
||||
|
||||
private var adapter: AvatarAdapter? = null
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
binding = FragmentSelectAvatarBinding.inflate(inflater, container, false)
|
||||
|
||||
clickEvents()
|
||||
return binding.root
|
||||
}
|
||||
|
||||
private fun clickEvents() {
|
||||
binding.apply {
|
||||
backBtn.setOnClickListener {
|
||||
activity?.onBackPressedDispatcher?.onBackPressed()
|
||||
}
|
||||
|
||||
next.setOnClickListener {
|
||||
if (adapter?.selectedPos == null){
|
||||
Toast.makeText(activity, "Please select an avatar", Toast.LENGTH_SHORT).show()
|
||||
return@setOnClickListener
|
||||
}
|
||||
Toast.makeText(activity, "${adapter?.avatarList?.get(adapter?.selectedPos!!)?.id}", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
// static avatars
|
||||
adapter = AvatarAdapter(
|
||||
listOf(
|
||||
Avatar(
|
||||
"https://wokastaging.in/storage/app/public/uploads/avtar/avatar1.png?d=1714636151",
|
||||
"1", 1
|
||||
),
|
||||
Avatar(
|
||||
"https://wokastaging.in/storage/app/public/uploads/avtar/avatar2.png?d=1714636151",
|
||||
"2", 2
|
||||
),
|
||||
Avatar(
|
||||
"https://wokastaging.in/storage/app/public/uploads/avtar/avatar3.png?d=1714636151",
|
||||
"1", 3
|
||||
),
|
||||
Avatar(
|
||||
"https://wokastaging.in/storage/app/public/uploads/avtar/avatar4.png?d=1714636151",
|
||||
"2", 4
|
||||
),
|
||||
Avatar(
|
||||
"https://wokastaging.in/storage/app/public/uploads/avtar/avatar1.png?d=1714636151",
|
||||
"1", 5
|
||||
),
|
||||
Avatar(
|
||||
"https://wokastaging.in/storage/app/public/uploads/avtar/avatar2.png?d=1714636151",
|
||||
"2", 6
|
||||
),
|
||||
Avatar(
|
||||
"https://wokastaging.in/storage/app/public/uploads/avtar/avatar3.png?d=1714636151",
|
||||
"1", 7
|
||||
),
|
||||
Avatar(
|
||||
"https://wokastaging.in/storage/app/public/uploads/avtar/avatar4.png?d=1714636151",
|
||||
"2", 8
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
binding.rvAvatar.adapter = adapter
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,16 @@
|
||||
package com.woka.onboard.fragments
|
||||
|
||||
import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.Fragment
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.WindowManager
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import com.woka.R
|
||||
import com.woka.databinding.FragmentSignInBinding
|
||||
import com.woka.onboard.fragments.GetEmailFragment.Companion.IS_RESET_PASSWORD_INTENT
|
||||
|
||||
class SignInFragment : Fragment() {
|
||||
|
||||
@@ -19,6 +23,8 @@ class SignInFragment : Fragment() {
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
binding = FragmentSignInBinding.inflate(inflater, container, false)
|
||||
activity?.window?.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
|
||||
activity?.window?.statusBarColor = Color.parseColor("#6ed5fe")
|
||||
|
||||
clickEvents()
|
||||
|
||||
@@ -27,7 +33,20 @@ class SignInFragment : Fragment() {
|
||||
|
||||
private fun clickEvents() {
|
||||
binding.apply {
|
||||
forgotPassword.setOnClickListener {
|
||||
findNavController().navigate(R.id.action_signInFragment_to_getEmailFragment,
|
||||
Bundle().apply {
|
||||
putBoolean(IS_RESET_PASSWORD_INTENT, true)
|
||||
})
|
||||
}
|
||||
|
||||
backBtn.setOnClickListener {
|
||||
activity?.onBackPressedDispatcher?.onBackPressed()
|
||||
}
|
||||
|
||||
createAccount.setOnClickListener {
|
||||
findNavController().navigate(R.id.action_signInFragment_to_age_select_fragment)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
7
app/src/main/java/com/woka/onboard/models/Avatar.kt
Normal file
7
app/src/main/java/com/woka/onboard/models/Avatar.kt
Normal file
@@ -0,0 +1,7 @@
|
||||
package com.woka.onboard.models
|
||||
|
||||
data class Avatar(
|
||||
val avatar_image_url: String,
|
||||
val avatar_name: String,
|
||||
val id: Int
|
||||
)
|
||||
23
app/src/main/res/layout/avatar_viewholder.xml
Normal file
23
app/src/main/res/layout/avatar_viewholder.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:id="@+id/card"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
|
||||
app:cardElevation="0dp"
|
||||
app:cardBackgroundColor="@color/white_50"
|
||||
app:cardCornerRadius="50dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:contentDescription="@string/image"
|
||||
android:layout_gravity="center"
|
||||
/>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
@@ -202,7 +202,7 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/interest_view"
|
||||
android:visibility="visible"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
|
||||
208
app/src/main/res/layout/fragment_new_password.xml
Normal file
208
app/src/main/res/layout/fragment_new_password.xml
Normal file
@@ -0,0 +1,208 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@drawable/splash_bg"
|
||||
tools:context=".onboard.fragments.NewPasswordFragment">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back_btn"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:contentDescription="@string/image"
|
||||
android:src="@drawable/ic_arrow_back"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/logo"
|
||||
app:layout_constraintEnd_toStartOf="@+id/logo"
|
||||
app:layout_constraintHorizontal_bias="0.30"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/logo"
|
||||
app:tint="@color/color_primary" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/logo"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
android:contentDescription="@string/app_name"
|
||||
android:src="@drawable/woka_logo_full"
|
||||
|
||||
android:transitionName="logo"
|
||||
|
||||
android:layout_marginTop="15dp"
|
||||
|
||||
android:visibility="visible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/great_select_new_password"
|
||||
android:fontFamily="@font/exo_2_medium"
|
||||
android:textSize="22sp"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textAlignment="center"
|
||||
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/logo"
|
||||
|
||||
android:layout_marginTop="50dp"
|
||||
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/title"
|
||||
android:layout_marginTop="50dp"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/create_your_password"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textAlignment="center"
|
||||
|
||||
/>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
app:cardElevation="5dp"
|
||||
app:cardCornerRadius="25dp"
|
||||
>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
app:hintEnabled="false"
|
||||
app:expandedHintEnabled="false"
|
||||
app:hintAnimationEnabled="false"
|
||||
|
||||
app:boxStrokeWidth="0dp"
|
||||
app:boxStrokeWidthFocused="0dp"
|
||||
app:passwordToggleEnabled="true"
|
||||
>
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:background="@drawable/round_25_shadow"
|
||||
android:fontFamily="@font/exo_2"
|
||||
|
||||
android:hint="@string/enter_a_new_password_"
|
||||
android:inputType="textPassword"
|
||||
android:paddingHorizontal="20dp"
|
||||
android:paddingVertical="15dp"
|
||||
|
||||
android:singleLine="true"
|
||||
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
|
||||
/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/create_your_password"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textAlignment="center"
|
||||
|
||||
android:layout_marginTop="25dp"
|
||||
|
||||
/>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="15dp"
|
||||
app:cardElevation="5dp"
|
||||
app:cardCornerRadius="25dp"
|
||||
>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
app:hintEnabled="false"
|
||||
app:expandedHintEnabled="false"
|
||||
app:hintAnimationEnabled="false"
|
||||
|
||||
app:boxStrokeWidth="0dp"
|
||||
app:boxStrokeWidthFocused="0dp"
|
||||
app:passwordToggleEnabled="true"
|
||||
>
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/confirm_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:textColor="@color/black"
|
||||
android:fontFamily="@font/exo_2"
|
||||
|
||||
android:hint="@string/confirm_your_password"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:singleLine="true"
|
||||
android:inputType="textPassword"
|
||||
|
||||
android:background="@drawable/round_25_shadow"
|
||||
|
||||
android:paddingHorizontal="20dp"
|
||||
android:paddingVertical="15dp"
|
||||
|
||||
/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/next"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/reset_password"
|
||||
android:textColor="@color/white"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
|
||||
android:background="@drawable/grad_btn_bg_4"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginBottom="45dp"
|
||||
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -15,7 +15,7 @@
|
||||
android:src="@drawable/ic_arrow_back"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/title"
|
||||
app:layout_constraintEnd_toStartOf="@+id/title"
|
||||
app:layout_constraintHorizontal_bias="0.30"
|
||||
app:layout_constraintHorizontal_bias="0.40"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/title"
|
||||
app:tint="@color/color_primary" />
|
||||
@@ -40,6 +40,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_avatar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
|
||||
@@ -51,7 +52,7 @@
|
||||
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:spanCount="3"
|
||||
|
||||
tools:listitem="@layout/avatar_viewholder"
|
||||
/>
|
||||
|
||||
<Button
|
||||
|
||||
@@ -1,14 +1,230 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@drawable/splash_bg"
|
||||
tools:context=".onboard.fragments.SignInFragment">
|
||||
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/hello_blank_fragment" />
|
||||
<ImageView
|
||||
android:id="@+id/back_btn"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:contentDescription="@string/image"
|
||||
android:src="@drawable/ic_arrow_back"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/logo"
|
||||
app:layout_constraintEnd_toStartOf="@+id/logo"
|
||||
app:layout_constraintHorizontal_bias="0.30"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/logo"
|
||||
app:tint="@color/color_primary" />
|
||||
|
||||
</FrameLayout>
|
||||
<ImageView
|
||||
android:id="@+id/logo"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
|
||||
android:contentDescription="@string/app_name"
|
||||
android:src="@drawable/woka_logo_full"
|
||||
|
||||
android:transitionName="logo"
|
||||
|
||||
android:layout_marginTop="15dp"
|
||||
|
||||
android:visibility="visible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:gravity="center"
|
||||
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toTopOf="@+id/continue_as_guest"
|
||||
app:layout_constraintTop_toBottomOf="@id/logo"
|
||||
app:layout_constraintVertical_bias="0.25">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:fontFamily="@font/exo_2_extrabold"
|
||||
android:text="@string/login_to_woka"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textSize="24sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginTop="30dp"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:text="@string/username"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/color_primary"
|
||||
|
||||
android:textSize="18sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="10dp"
|
||||
|
||||
android:layout_marginBottom="15dp"
|
||||
android:autofillHints="username"
|
||||
|
||||
android:background="@drawable/round_25_shadow"
|
||||
android:elevation="5dp"
|
||||
android:fontFamily="@font/exo_2"
|
||||
|
||||
android:hint="@string/enter_your_username"
|
||||
|
||||
android:inputType="text"
|
||||
android:paddingHorizontal="20dp"
|
||||
android:paddingVertical="15dp"
|
||||
|
||||
android:singleLine="true"
|
||||
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginTop="15dp"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:text="@string/password"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/color_primary"
|
||||
|
||||
android:textSize="18sp" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
app:cardCornerRadius="25dp"
|
||||
app:cardElevation="5dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
app:boxStrokeWidth="0dp"
|
||||
app:boxStrokeWidthFocused="0dp"
|
||||
app:expandedHintEnabled="false"
|
||||
|
||||
app:hintAnimationEnabled="false"
|
||||
app:hintEnabled="false"
|
||||
app:passwordToggleEnabled="true">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:background="@drawable/round_25_shadow"
|
||||
android:fontFamily="@font/exo_2"
|
||||
|
||||
android:hint="@string/enter_a_new_password"
|
||||
android:paddingHorizontal="20dp"
|
||||
android:paddingVertical="15dp"
|
||||
|
||||
android:singleLine="true"
|
||||
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:inputType="textPassword"
|
||||
|
||||
/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/forgot_password"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:fontFamily="@font/exo_2"
|
||||
android:padding="5dp"
|
||||
android:text="@string/forgot_password"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/color_primary"
|
||||
|
||||
android:textSize="18sp"
|
||||
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/login"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
|
||||
android:background="@drawable/gradient_btn_bg_2"
|
||||
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:text="@string/login"
|
||||
android:textColor="@color/white"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/continue_as_guest"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
android:text="@string/continue_as_guest"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/color_primary"
|
||||
android:textSize="18sp"
|
||||
|
||||
app:layout_constraintStart_toStartOf="@id/create_account"
|
||||
app:layout_constraintEnd_toEndOf="@id/create_account"
|
||||
app:layout_constraintBottom_toTopOf="@id/create_account"
|
||||
|
||||
android:padding="5dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/create_account"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="@string/create_your_account"
|
||||
android:textColor="@color/white"
|
||||
android:fontFamily="@font/exo_2_bold"
|
||||
|
||||
android:background="@drawable/gradient_btn_bg"
|
||||
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginBottom="25dp"
|
||||
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -199,6 +199,7 @@
|
||||
android:hint="@string/enter_a_new_password"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:singleLine="true"
|
||||
android:inputType="textPassword"
|
||||
|
||||
android:background="@drawable/round_25_shadow"
|
||||
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
<action
|
||||
android:id="@+id/action_onboardFragment_to_age_select_fragment"
|
||||
app:destination="@id/age_select_fragment" />
|
||||
<action
|
||||
android:id="@+id/action_onboardFragment_to_signInFragment"
|
||||
app:destination="@id/signInFragment" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/age_select_fragment"
|
||||
@@ -48,6 +51,9 @@
|
||||
<action
|
||||
android:id="@+id/action_getCodeFragment_to_signUpFragment"
|
||||
app:destination="@id/signUpFragment" />
|
||||
<action
|
||||
android:id="@+id/action_getCodeFragment_to_newPasswordFragment2"
|
||||
app:destination="@id/newPasswordFragment2" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/signUpFragment"
|
||||
@@ -71,5 +77,30 @@
|
||||
android:name="is_under_16"
|
||||
app:argType="boolean"
|
||||
android:defaultValue="false" />
|
||||
<action
|
||||
android:id="@+id/action_getMoreInfoFragment_to_selectAvatarFragment"
|
||||
app:destination="@id/selectAvatarFragment" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/selectAvatarFragment"
|
||||
android:name="com.woka.onboard.fragments.SelectAvatarFragment"
|
||||
android:label="fragment_select_avatar"
|
||||
tools:layout="@layout/fragment_select_avatar" />
|
||||
<fragment
|
||||
android:id="@+id/signInFragment"
|
||||
android:name="com.woka.onboard.fragments.SignInFragment"
|
||||
android:label="fragment_sign_in"
|
||||
tools:layout="@layout/fragment_sign_in" >
|
||||
<action
|
||||
android:id="@+id/action_signInFragment_to_getEmailFragment"
|
||||
app:destination="@id/getEmailFragment" />
|
||||
<action
|
||||
android:id="@+id/action_signInFragment_to_age_select_fragment"
|
||||
app:destination="@id/age_select_fragment"/>
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/newPasswordFragment2"
|
||||
android:name="com.woka.onboard.fragments.NewPasswordFragment"
|
||||
android:label="fragment_new_password"
|
||||
tools:layout="@layout/fragment_new_password" />
|
||||
</navigation>
|
||||
@@ -50,4 +50,18 @@
|
||||
<string name="when_is_your_birthday">आपका जन्मदिन कब है?</string>
|
||||
<string name="what_are_your_interests">तुम्हारी अभिरूचियाँ क्या है?</string>
|
||||
<string name="select_as_many_as_you_want">आप जितने चाहें उतने चुनें</string>
|
||||
<string name="select_your_avatar">अपना अवतार चुनें</string>
|
||||
<string name="login_to_woka">WOKA में लॉग इन करें</string>
|
||||
<string name="username">उपयोगकर्ता नाम</string>
|
||||
<string name="enter_your_username">अपना उपयोगकर्ता नाम दर्ज करें</string>
|
||||
<string name="password">पासवर्ड</string>
|
||||
<string name="forgot_password">पासवर्ड भूल गए?</string>
|
||||
<string name="forgot_your_password">अपना पासवर्ड भूल गए?</string>
|
||||
<string name="please_give_us_your_username">कृपया हमें अपना उपयोगकर्ता नाम दें</string>
|
||||
<string name="we_will_send_a_reset_code_to_your_parent_s_email">हम आपके माता-पिता के ईमेल पर एक रीसेट कोड भेजेंगे</string>
|
||||
<string name="request_them_for_the_code_to_reset_your_password">अपना पासवर्ड रीसेट करने के लिए उनसे कोड के लिए अनुरोध करें</string>
|
||||
<string name="great_select_new_password">नया पासवर्ड चुनें</string>
|
||||
<string name="enter_a_new_password_">नया पासवर्ड दर्ज करें</string>
|
||||
<string name="confirm_your_password">नया पासवर्ड पुन: दर्ज करें</string>
|
||||
<string name="reset_password">पासवर्ड रीसेट</string>
|
||||
</resources>
|
||||
@@ -53,4 +53,17 @@
|
||||
<string name="what_are_your_interests">WHAT ARE YOUR INTERESTS?</string>
|
||||
<string name="select_as_many_as_you_want">Select as many as you want</string>
|
||||
<string name="select_your_avatar">Select your Avatar</string>
|
||||
<string name="login_to_woka">Login to WOKA</string>
|
||||
<string name="username">USERNAME</string>
|
||||
<string name="enter_your_username">Enter your username</string>
|
||||
<string name="password">PASSWORD</string>
|
||||
<string name="forgot_password">Forgot Password?</string>
|
||||
<string name="forgot_your_password">Forgot your Password?</string>
|
||||
<string name="please_give_us_your_username">PLEASE GIVE US YOUR USERNAME</string>
|
||||
<string name="we_will_send_a_reset_code_to_your_parent_s_email">We will send a reset code to your parent’s email</string>
|
||||
<string name="request_them_for_the_code_to_reset_your_password">Request them for the code to reset your password</string>
|
||||
<string name="great_select_new_password">Great! Select New Password</string>
|
||||
<string name="enter_a_new_password_">Enter a new password</string>
|
||||
<string name="confirm_your_password">Re-enter your password</string>
|
||||
<string name="reset_password">RESET PASSWORD</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user