Browse Source

Almost there link

master
Manoj 2 years ago
parent
commit
82edee4325
7 changed files with 47 additions and 50 deletions
  1. +17
    -22
      app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/ui/activities1/SignUpActivity.kt
  2. +11
    -3
      app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/ui/fragments1/GetStartedFragment.kt
  3. +8
    -5
      app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/ui/fragments1/OTPFragment.kt
  4. +0
    -2
      app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/ui/fragments1/SignUpFragment.kt
  5. +2
    -12
      app/src/main/res/layout/fragment_get_started.xml
  6. +4
    -1
      app/src/main/res/values-hi-rIN/strings.xml
  7. +5
    -5
      app/src/main/res/values/themes.xml

+ 17
- 22
app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/ui/activities1/SignUpActivity.kt View File

@ -1,9 +1,6 @@
package com.nivesh.production.niveshfd.partnerOnBoarding.ui.activities1 package com.nivesh.production.niveshfd.partnerOnBoarding.ui.activities1
import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.window.OnBackInvokedDispatcher
import androidx.activity.OnBackPressedCallback
import com.nivesh.production.niveshfd.R import com.nivesh.production.niveshfd.R
import com.nivesh.production.niveshfd.databinding.ActivitySignupBinding import com.nivesh.production.niveshfd.databinding.ActivitySignupBinding
import com.nivesh.production.niveshfd.fd.ui.activity.BaseActivity import com.nivesh.production.niveshfd.fd.ui.activity.BaseActivity
@ -31,22 +28,22 @@ class SignUpActivity : BaseActivity() {
.commit() .commit()
} }
@Deprecated("Deprecated in Java")
override fun onBackPressed() {
if (Build.VERSION.SDK_INT >= 33) {
onBackInvokedDispatcher.registerOnBackInvokedCallback(
OnBackInvokedDispatcher.PRIORITY_DEFAULT
) {
exitOnBackPressed()
}
} else {
onBackPressedDispatcher.addCallback(this, object : OnBackPressedCallback(true) {
override fun handleOnBackPressed() {
exitOnBackPressed()
}
})
}
}
// @Deprecated("Deprecated in Java")
// override fun onBackPressed() {
// if (Build.VERSION.SDK_INT >= 33) {
// onBackInvokedDispatcher.registerOnBackInvokedCallback(
// OnBackInvokedDispatcher.PRIORITY_DEFAULT
// ) {
// exitOnBackPressed()
// }
// } else {
// onBackPressedDispatcher.addCallback(this, object : OnBackPressedCallback(true) {
// override fun handleOnBackPressed() {
// exitOnBackPressed()
// }
// })
// }
// }
private fun exitOnBackPressed() { private fun exitOnBackPressed() {
if (isTaskRoot) { if (isTaskRoot) {
@ -55,6 +52,4 @@ class SignUpActivity : BaseActivity() {
} }
} }
}
}

+ 11
- 3
app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/ui/fragments1/GetStartedFragment.kt View File

@ -1,12 +1,12 @@
package com.nivesh.production.niveshfd.partnerOnBoarding.ui.fragments1 package com.nivesh.production.niveshfd.partnerOnBoarding.ui.fragments1
import android.os.Build.VERSION_CODES.R
import android.os.Bundle import android.os.Bundle
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import com.nivesh.production.niveshfd.R
import com.nivesh.production.niveshfd.databinding.FragmentGetStartedBinding import com.nivesh.production.niveshfd.databinding.FragmentGetStartedBinding
import com.nivesh.production.niveshfd.databinding.FragmentOtpBinding
import com.nivesh.production.niveshfd.fd.ui.activity.BaseActivity
private const val ARG_PARAM1 = "param1" private const val ARG_PARAM1 = "param1"
private const val ARG_PARAM2 = "param2" private const val ARG_PARAM2 = "param2"
@ -39,7 +39,15 @@ class GetStartedFragment : BaseFragment() {
private fun init() { private fun init() {
binding.btnNext.setOnClickListener {
replaceFragment(
activity as BaseActivity,
R.id.signUpContainer,
AlmostThereFragment(),
"GET STARTED",
true
)
}
} }
companion object { companion object {


+ 8
- 5
app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/ui/fragments1/OTPFragment.kt View File

@ -57,13 +57,19 @@ class OTPFragment : BaseFragment() {
binding.txtDigit.text = getString(R.string.sixDigitOTP).plus(" ").plus("+91.00000.00000") binding.txtDigit.text = getString(R.string.sixDigitOTP).plus(" ").plus("+91.00000.00000")
binding.txtResendOTP.setOnClickListener{
binding.txtResendOTP.setOnClickListener {
} }
binding.btnSubmit.setOnClickListener { binding.btnSubmit.setOnClickListener {
if (validate()) { if (validate()) {
replaceFragment(activity as BaseActivity, R.id.signUpContainer,GetStartedFragment(),"GET STARTED", true)
replaceFragment(
activity as BaseActivity,
R.id.signUpContainer,
GetStartedFragment(),
"GET STARTED",
true
)
} }
} }
} }
@ -158,7 +164,4 @@ class OTPFragment : BaseFragment() {
} }
} }
} }

+ 0
- 2
app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/ui/fragments1/SignUpFragment.kt View File

@ -76,6 +76,4 @@ class SignUpFragment : BaseFragment() {
return true return true
} }
} }
} }

+ 2
- 12
app/src/main/res/layout/fragment_get_started.xml View File

@ -337,7 +337,7 @@
android:layout_marginBottom="@dimen/margin_20" android:layout_marginBottom="@dimen/margin_20"
android:layout_marginStart="@dimen/margin_5" android:layout_marginStart="@dimen/margin_5"
android:layout_marginEnd="@dimen/margin_15" android:layout_marginEnd="@dimen/margin_15"
android:text="@string/next"
android:text="@string/continueText"
android:textColor="@color/white" android:textColor="@color/white"
android:backgroundTint="@color/red" android:backgroundTint="@color/red"
app:cornerRadius="@dimen/margin_15" app:cornerRadius="@dimen/margin_15"
@ -346,16 +346,6 @@
app:layout_constraintStart_toEndOf="@+id/saveDraft" app:layout_constraintStart_toEndOf="@+id/saveDraft"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@+id/saveDraft" app:layout_constraintLeft_toRightOf="@+id/saveDraft"
app:layout_constraintRight_toRightOf="parent"
/>
app:layout_constraintRight_toRightOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

+ 4
- 1
app/src/main/res/values-hi-rIN/strings.xml View File

@ -309,6 +309,9 @@
<string name="let_s_get_started">Let’s get started</string> <string name="let_s_get_started">Let’s get started</string>
<string name="save_draft">SAVE DRAFT</string> <string name="save_draft">SAVE DRAFT</string>
<string name="format_png_or_jpg">Format (.png or .jpg)</string> <string name="format_png_or_jpg">Format (.png or .jpg)</string>
<string name="hello_blank_fragment">Hello blank fragment</string>
<string name="hintEmailMobile">enter Mobile or Email</string>
<string name="hintPassword">enter Password</string>
<string name="loginWithGoogle">Login With Google</string>
</resources> </resources>

+ 5
- 5
app/src/main/res/values/themes.xml View File

@ -43,11 +43,11 @@
<item name="android:solidColor">@color/white</item> <item name="android:solidColor">@color/white</item>
</style> </style>
<style name="Theme.lightRed" parent="Widget.MaterialComponents.Button.OutlinedButton">
<item name="colorPrimary">@color/button_red</item>
<item name="elevation">@dimen/margin_8</item>
<item name="android:solidColor">@color/white</item>
</style>
<!-- <style name="Theme.lightRed" parent="Widget.MaterialComponents.Button.OutlinedButton">-->
<!-- <item name="colorPrimary">@color/button_red</item>-->
<!-- <item name="elevation">@dimen/margin_8</item>-->
<!-- <item name="android:solidColor">@color/white</item>-->
<!-- </style>-->
<style name="SCBSwitch1" parent="Theme.AppCompat.Light"> <style name="SCBSwitch1" parent="Theme.AppCompat.Light">
<!-- active thumb & track color (30% transparency) --> <!-- active thumb & track color (30% transparency) -->


Loading…
Cancel
Save

Powered by TurnKey Linux.