Commit 5affa44d authored by shohboz's avatar shohboz

[UPD] MUS-261 Feature, updated pin screen to fragment

parent f36c04c8
......@@ -40,6 +40,7 @@
<entry key="app/src/main/res/drawable/ic_safety.xml" value="0.2590277777777778" />
<entry key="app/src/main/res/drawable/ic_vector_error.xml" value="0.20694444444444443" />
<entry key="app/src/main/res/drawable/radius_top.xml" value="0.25416666666666665" />
<entry key="app/src/main/res/drawable/tab_indicator.xml" value="0.2756756756756757" />
<entry key="app/src/main/res/drawable/text_handle.xml" value="1.4214285714285715" />
<entry key="app/src/main/res/layout/activity_auth.xml" value="0.15853658536585366" />
<entry key="app/src/main/res/layout/activity_language.xml" value="0.25" />
......
......@@ -73,7 +73,7 @@ class LoginFragment : BaseFragment(R.layout.fragment_login) {
txtForgetPassword.setOnClickListener(object : ButtonClick() {
override fun onSingleClick(v: View?) {
viewModel.forgetPassword(UserAuth(phone.replace(" ", "").replace("+", "")))
viewModel.forgetPassword(UserAuth(phone.filter { it.isDigit() }))
}
})
......
......@@ -23,10 +23,7 @@ import com.mobiuz.app.dev.ui.auth.AuthActivity
import com.mobiuz.app.dev.ui.base.BaseFragment
import com.mobiuz.app.dev.ui.global.CONSTANTS
import com.mobiuz.app.dev.utils.Utils
import com.mobiuz.app.dev.utils.extensions.customLog
import com.mobiuz.app.dev.utils.extensions.getColorCompat
import com.mobiuz.app.dev.utils.extensions.showMessage
import com.mobiuz.app.dev.utils.extensions.vibrate
import com.mobiuz.app.dev.utils.extensions.*
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.delay
import javax.inject.Inject
......@@ -99,14 +96,10 @@ class PinFragment : BaseFragment(R.layout.fragment_pin) {
txtNotPin.isVisible = false
pinAdapter.setOnDoneListener {
lifecycleScope.launchWhenCreated {
customLog("done type: $type")
delay(50)
when (type) {
CONSTANTS.NEW_PIN -> {
navController.navigate(R.id.pinFragment, bundleOf(CONSTANTS.TYPE_PIN to CONSTANTS.CONFIRM_NEW_PIN, CONSTANTS.PIN_CODE to it),
Utils
.navOptions())
Utils.navOptions())
}
CONSTANTS.CONFIRM_NEW_PIN -> {
if(pinCode == it){
......@@ -126,13 +119,19 @@ class PinFragment : BaseFragment(R.layout.fragment_pin) {
}
}
CONSTANTS.CHANGE_NEW_PIN -> {
if(pref.pinCode == it){
showMessage(getString(R.string.cannot_change_pin))
}else{
navController.navigate(R.id.pinFragment, bundleOf(CONSTANTS.TYPE_PIN to CONSTANTS.CONFIRM_CHANGE_NEW_PIN, CONSTANTS.PIN_CODE to it), Utils.navOptions())
}
}
CONSTANTS.CONFIRM_CHANGE_NEW_PIN -> {
if(pinCode == it){
pref.pinCode = pinCode
showMessage(getString(R.string.pin_code_updated))
showCustomDialog(getString(R.string.pin_code_updated),true){
navController.popBackStack(R.id.safetyFragment, false)
}
}else{
vibrate(requireContext())
cardPin.startAnimation(AnimationUtils.loadAnimation(requireContext(), R.anim.shake))
......@@ -144,7 +143,6 @@ class PinFragment : BaseFragment(R.layout.fragment_pin) {
}
}
}
}
for (i in 0 until btnViewGroup.childCount) {
btnViewGroup.getChildAt(i).setOnClickListener {
......@@ -180,7 +178,6 @@ class PinFragment : BaseFragment(R.layout.fragment_pin) {
pref.clearUserData()
val intent = Intent(requireContext(), AuthActivity::class.java)
intent.putExtra(CONSTANTS.TYPE_AUTH, CONSTANTS.LOGIN)
intent.putExtra(CONSTANTS.PHONE, pref.userPhone)
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_TASK_ON_HOME
startActivity(intent)
requireActivity().finish()
......
......@@ -5,7 +5,6 @@ import android.net.Uri
import android.os.Bundle
import android.view.View
import androidx.core.os.bundleOf
import androidx.core.text.isDigitsOnly
import androidx.core.view.isVisible
import androidx.fragment.app.viewModels
import androidx.lifecycle.lifecycleScope
......@@ -22,6 +21,7 @@ import com.mobiuz.app.dev.ui.global.CONSTANTS
import com.mobiuz.app.dev.ui.global.TextWatcherWrapper
import com.mobiuz.app.dev.utils.Utils
import com.mobiuz.app.dev.utils.extensions.makeLinks
import com.mobiuz.app.dev.utils.extensions.showCustomDialog
import com.mobiuz.app.dev.utils.hideKeyboard
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.flow.collect
......@@ -57,7 +57,7 @@ class RegisterFragment : BaseFragment(R.layout.fragment_register) {
override fun setUpUI() {
bn.apply {
viewGroup.setOnClickListener(object : ButtonClick(){
viewGroup.setOnClickListener(object : ButtonClick() {
override fun onSingleClick(v: View?) {
bn.viewGroup.hideKeyboard()
}
......@@ -69,7 +69,8 @@ class RegisterFragment : BaseFragment(R.layout.fragment_register) {
val intent = Intent(Intent.ACTION_VIEW)
intent.data = uri
startActivity(intent)
}))
})
)
txtAgree.makeLinks(
Pair("Terms of Use", View.OnClickListener {
......@@ -167,7 +168,11 @@ class RegisterFragment : BaseFragment(R.layout.fragment_register) {
when (it) {
is UiStateObject.SUCCESS -> {
showProgressDialog(false)
navController.navigate(R.id.myVerificationFragment, bundleOf(CONSTANTS.PHONE to phone,CONSTANTS.PIN_CODE to it.data), Utils.navOptions())
navController.navigate(
R.id.myVerificationFragment,
bundleOf(CONSTANTS.PHONE to phone, CONSTANTS.PIN_CODE to it.data),
Utils.navOptions()
)
}
is UiStateObject.ERROR -> {
code = ""
......@@ -187,10 +192,10 @@ class RegisterFragment : BaseFragment(R.layout.fragment_register) {
when (it) {
is UiStateObject.SUCCESS -> {
showProgressDialog(false)
showToastMessage(getString(R.string.password_successfully_updated))
navController.popBackStack(R.id.loginFragment,false)
showCustomDialog(getString(R.string.password_successfully_updated),true){
navController.popBackStack(R.id.loginFragment, false)
navController.navigate(R.id.pinFragment, bundleOf(CONSTANTS.TYPE_PIN to CONSTANTS.NEW_PIN), Utils.navOptions())
}
}
is UiStateObject.ERROR -> {
showProgressDialog(false)
......
......@@ -50,7 +50,7 @@ class ActionFragment : BaseFragment(R.layout.fragment_action) {
override fun setUpUI() {
bn.apply {
OverScrollDecoratorHelper.setUpStaticOverScroll(bn.rvUssdCommand, OverScrollDecoratorHelper.ORIENTATION_VERTICAL)
// OverScrollDecoratorHelper.setUpStaticOverScroll(bn.rvUssdCommand, OverScrollDecoratorHelper.ORIENTATION_VERTICAL)
rvUssdCommand.adapter = adapter
adapter.setOnClickListener {
......
......@@ -2,6 +2,7 @@ package com.mobiuz.app.dev.ui.settings.safety
import android.content.Intent
import android.os.Bundle
import android.util.Log
import android.view.View
import androidx.core.os.bundleOf
import androidx.core.view.isVisible
......@@ -22,6 +23,7 @@ import com.mobiuz.app.dev.ui.global.ButtonClick
import com.mobiuz.app.dev.ui.global.CONSTANTS
import com.mobiuz.app.dev.ui.global.TextWatcherWrapper
import com.mobiuz.app.dev.utils.Utils
import com.mobiuz.app.dev.utils.extensions.customLog
import com.mobiuz.app.dev.utils.extensions.getColorCompat
import com.mobiuz.app.dev.utils.extensions.showCustomDialog
import com.mobiuz.app.dev.utils.extensions.showMessage
......@@ -112,7 +114,6 @@ class ChangePasswordFragment : BaseFragment(R.layout.fragment_change_password) {
imageCheck.isVisible = true
txtCheckConfirm.isVisible = true
}else{
loadError()
btnLogin.isEnabled = s.toString().length > 3
imageCheck.isVisible = false
txtCheckConfirm.isVisible = false
......@@ -144,7 +145,9 @@ class ChangePasswordFragment : BaseFragment(R.layout.fragment_change_password) {
}
CONSTANTS.NEW_PASSWORD -> {
if(oldPassword == password){
showMessage(getString(R.string.cannot_change_password))
}else{
navController.navigate(
R.id.changePasswordFragment,
bundleOf(
......@@ -156,6 +159,8 @@ class ChangePasswordFragment : BaseFragment(R.layout.fragment_change_password) {
)
}
}
CONSTANTS.CONFIRM_NEW_PASSWORD -> {
if (newPassword == password) {
viewModel.changePassword(ChangePassword(oldPassword,newPassword))
......@@ -208,7 +213,6 @@ class ChangePasswordFragment : BaseFragment(R.layout.fragment_change_password) {
pref.clearUserData()
val intent = Intent(requireContext(), AuthActivity::class.java)
intent.putExtra(CONSTANTS.TYPE_AUTH, CONSTANTS.LOGIN)
intent.putExtra(CONSTANTS.PHONE, pref.userPhone)
startActivity(intent)
requireActivity().finish()
}
......
......@@ -52,6 +52,7 @@ class SafetyFragment : BaseFragment(R.layout.fragment_safety) {
}
btn1.setOnClickListener(object : ButtonClick(){
override fun onSingleClick(v: View?) {
switchBiometria.isChecked = !switchBiometria.isChecked
}
})
btnChangePin.setOnClickListener(object : ButtonClick(){
......@@ -68,9 +69,7 @@ class SafetyFragment : BaseFragment(R.layout.fragment_safety) {
}
override fun collects() {
}
override fun collects() {}
override fun onDestroy() {
_bn = null
......
package com.mobiuz.app.utils
package com.mobiuz.app.dev.utils.extensions
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
......
......@@ -14,18 +14,22 @@
<TextView
style="@style/ServicesTextStyle"
android:id="@+id/txt_title"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:gravity="center"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="20dp"
android:layout_marginHorizontal="@dimen/_20sdp"
android:text="USSD ЗАПРОС"
android:textSize="20sp"
android:textStyle="bold" />
<TextView
android:id="@+id/txt_description"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_marginHorizontal="@dimen/_20sdp"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_gravity="center"
android:layout_marginTop="16dp"
android:textAllCaps="true"
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/view_group"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:navigationIcon="@drawable/ic_baseline_arrow_back" />
<TextView
style="@style/TitleTextStyle"
android:id="@+id/txt_enter_phone"
android:layout_marginTop="@dimen/_14sdp"
android:text="@string/enter_verification"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbar" />
<TextView
android:id="@+id/txt_error_code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/_16sdp"
android:layout_marginTop="32dp"
android:visibility="gone"
android:text="@string/error_code"
android:textSize="17sp"
android:textColor="@color/primary100"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/txt_enter_phone" />
<FrameLayout
android:id="@+id/pin_view_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/_12sdp"
android:layout_marginTop="@dimen/_80sdp"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/txt_enter_phone">
<LinearLayout
android:id="@+id/pin_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/pin_1"
style="@style/PinStyle"
android:background="@drawable/bgn_ver_unchecked" />
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/pin_2"
style="@style/PinStyle"
android:background="@drawable/bgn_ver_unchecked" />
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/pin_3"
style="@style/PinStyle"
android:background="@drawable/bgn_ver_unchecked" />
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/pin_4"
style="@style/PinStyle"
android:background="@drawable/bgn_ver_unchecked" />
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/pin_5"
style="@style/PinStyle"
android:background="@drawable/bgn_ver_unchecked" />
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/pin_6"
style="@style/PinStyle"
android:background="@drawable/bgn_ver_unchecked"
android:imeOptions="actionDone" />
</LinearLayout>
<FrameLayout
android:id="@+id/frame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="visible" />
</FrameLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="28dp"
android:layout_marginTop="@dimen/_34sdp"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pin_view_group">
<TextView
android:id="@+id/countWaitText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="@string/sent_code_again"
android:textColor="@color/grey110"
android:textSize="16sp" />
<cn.iwgang.countdownview.CountdownView
android:id="@+id/coutdown_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="@dimen/_4sdp"
android:layout_marginTop="2dp"
app:isHideTimeBackground="false"
app:isShowDay="false"
app:isShowHour="false"
app:isShowMillisecond="false"
app:isShowMinute="true"
app:isShowSecond="true"
app:isShowTimeBgBorder="false"
app:isShowTimeBgDivisionLine="false"
app:suffixDay="days"
app:suffixGravity="center"
app:suffixHour=":"
app:suffixMillisecond="ss"
app:suffixMinute=":"
app:suffixSecond=""
app:suffixTextColor="@color/grey100"
app:suffixTextSize="14sp"
app:timeBgColor="@color/white100"
app:timeBgRadius="3dp"
app:timeBgSize="14dp"
app:timeTextSize="14sp" />
<TextView
android:id="@+id/coutdown_view_helper_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="@dimen/_4sdp"
android:text="00:00"
android:textColor="@color/primary100"
android:textSize="16sp"
android:visibility="gone" />
</LinearLayout>
<TextView
android:id="@+id/sent_code_again"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_marginTop="@dimen/_10sdp"
android:layout_marginHorizontal="@dimen/_16sdp"
android:background="?selectableItemBackground"
android:padding="@dimen/_10sdp"
android:text="@string/sent_code_again"
android:textColor="@color/primary100"
android:textSize="16sp"
android:textStyle="bold"
android:visibility="visible"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btn_login" />
<Button
android:id="@+id/btn_login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginHorizontal="@dimen/_16sdp"
android:layout_marginTop="@dimen/_24sdp"
android:enabled="false"
android:text="@string/continuoue"
android:textSize="@dimen/_12sdp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/pin_view_group" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -4,21 +4,21 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="false"
android:background="@color/white"
android:fitsSystemWindows="false"
android:orientation="vertical">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_marginTop="24dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
app:navigationIcon="@drawable/ic_baseline_arrow_back" />
<TextView
style="@style/TitleTextStyle"
android:id="@+id/txt_enter_pin"
style="@style/TitleTextStyle"
android:layout_marginTop="@dimen/_14sdp"
android:text="@string/install_pin" />
......@@ -42,19 +42,19 @@
<LinearLayout
android:layout_width="@dimen/_100sdp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical"
android:gravity="center"
android:layout_height="wrap_content">
android:orientation="vertical">
<com.google.android.material.card.MaterialCardView
android:id="@+id/card_pin"
android:layout_width="wrap_content"
android:layout_gravity="center"
android:layout_height="wrap_content"
app:cardCornerRadius="0dp"
android:layout_gravity="center"
android:minWidth="@dimen/_100sdp"
android:minHeight="@dimen/_32sdp">
android:minHeight="@dimen/_32sdp"
app:cardCornerRadius="0dp">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_pin"
......@@ -66,10 +66,11 @@
tools:itemCount="4"
tools:listitem="@layout/item_pin" />
</com.google.android.material.card.MaterialCardView>
<View
android:layout_width="@dimen/_120sdp"
android:background="@color/grey30"
android:layout_height="2dp"/>
android:layout_height="2dp"
android:background="@color/grey30" />
</LinearLayout>
</FrameLayout>
......@@ -78,15 +79,14 @@
android:id="@+id/btn_view_group"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="3"
android:paddingStart="@dimen/_44sdp"
android:paddingEnd="@dimen/_44sdp">
android:layout_weight="2.5">
<TextView
android:id="@+id/btn_1"
style="@style/BtnStyle"
android:background="@drawable/bgn_pin_btn"
android:text="@string/_1"
app:layout_constraintEnd_toStartOf="@id/btn_2"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
......@@ -105,6 +105,7 @@
android:background="@drawable/bgn_pin_btn"
android:text="@string/_3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/btn_2"
app:layout_constraintTop_toTopOf="parent" />
<TextView
......@@ -113,6 +114,7 @@
android:layout_marginTop="@dimen/_16sdp"
android:background="@drawable/bgn_pin_btn"
android:text="@string/_4"
app:layout_constraintEnd_toStartOf="@id/btn_5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btn_1" />
......@@ -121,8 +123,8 @@
style="@style/BtnStyle"
android:background="@drawable/bgn_pin_btn"
android:text="@string/_5"
app:layout_constraintEnd_toStartOf="@id/btn_6"
app:layout_constraintStart_toEndOf="@id/btn_4"
app:layout_constraintEnd_toStartOf="@id/btn_3"
app:layout_constraintStart_toEndOf="@id/btn_1"
app:layout_constraintTop_toTopOf="@id/btn_4" />
<TextView
......@@ -131,6 +133,7 @@
android:background="@drawable/bgn_pin_btn"
android:text="@string/_6"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/btn_5"
app:layout_constraintTop_toTopOf="@id/btn_4" />
<TextView
......@@ -139,6 +142,7 @@
android:layout_marginTop="@dimen/_16sdp"
android:background="@drawable/bgn_pin_btn"
android:text="@string/_7"
app:layout_constraintEnd_toStartOf="@id/btn_8"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btn_4" />
......@@ -147,8 +151,8 @@
style="@style/BtnStyle"
android:background="@drawable/bgn_pin_btn"
android:text="@string/_8"
app:layout_constraintEnd_toStartOf="@id/btn_9"
app:layout_constraintStart_toEndOf="@id/btn_7"
app:layout_constraintEnd_toStartOf="@id/btn_3"
app:layout_constraintStart_toEndOf="@id/btn_1"
app:layout_constraintTop_toTopOf="@id/btn_7" />
<TextView
......@@ -157,6 +161,7 @@
android:background="@drawable/bgn_pin_btn"
android:text="@string/_9"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/btn_8"
app:layout_constraintTop_toTopOf="@id/btn_7" />
......@@ -166,9 +171,8 @@
android:layout_marginTop="@dimen/_16sdp"
android:background="@drawable/bgn_pin_btn"
android:text="@string/_0"
app:layout_constraintEnd_toEndOf="@id/btn_8"
app:layout_constraintStart_toStartOf="@id/btn_8"
app:layout_constraintTop_toBottomOf="@id/btn_7" />
app:layout_constraintTop_toBottomOf="@id/btn_8" />
<ImageView
......@@ -180,8 +184,8 @@
android:padding="@dimen/_4sdp"
android:src="@drawable/ic_vector_remove"
app:layout_constraintBottom_toBottomOf="@id/btn_0"
app:layout_constraintEnd_toEndOf="@id/btn_9"
app:layout_constraintStart_toStartOf="@id/btn_9"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/btn_0"
app:layout_constraintTop_toTopOf="@id/btn_0" />
......
......@@ -11,7 +11,7 @@
<TextView
style="@style/TitleTextStyle"
android:id="@+id/txt_enter_pin"
android:layout_marginTop="@dimen/_34sdp"
android:layout_marginTop="@dimen/_54sdp"
android:text="@string/enter_pin_code" />
<FrameLayout
......@@ -66,18 +66,19 @@
</FrameLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/btn_view_group"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:gravity="center"
android:layout_weight="2.5">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/btn_view_group"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/btn_1"
style="@style/BtnStyle"
android:layout_width="@dimen/_48sdp"
android:layout_height="@dimen/_44sdp"
android:background="@drawable/bgn_pin_btn"
android:text="@string/_1"
app:layout_constraintEnd_toStartOf="@id/btn_2"
......@@ -87,8 +88,6 @@
<TextView
android:id="@+id/btn_2"
style="@style/BtnStyle"
android:layout_width="@dimen/_48sdp"
android:layout_height="@dimen/_44sdp"
android:background="@drawable/bgn_pin_btn"
android:text="@string/_2"
app:layout_constraintEnd_toStartOf="@id/btn_3"
......@@ -98,8 +97,6 @@
<TextView
android:id="@+id/btn_3"
style="@style/BtnStyle"
android:layout_width="@dimen/_48sdp"
android:layout_height="@dimen/_44sdp"
android:background="@drawable/bgn_pin_btn"
android:text="@string/_3"
app:layout_constraintEnd_toEndOf="parent"
......@@ -109,8 +106,6 @@
<TextView
android:id="@+id/btn_4"
style="@style/BtnStyle"
android:layout_width="@dimen/_48sdp"
android:layout_height="@dimen/_44sdp"
android:layout_marginTop="@dimen/_16sdp"
android:background="@drawable/bgn_pin_btn"
android:text="@string/_4"
......@@ -121,8 +116,6 @@
<TextView
android:id="@+id/btn_5"
style="@style/BtnStyle"
android:layout_width="@dimen/_48sdp"
android:layout_height="@dimen/_44sdp"
android:background="@drawable/bgn_pin_btn"
android:text="@string/_5"
app:layout_constraintEnd_toStartOf="@id/btn_3"
......@@ -132,8 +125,6 @@
<TextView
android:id="@+id/btn_6"
style="@style/BtnStyle"
android:layout_width="@dimen/_48sdp"
android:layout_height="@dimen/_44sdp"
android:background="@drawable/bgn_pin_btn"
android:text="@string/_6"
app:layout_constraintEnd_toEndOf="parent"
......@@ -143,8 +134,6 @@
<TextView
android:id="@+id/btn_7"
style="@style/BtnStyle"
android:layout_width="@dimen/_48sdp"
android:layout_height="@dimen/_44sdp"
android:layout_marginTop="@dimen/_16sdp"
android:background="@drawable/bgn_pin_btn"
android:text="@string/_7"
......@@ -155,8 +144,6 @@
<TextView
android:id="@+id/btn_8"
style="@style/BtnStyle"
android:layout_width="@dimen/_48sdp"
android:layout_height="@dimen/_44sdp"
android:background="@drawable/bgn_pin_btn"
android:text="@string/_8"
app:layout_constraintEnd_toStartOf="@id/btn_3"
......@@ -166,8 +153,6 @@
<TextView
android:id="@+id/btn_9"
style="@style/BtnStyle"
android:layout_width="@dimen/_48sdp"
android:layout_height="@dimen/_44sdp"
android:background="@drawable/bgn_pin_btn"
android:text="@string/_9"
app:layout_constraintEnd_toEndOf="parent"
......@@ -189,8 +174,6 @@
<TextView
android:id="@+id/btn_0"
style="@style/BtnStyle"
android:layout_width="@dimen/_48sdp"
android:layout_height="@dimen/_44sdp"
android:layout_marginTop="@dimen/_16sdp"
android:background="@drawable/bgn_pin_btn"
android:text="@string/_0"
......@@ -213,20 +196,24 @@
<TextView
android:id="@+id/with_password"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_marginTop="@dimen/_30sdp"
android:background="?android:selectableItemBackground"
android:text="Войти по паролю"
android:text="@string/open_with_password"
android:textColor="@color/primary100"
android:textSize="14sp"
android:textStyle="bold"
android:paddingHorizontal="@dimen/_20sdp"
android:paddingVertical="@dimen/_10sdp"
android:paddingVertical="@dimen/_12sdp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/btn_0" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
......@@ -108,6 +108,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="31.12.1999"
android:id="@+id/txt_birthday"
android:textColor="@color/black100"
android:textSize="15sp"
android:layout_marginTop="4dp"
......
......@@ -10,6 +10,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/_30sdp"
android:fitsSystemWindows="false"
android:orientation="vertical">
......@@ -21,7 +22,7 @@
android:layout_marginVertical="@dimen/_20sdp"
android:background="@color/grey10"
android:orientation="vertical"
android:paddingTop="@dimen/_22sdp"
android:paddingTop="@dimen/_12sdp"
android:visibility="gone">
<ImageView
......@@ -65,7 +66,6 @@
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/_24sdp"
android:layout_marginBottom="10dp"
android:visibility="visible"
app:navigationIcon="@drawable/ic_menu_red" />
......
......@@ -14,40 +14,87 @@
app:navigationIcon="@drawable/ic_baseline_arrow_back" />
<TextView
style="@style/TitleTextStyle"
android:id="@+id/txt_enter_phone"
android:layout_marginTop="@dimen/_14sdp"
android:text="@string/enter_verification"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbar" />
<TextView
android:id="@+id/txt_error_code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/_16sdp"
android:layout_marginTop="@dimen/_14sdp"
android:text="@string/enter_verification"
android:textSize="29sp"
android:layout_marginTop="32dp"
android:visibility="gone"
android:text="@string/error_code"
android:textSize="17sp"
android:textColor="@color/primary100"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbar" />
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/txt_enter_phone" />
<com.poovam.pinedittextfield.SquarePinField
android:id="@+id/line_field"
android:layout_width="@dimen/_220sdp"
<FrameLayout
android:id="@+id/pin_view_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="64dp"
android:hint="******"
android:imeOptions="actionDone"
android:inputType="number"
android:paddingHorizontal="@dimen/_14sdp"
android:textColorHint="@color/black"
android:textSize="20sp"
android:textStyle="bold"
app:cornerRadius="@dimen/_6sdp"
app:fieldColor="@color/grey80"
app:highlightType="allFields"
app:isCursorEnabled="true"
android:layout_marginHorizontal="@dimen/_12sdp"
android:layout_marginTop="@dimen/_80sdp"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/txt_enter_phone"
app:lineThickness="1dp"
app:noOfFields="6" />
app:layout_constraintTop_toBottomOf="@id/txt_enter_phone">
<LinearLayout
android:id="@+id/pin_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/pin_1"
style="@style/PinStyle"
android:background="@drawable/bgn_ver_unchecked" />
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/pin_2"
style="@style/PinStyle"
android:background="@drawable/bgn_ver_unchecked" />
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/pin_3"
style="@style/PinStyle"
android:background="@drawable/bgn_ver_unchecked" />
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/pin_4"
style="@style/PinStyle"
android:background="@drawable/bgn_ver_unchecked" />
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/pin_5"
style="@style/PinStyle"
android:background="@drawable/bgn_ver_unchecked" />
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/pin_6"
style="@style/PinStyle"
android:background="@drawable/bgn_ver_unchecked"
android:imeOptions="actionDone" />
</LinearLayout>
<FrameLayout
android:id="@+id/frame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="visible" />
</FrameLayout>
<LinearLayout
android:layout_width="wrap_content"
......@@ -56,7 +103,7 @@
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/line_field">
app:layout_constraintTop_toBottomOf="@+id/pin_view_group">
<TextView
android:id="@+id/countWaitText"
......@@ -88,9 +135,9 @@
app:suffixMillisecond="ss"
app:suffixMinute=":"
app:suffixSecond=""
app:suffixTextColor="#97ADB6"
app:suffixTextColor="@color/grey100"
app:suffixTextSize="14sp"
app:timeBgColor="#00FF5000"
app:timeBgColor="@color/white100"
app:timeBgRadius="3dp"
app:timeBgSize="14dp"
app:timeTextSize="14sp" />
......@@ -110,10 +157,11 @@
<TextView
android:id="@+id/sent_code_again"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:gravity="center"
android:layout_marginTop="@dimen/_10sdp"
android:layout_marginHorizontal="@dimen/_16sdp"
android:background="?selectableItemBackground"
android:padding="@dimen/_10sdp"
android:text="@string/sent_code_again"
......@@ -127,6 +175,7 @@
app:layout_constraintTop_toBottomOf="@+id/btn_login" />
<Button
android:id="@+id/btn_login"
android:layout_width="match_parent"
......@@ -138,7 +187,7 @@
android:text="@string/continuoue"
android:textSize="@dimen/_12sdp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/line_field" />
app:layout_constraintTop_toBottomOf="@id/pin_view_group" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -22,7 +22,7 @@
android:layout_marginHorizontal="22dp"
android:gravity="center"
android:text="@string/exit"
android:textSize="16sp" />
android:textSize="20sp" />
<TextView
android:id="@+id/text_subtitle"
......@@ -33,7 +33,7 @@
android:layout_marginHorizontal="22dp"
android:layout_marginTop="12dp"
android:text="@string/are_you_sure"
android:textSize="16sp" />
android:textSize="18sp" />
<View
android:layout_width="match_parent"
android:layout_marginTop="32dp"
......@@ -52,9 +52,10 @@
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="center"
android:textSize="16sp"
android:background="?android:selectableItemBackground"
android:textStyle="bold"
android:paddingVertical="14dp"
android:paddingVertical="16dp"
android:layout_height="wrap_content"
android:text="@string/no"
android:textAllCaps="false"
......@@ -69,8 +70,9 @@
android:id="@+id/btn_done"
android:layout_width="0dp"
android:layout_weight="1"
android:paddingVertical="14dp"
android:paddingVertical="16dp"
android:gravity="center"
android:textSize="16sp"
android:background="?android:selectableItemBackground"
android:textStyle="bold"
android:layout_gravity="center"
......
......@@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/nav_graph_settings"
app:startDestination="@id/serviceFragment">
app:startDestination="@id/fullScreenFragment">
<fragment
android:id="@+id/serviceFragment"
tools:layout="@layout/fragment_service"
......@@ -14,4 +14,10 @@
android:name="com.mobiuz.app.dev.ui.service.UssdFragment"
android:label="ServicesFragmentActivity" />
<fragment
android:id="@+id/fullScreenFragment"
tools:layout="@layout/fragment_pin_dialog"
android:name="com.mobiuz.app.dev.ui.global.FullScreenFragment"
android:label="FullScreenFragment" />
</navigation>
\ No newline at end of file
......@@ -6,6 +6,12 @@
android:id="@+id/nav_graph_profile">
<fragment
android:id="@+id/fullScreenFragment"
tools:layout="@layout/fragment_pin_dialog"
android:name="com.mobiuz.app.dev.ui.global.FullScreenFragment"
android:label="FullScreenFragment" />
<fragment
android:id="@+id/serviceFragment"
tools:layout="@layout/fragment_service"
android:name="com.mobiuz.app.dev.ui.service.ServiceFragment"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment