12 Commits

38 changed files with 1428 additions and 236 deletions
Unified View
  1. +0
    -1
      app/build.gradle
  2. +2
    -3
      app/src/main/AndroidManifest.xml
  3. +5
    -1
      app/src/main/java/com/nivesh/production/niveshfd/fd/db/PreferenceManager.kt
  4. +1
    -0
      app/src/main/java/com/nivesh/production/niveshfd/fd/interfaces/IPreferenceHelper.kt
  5. +2
    -2
      app/src/main/java/com/nivesh/production/niveshfd/fd/ui/fragment/StepThreeNiveshFDFragment.kt
  6. +113
    -0
      app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/adapters1/NewDistributorSignStepOneAdapter.kt
  7. +21
    -25
      app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/ui/activities1/SignUpActivity.kt
  8. +6
    -4
      app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/ui/fragments1/AlmostThereFragment.kt
  9. +514
    -30
      app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/ui/fragments1/GetStartedFragment.kt
  10. +50
    -0
      app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/ui/fragments1/NewDistributorSignStepOne.kt
  11. +17
    -5
      app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/ui/fragments1/OTPFragment.kt
  12. +9
    -3
      app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/ui/fragments1/SignUpFragment.kt
  13. +35
    -0
      app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/util/MaskWatcher.kt
  14. +6
    -0
      app/src/main/res/drawable/dot_background.xml
  15. BIN
      app/src/main/res/drawable/dot_rect.png
  16. +5
    -0
      app/src/main/res/drawable/round_corner_button.xml
  17. +8
    -0
      app/src/main/res/drawable/round_corner_grey_button.xml
  18. +8
    -0
      app/src/main/res/drawable/round_corner_grey_button_fill.xml
  19. +11
    -0
      app/src/main/res/drawable/round_corner_with_red_bg.xml
  20. +20
    -5
      app/src/main/res/drawable/svg_close.xml
  21. +20
    -0
      app/src/main/res/drawable/svg_cross.xml
  22. +14
    -0
      app/src/main/res/drawable/svg_info.xml
  23. +12
    -0
      app/src/main/res/drawable/svg_rect_dot.xml
  24. +11
    -0
      app/src/main/res/drawable/svg_tik.xml
  25. +0
    -2
      app/src/main/res/layout/activity_login.xml
  26. +0
    -3
      app/src/main/res/layout/activity_register.xml
  27. +15
    -0
      app/src/main/res/layout/dot_layout.xml
  28. +13
    -0
      app/src/main/res/layout/fragment_almost_there.xml
  29. +242
    -151
      app/src/main/res/layout/fragment_get_started.xml
  30. +86
    -0
      app/src/main/res/layout/new_distributor_sign_step_one.xml
  31. +120
    -0
      app/src/main/res/layout/new_distributor_sign_step_one_adapter.xml
  32. +16
    -1
      app/src/main/res/values-hi-rIN/strings.xml
  33. +3
    -0
      app/src/main/res/values/colors.xml
  34. +1
    -0
      app/src/main/res/values/dimens.xml
  35. +20
    -0
      app/src/main/res/values/strings.xml
  36. +11
    -0
      app/src/main/res/values/style.xml
  37. +8
    -0
      app/src/main/res/values/themes.xml
  38. +3
    -0
      app/src/main/res/xml/file_paths.xml

+ 0
- 1
app/build.gradle View File

@ -72,5 +72,4 @@ dependencies {
// Navigation Components // Navigation Components
implementation "androidx.navigation:navigation-fragment-ktx:2.5.3" implementation "androidx.navigation:navigation-fragment-ktx:2.5.3"
implementation "androidx.navigation:navigation-ui-ktx:2.5.3" implementation "androidx.navigation:navigation-ui-ktx:2.5.3"
} }

+ 2
- 3
app/src/main/AndroidManifest.xml View File

@ -4,8 +4,6 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="ANDROID.PERMISSION.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="ANDROID.PERMISSION.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/> <uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
@ -13,7 +11,7 @@
<uses-feature <uses-feature
android:name="android.hardware.camera" android:name="android.hardware.camera"
android:required="false" />
android:required="true" />
<uses-feature <uses-feature
android:name="android.hardware.camera.autofocus" android:name="android.hardware.camera.autofocus"
android:required="false" /> android:required="false" />
@ -29,6 +27,7 @@
android:label="@string/appName" android:label="@string/appName"
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true" android:supportsRtl="true"
android:requestLegacyExternalStorage="true"
android:theme="@style/Theme.NiveshFDSDK" android:theme="@style/Theme.NiveshFDSDK"
tools:targetApi="31"> tools:targetApi="31">


+ 5
- 1
app/src/main/java/com/nivesh/production/niveshfd/fd/db/PreferenceManager.kt View File

@ -2,6 +2,7 @@ package com.nivesh.production.niveshfd.fd.db
import android.content.Context import android.content.Context
import android.content.SharedPreferences import android.content.SharedPreferences
import android.provider.UserDictionary.Words.APP_ID
import com.nivesh.production.niveshfd.fd.interfaces.IPreferenceHelper import com.nivesh.production.niveshfd.fd.interfaces.IPreferenceHelper
open class PreferenceManager(context: Context) : IPreferenceHelper { open class PreferenceManager(context: Context) : IPreferenceHelper {
@ -19,6 +20,7 @@ open class PreferenceManager(context: Context) : IPreferenceHelper {
const val CLIENT_LANGUAGE = "LANGUAGE" const val CLIENT_LANGUAGE = "LANGUAGE"
const val ISFIRST_TIME = "IS FIRST TIME" const val ISFIRST_TIME = "IS FIRST TIME"
const val APP_ID = "AppId"
} }
@ -96,7 +98,9 @@ open class PreferenceManager(context: Context) : IPreferenceHelper {
return preferences[ISFIRST_TIME] ?: false return preferences[ISFIRST_TIME] ?: false
} }
override fun getAppId(): String {
return preferences[APP_ID] ?: ""
}
override fun clearPrefs() { override fun clearPrefs() {
preferences.edit().clear().apply() preferences.edit().clear().apply()


+ 1
- 0
app/src/main/java/com/nivesh/production/niveshfd/fd/interfaces/IPreferenceHelper.kt View File

@ -30,4 +30,5 @@ interface IPreferenceHelper {
fun getFirstTime(): Boolean fun getFirstTime(): Boolean
fun clearPrefs() fun clearPrefs()
fun getAppId(): String
} }

+ 2
- 2
app/src/main/java/com/nivesh/production/niveshfd/fd/ui/fragment/StepThreeNiveshFDFragment.kt View File

@ -44,7 +44,7 @@ import java.util.*
class StepThreeNiveshFDFragment : Fragment() { class StepThreeNiveshFDFragment : Fragment() {
// private var _binding: FragmentNiveshfdStepThreeBinding? = null
private var _binding: FragmentNiveshfdStepThreeBinding? = null private var _binding: FragmentNiveshfdStepThreeBinding? = null
private val binding get() = _binding!! private val binding get() = _binding!!
@ -692,7 +692,7 @@ class StepThreeNiveshFDFragment : Fragment() {
private fun getTmpFileUri(): Uri { private fun getTmpFileUri(): Uri {
val tmpFile = val tmpFile =
File.createTempFile("tmp_image_file", ".png", requireActivity().cacheDir).apply {
File.createTempFile("tmp_image_file", ".png", (activity as NiveshFdMainActivity).cacheDir).apply {
createNewFile() createNewFile()
deleteOnExit() deleteOnExit()
} }


+ 113
- 0
app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/adapters1/NewDistributorSignStepOneAdapter.kt View File

@ -0,0 +1,113 @@
package com.nivesh.production.niveshfd.partnerOnBoarding.adapters1
import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.CheckBox
import android.widget.LinearLayout
import android.widget.RadioButton
import android.widget.RadioGroup
import android.widget.RelativeLayout
import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.textfield.TextInputLayout
import com.nivesh.production.niveshfd.R
import com.nivesh.production.niveshfd.partnerOnBoarding.ui.fragments1.NewDistributorSignStepOne
class NewDistributorSignStepOneAdapter(private var listData: MutableList<String>) :
RecyclerView.Adapter<NewDistributorSignStepOneAdapter.ViewHolder>() {
private var context: Context? = null
private var isPosBroker: Boolean? = false
var isPosInsurer: Boolean? = false
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
context = parent.context
return ViewHolder(
LayoutInflater.from(parent.context)
.inflate(R.layout.new_distributor_sign_step_one_adapter, parent, false)
)
}
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
holder.checkBox.text = listData[position]
holder.checkBox.setOnCheckedChangeListener { _, isChecked ->
if (isChecked) {
if (listData[position] == "Insurance") holder.rlInsurance.visibility = View.VISIBLE
else holder.rlInsurance.visibility = View.GONE
if (listData[position] == "Other") holder.tlOtherName.visibility = View.VISIBLE
else holder.tlOtherName.visibility = View.GONE
NewDistributorSignStepOne.listMapData = mutableMapOf(position to listData[position])
} else {
if (listData[position] == "Insurance")
holder.rlInsurance.visibility = View.GONE
if (listData[position] == "Other")
holder.tlOtherName.visibility = View.GONE
NewDistributorSignStepOne.listMapData?.remove(position)
}
}
holder.tvPosInsurer.setOnClickListener {
if (isPosInsurer == true) {
holder.tvPosInsurer.setBackgroundResource(R.drawable.round_corner_grey_button)
holder.tvPosInsurer.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0)
holder.tvPosInsurer.compoundDrawablePadding = 0
isPosInsurer = false
} else {
holder.tvPosInsurer.setBackgroundResource(R.drawable.round_corner_grey_button_fill)
holder.tvPosInsurer.setCompoundDrawablesWithIntrinsicBounds(
0,
0,
R.drawable.svg_tik,
0
)
holder.tvPosInsurer.compoundDrawablePadding = 20
isPosInsurer = true
}
}
holder.tvPOSBroker.setOnClickListener {
if (isPosBroker == true) {
holder.tvPOSBroker.setBackgroundResource(R.drawable.round_corner_grey_button)
holder.tvPOSBroker.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0)
holder.tvPOSBroker.compoundDrawablePadding = 0
isPosBroker = false
} else {
holder.tvPOSBroker.setBackgroundResource(R.drawable.round_corner_grey_button_fill)
holder.tvPOSBroker.setCompoundDrawablesWithIntrinsicBounds(
0,
0,
R.drawable.svg_tik,
0
)
holder.tvPOSBroker.compoundDrawablePadding = 20
isPosBroker = true
}
}
holder.radioGroup.setOnCheckedChangeListener { group, checkedId ->
var rb: RadioButton = group.findViewById(checkedId)
if(rb.text.equals("Yes"))
holder.llPOS.visibility = View.VISIBLE
else holder.llPOS.visibility = View.GONE
}
}
override fun getItemCount(): Int {
return listData.size
}
class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
val checkBox: CheckBox = itemView.findViewById(R.id.checkBox)
val rlInsurance: RelativeLayout = itemView.findViewById(R.id.rlInsurance)
val tvPosInsurer: TextView = itemView.findViewById(R.id.tvPosInsurer)
val tvPOSBroker: TextView = itemView.findViewById(R.id.tvPOSBroker)
val tlOtherName: TextInputLayout = itemView.findViewById(R.id.tlOtherName)
val radioGroup: RadioGroup = itemView.findViewById(R.id.radioGroup)
val llPOS: LinearLayout = itemView.findViewById(R.id.llPOS)
}
}

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

@ -1,15 +1,13 @@
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 android.util.Log
import androidx.fragment.app.FragmentManager
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
import com.nivesh.production.niveshfd.partnerOnBoarding.ui.fragments1.SignUpFragment import com.nivesh.production.niveshfd.partnerOnBoarding.ui.fragments1.SignUpFragment
class SignUpActivity : BaseActivity() { class SignUpActivity : BaseActivity() {
lateinit var binding: ActivitySignupBinding lateinit var binding: ActivitySignupBinding
var type : Int? = null var type : Int? = null
@ -20,33 +18,33 @@ class SignUpActivity : BaseActivity() {
} }
private fun init() { private fun init() {
type = intent.getIntExtra("type", 0);
type = intent.getIntExtra("type", 0)
binding = ActivitySignupBinding.inflate(layoutInflater) binding = ActivitySignupBinding.inflate(layoutInflater)
binding.apply { binding.apply {
setContentView(this.root) setContentView(this.root)
} }
val bundle = Bundle()
bundle.putInt("type", type!!)
val fragment = SignUpFragment()
fragment.arguments = bundle
supportFragmentManager.beginTransaction() supportFragmentManager.beginTransaction()
.add(R.id.signUpContainer, SignUpFragment())
.add(R.id.signUpContainer, fragment)
.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()
}
})
}
}
// override fun onBackPressed() {
// val fm: FragmentManager = supportFragmentManager
// if (fm.backStackEntryCount > 0) {
// Log.i("MainActivity", "popping backstack")
// fm.popBackStack()
// } else {
// Log.i("MainActivity", "nothing on backstack, calling super")
// super.onBackPressed()
// }
// }
private fun exitOnBackPressed() { private fun exitOnBackPressed() {
if (isTaskRoot) { if (isTaskRoot) {
@ -55,6 +53,4 @@ class SignUpActivity : BaseActivity() {
} }
} }
}
}

+ 6
- 4
app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/ui/fragments1/AlmostThereFragment.kt View File

@ -7,10 +7,13 @@ import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import com.nivesh.production.niveshfd.R
import com.nivesh.production.niveshfd.databinding.FragmentAlmostThereBinding import com.nivesh.production.niveshfd.databinding.FragmentAlmostThereBinding
import com.nivesh.production.niveshfd.fd.ui.activity.BaseActivity
import com.nivesh.production.niveshfd.fd.util.Common import com.nivesh.production.niveshfd.fd.util.Common
import com.nivesh.production.niveshfd.partnerOnBoarding.ui.activities1.SignUpActivity
class AlmostThereFragment : Fragment() {
class AlmostThereFragment : BaseFragment() {
private var _binding: FragmentAlmostThereBinding? = null private var _binding: FragmentAlmostThereBinding? = null
private val binding get() = _binding!! private val binding get() = _binding!!
@ -103,7 +106,8 @@ class AlmostThereFragment : Fragment() {
} }
binding.btnBack.setOnClickListener { binding.btnBack.setOnClickListener {
// (activity as SignUpActivity).onBackPressedDispatcher
(activity as SignUpActivity).onBackPressedDispatcher.onBackPressed()
} }
binding.btnNext.setOnClickListener { binding.btnNext.setOnClickListener {
@ -111,8 +115,6 @@ class AlmostThereFragment : Fragment() {
// submit // submit
} }
} }
} }
private fun validate(): Boolean { private fun validate(): Boolean {


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

@ -1,32 +1,110 @@
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.Manifest
import android.annotation.SuppressLint
import android.app.Activity
import android.content.DialogInterface
import android.content.pm.PackageManager
import android.database.Cursor
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.graphics.Color
import android.net.Uri
import android.os.Bundle import android.os.Bundle
import android.provider.OpenableColumns
import android.text.Editable
import android.text.TextWatcher
import android.util.Base64
import android.util.Log
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 android.widget.ArrayAdapter
import androidx.activity.result.ActivityResultLauncher
import androidx.activity.result.contract.ActivityResultContracts
import androidx.appcompat.app.AlertDialog
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat
import androidx.core.content.FileProvider
import androidx.lifecycle.lifecycleScope
import com.nivesh.production.niveshfd.BuildConfig
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
private const val ARG_PARAM1 = "param1"
private const val ARG_PARAM2 = "param2"
import com.nivesh.production.niveshfd.fd.ui.activity.BaseActivity
import com.nivesh.production.niveshfd.fd.util.Common
import com.nivesh.production.niveshfd.fd.util.Common.Companion.getFileExtension
import com.nivesh.production.niveshfd.fd.util.Common.Companion.showDialogWithTwoButtons
import com.nivesh.production.niveshfd.fd.util.ImageUtil
import com.nivesh.production.niveshfd.partnerOnBoarding.ui.activities1.SignUpActivity
import java.io.*
class GetStartedFragment : BaseFragment() { class GetStartedFragment : BaseFragment() {
// TODO: Rename and change types of parameters
private var param1: String? = null
private var param2: String? = null
private var _binding: FragmentGetStartedBinding? = null private var _binding: FragmentGetStartedBinding? = null
private val binding get() = _binding!! private val binding get() = _binding!!
private var latestTmpUri: Uri? = null
private var takeImageResult: ActivityResultLauncher<Uri>? = null
private var selectImageIntent: ActivityResultLauncher<String>? = null
private var bitmap: Bitmap? = null
private val mainPANUpload: Int = 1
private val mainPhotoUpload: Int = 2
private val firstDocUpload: Int = 3
private val secondDocUpload: Int = 4
private var actionType: Int = -1
private var panString: String = ""
private var photoString: String = ""
private var docString: String = ""
private var docString2: String = ""
private var panFileExt: String? = ""
private var photoFileExt: String? = ""
private var doc1FileExt: String? = ""
private var doc2fileExt: String? = ""
private var docValue: String = ""
private var uploadPosition = 0
private var isFront: Boolean = false
private val listArray = ArrayList<String>()
private val permissions = arrayOf(
Manifest.permission.READ_EXTERNAL_STORAGE,
Manifest.permission.WRITE_EXTERNAL_STORAGE
)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
arguments?.let {
param1 = it.getString(ARG_PARAM1)
param2 = it.getString(ARG_PARAM2)
private val requestCameraPermission = registerForActivityResult(
ActivityResultContracts.RequestPermission()
) { isGranted: Boolean ->
if (isGranted) {
takeImage()
} else {
showDialogWithTwoButtons(
(activity as SignUpActivity), getString(R.string.cameraPermission), getString(
R.string.permissionRequired
)
)
} }
} }
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
private val requestGalleryPermission = registerForActivityResult(
ActivityResultContracts.RequestMultiplePermissions()
) { permission ->
// if (!permission.containsValue(false)) {
selectImageIntent?.launch("image/*")
// } else {
// showDialogWithTwoButtons(
// (activity as SignUpActivity),
// getString(R.string.galleryPermission),
// getString(
// R.string.permissionsRequired
// )
// )
// }
}
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View {
// Inflate the layout for this fragment // Inflate the layout for this fragment
_binding = FragmentGetStartedBinding.inflate(inflater, container, false) _binding = FragmentGetStartedBinding.inflate(inflater, container, false)
return binding.root return binding.root
@ -37,28 +115,434 @@ class GetStartedFragment : BaseFragment() {
init() init()
} }
private fun uriToBitmap(selectedFileUri: Uri): Bitmap? {
try {
val parcelFileDescriptor =
requireActivity().contentResolver.openFileDescriptor(selectedFileUri, "r")
val fileDescriptor: FileDescriptor = parcelFileDescriptor!!.fileDescriptor
val image = BitmapFactory.decodeFileDescriptor(fileDescriptor)
parcelFileDescriptor.close()
return image
} catch (e: IOException) {
e.printStackTrace()
}
return null
}
private fun isInputCorrect(
s: Editable,
totalSymbols: Int,
dividerModulo: Int,
divider: Char
): Boolean {
var isCorrect = s.length <= totalSymbols // check size of entered string
for (i in 0 until s.length) { // check that every element is right
isCorrect = if (i > 0 && (i + 1) % dividerModulo == 0) {
isCorrect and (divider == s[i])
} else {
isCorrect and Character.isDigit(s[i])
}
}
return isCorrect
}
private fun init() { private fun init() {
var total_SYMBOLS: Int = 14
var TOTAL_DIGITS: Int = 12 // max numbers of digits in pattern: 0000 x 4
var DIVIDER_MODULO: Int = 4 // means divider position is every 5th symbol beginning with 1
var DIVIDER_POSITION: Int = DIVIDER_MODULO - 1; // means divider position is every 4th symbol beginning with 0
var DIVIDER: Char = '-'
binding.edtEuinNumber.addTextChangedListener(object : TextWatcher{
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {}
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {}
override fun afterTextChanged(s: Editable?) {
if (!isInputCorrect(s!!, total_SYMBOLS, DIVIDER_MODULO, DIVIDER)) {
s?.replace(0, s.length, buildCorrectString(getDigitArray(s, TOTAL_DIGITS)!!, DIVIDER_POSITION, DIVIDER))
}
}
private fun isInputCorrect(
s: Editable,
totalSymbols: Int,
dividerModulo: Int,
divider: Char
): Boolean {
var isCorrect = s.length <= totalSymbols // check size of entered string
for (i in s.indices) { // check that every element is right
isCorrect = if (i > 0 && (i + 1) % dividerModulo == 0) {
isCorrect and (divider == s[i])
} else {
isCorrect and Character.isDigit(s[i])
}
}
return isCorrect
}
private fun buildCorrectString(
digits: CharArray,
dividerPosition: Int,
divider: Char
): String? {
val formatted = StringBuilder()
for (i in digits.indices) {
if (digits[i].code != 0) {
formatted.append(digits[i])
if (i > 0 && i < digits.size - 1 && (i + 1) % dividerPosition == 0) {
formatted.append(divider)
}
}
}
return formatted.toString()
}
private fun getDigitArray(s: Editable, size: Int): CharArray? {
val digits = CharArray(size)
var index = 0
var i = 0
while (i < s.length && index < size) {
val current = s[i]
if (Character.isDigit(current)) {
digits[index] = current
index++
}
i++
}
return digits
}
})
// binding.edtEuinNumber.doAfterTextChanged {
// val formattedText = binding.edtEuinNumber.toString().replace(" ", "").chunked(4).joinToString("/")
// if (formattedText != binding.edtEuinNumber.toString()) {
// binding.edtEuinNumber.setText(formattedText)
// binding.edtEuinNumber.setSelection(binding.edtEuinNumber.length())
// }
// }
selectImageIntent = registerForActivityResult(ActivityResultContracts.GetContent())
{ uri: Uri? ->
if (uri != null) {
bitmap = uriToBitmap(uri)
uploadDocument(uri, "g")
}
}
takeImageResult =
registerForActivityResult(ActivityResultContracts.TakePicture()) { isSuccess ->
if (isSuccess) {
latestTmpUri?.let { uri ->
uploadDocument(uri, "c")
}
}
}
binding.btnNext.setOnClickListener {
replaceFragment(
activity as BaseActivity,
R.id.signUpContainer,
AlmostThereFragment(),
"GET STARTED",
true
)
}
listArray.add("Aadhaar")
listArray.add("Passport")
listArray.add("Driving Licenses")
listArray.add("Voter Id")
val arrayAdapter = ArrayAdapter(
activity as SignUpActivity,
androidx.appcompat.R.layout.support_simple_spinner_dropdown_item,
listArray
)
binding.spDocType.setAdapter(arrayAdapter)
binding.spDocType.setOnItemClickListener { _, _, position, _ ->
setVisibility(listArray[position])
}
binding.uploadFront.setOnClickListener {
actionType = mainPANUpload
isFront = true
selectImage()
}
binding.mbUploadChangeFront.setOnClickListener {
actionType = mainPANUpload
isFront = true
selectImage()
}
binding.mbUploadChangeBack.setOnClickListener {
actionType = mainPANUpload
isFront = false
selectImage()
}
binding.uploadBack.setOnClickListener {
actionType = mainPANUpload
isFront = false
selectImage()
}
}
private fun setUploadOption(checked: Boolean) {
isFront = checked
}
private fun selectImage() {
val builder = AlertDialog.Builder(
activity as SignUpActivity
)
builder.setTitle(getString(R.string.addPhoto))
builder.setItems(
arrayOf(
getString(R.string.takePhoto),
getString(R.string.chooseFromGallery),
getString(R.string.cancel)
)
) { dialog: DialogInterface, pos ->
when (pos) {
0 -> {
if (hasPermissions(
activity as SignUpActivity,
Manifest.permission.CAMERA
)
) {
takeImage()
} else {
onClickRequestPermission()
}
dialog.dismiss()
}
1 -> {
if (hasPermissions(activity as SignUpActivity, *permissions)) {
selectImageIntent?.launch("image/*")
} else {
requestGalleryPermission.launch(permissions)
}
dialog.dismiss()
}
else -> {
dialog.dismiss()
}
}
}
builder.show()
}
private fun onClickRequestPermission() {
when {
ContextCompat.checkSelfPermission(
activity as SignUpActivity,
Manifest.permission.CAMERA
) == PackageManager.PERMISSION_GRANTED -> {
}
ActivityCompat.shouldShowRequestPermissionRationale(
activity as SignUpActivity,
Manifest.permission.CAMERA
) -> {
requestCameraPermission.launch(
Manifest.permission.CAMERA
)
}
else -> {
requestCameraPermission.launch(
Manifest.permission.CAMERA
)
}
}
}
private fun hasPermissions(activity: Activity, vararg permissions: String?): Boolean {
for (permission in permissions) {
if (ActivityCompat.checkSelfPermission(
activity,
permission!!
) != PackageManager.PERMISSION_GRANTED
) {
return false
}
}
return true
} }
companion object {
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment GetStarted.
*/
// TODO: Rename and change types and number of parameters
@JvmStatic
fun newInstance(param1: String, param2: String) =
GetStartedFragment().apply {
arguments = Bundle().apply {
putString(ARG_PARAM1, param1)
putString(ARG_PARAM2, param2)
private fun setVisibility(s: String) {
if (s.contains("Aadhaar")) {
binding.txtFront.visibility = View.VISIBLE
binding.uploadFront.visibility = View.VISIBLE
binding.txtBack.visibility = View.VISIBLE
binding.llBack.visibility = View.VISIBLE
} else {
binding.txtFront.visibility = View.VISIBLE
binding.uploadFront.visibility = View.VISIBLE
binding.txtBack.visibility = View.GONE
binding.llBack.visibility = View.GONE
}
}
private fun getTmpFileUri(): Uri {
val tmpFile =
File.createTempFile("tmp_image_file", ".png", requireActivity().cacheDir).apply {
createNewFile()
deleteOnExit()
}
return FileProvider.getUriForFile(
requireActivity(), BuildConfig.APPLICATION_ID.plus(".provider"), tmpFile
)
}
private fun takeImage() {
lifecycleScope.launchWhenStarted {
try {
getTmpFileUri().let { uri ->
latestTmpUri = uri
takeImageResult?.launch(uri)
} }
} catch (e: Exception) {
Log.e("check_exception", e.message.toString())
} }
}
}
@SuppressLint("Range")
fun getFileName(uri: Uri): String {
var result = ""
if (uri.scheme == "content") {
val cursor: Cursor =
requireActivity().contentResolver.query(uri, null, null, null, null)!!
cursor.use { cursor1 ->
if (cursor1.moveToFirst()) {
result = cursor1.getString(cursor1.getColumnIndex(OpenableColumns.DISPLAY_NAME))
}
}
}
if (result.isEmpty()) {
result = uri.path!!
val cut = result.lastIndexOf('/')
if (cut != -1) {
result = result.substring(cut + 1)
}
}
return result
}
@Throws(IOException::class)
private fun loadFile(file: File): ByteArray {
val inputStream: InputStream = FileInputStream(file)
val length = file.length()
val bytes = ByteArray(length.toInt())
var offset = 0
var numRead = 0
while (offset < bytes.size && inputStream.read(bytes, offset, bytes.size - offset).also {
numRead = it
} >= 0) {
offset += numRead
}
if (offset < bytes.size) {
throw IOException("Could not completely read file " + file.name)
}
inputStream.close()
return bytes
}
private fun encodedPANBase64(fileName: File) {
panString = try {
val bytes: ByteArray = loadFile(fileName)
Base64.encodeToString(bytes, Base64.DEFAULT).trim().replace("\n", "")
.replace("\\s+", "")
} catch (e: Exception) {
e.printStackTrace()
""
}
}
private fun uploadDocument(uri: Uri, type: String) {
when (actionType) {
mainPANUpload -> {
val fileDir: File = (activity as SignUpActivity).cacheDir
val fileExtension = File(fileDir.toString().plus("/").plus(getFileName(uri)))
panFileExt = getFileExtension(getFileName(uri))
val size: Double = Common.getFileSizeInMB(fileExtension.length())
setFrontHideVisible(uri)
if (size < 5) {
if (type == "c") encodedPANBase64(fileExtension)
else panString = bitmap?.let { ImageUtil.convert(it) }.toString()
} else {
panString = ""
panFileExt = ""
}
}
// mainPhotoUpload -> {
// binding.ivPhotograph.visibility = View.VISIBLE
// val fileDir: File = requireActivity().cacheDir
// val fileExtension = File(fileDir.toString().plus("/").plus(getFileName(uri)))
// photoFileExt = getFileExtension(getFileName(uri))
// val size: Double = Common.getFileSizeInMB(fileExtension.length())
// if (size < 5) {
// if (type == "c") encodedPhotoBase64(fileExtension)
// else photoString = bitmap?.let { ImageUtil.convert(it) }.toString()
// } else {
// photoString = ""
// photoFileExt = ""
// }
// }
// firstDocUpload -> {
// binding.ivAadharFront.visibility = View.VISIBLE
// val fileDir: File = requireActivity().cacheDir
// val fileExtension = File(fileDir.toString().plus("/").plus(getFileName(uri)))
// doc1FileExt = getFileExtension(getFileName(uri))
// val size: Double = Common.getFileSizeInMB(fileExtension.length())
// if (size < 5) {
// if (type == "c") encodedUpload1Base64(fileExtension)
// else docString = bitmap?.let { ImageUtil.convert(it) }.toString()
// } else {
// docString = ""
// doc1FileExt = ""
// }
// }
// else -> {
// binding.ivAadharBack.visibility = View.VISIBLE
// val fileDir: File = requireActivity().cacheDir
// val fileExtension = File(fileDir.toString().plus("/").plus(getFileName(uri)))
// doc2fileExt = getFileExtension(getFileName(uri))
// val size: Double = Common.getFileSizeInMB(fileExtension.length())
// if (size < 5) {
// if (type == "c") encodedFileToBase64(fileExtension)
// else docString2 = bitmap?.let { ImageUtil.convert(it) }.toString()
// } else {
// docString2 = ""
// doc2fileExt = ""
// }
// }
}
}
private fun setFrontHideVisible(uri: Uri) {
if (isFront) {
binding.uploadFront.visibility = View.GONE
binding.ivFrontLayer.setBackgroundColor(Color.parseColor("#99000000"))
binding.ivFrontTik.setBackgroundResource(R.drawable.svg_tik)
binding.mbUploadChangeFront.visibility = View.VISIBLE
binding.ivFront.setImageURI(uri)
} else {
binding.uploadBack.visibility = View.GONE
binding.ivBackLayer.setBackgroundColor(Color.parseColor("#99000000"))
binding.ivBackTik.setBackgroundResource(R.drawable.svg_tik)
binding.mbUploadChangeBack.visibility = View.VISIBLE
binding.ivBack.setImageURI(uri)
}
} }
} }

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

@ -0,0 +1,50 @@
package com.nivesh.production.niveshfd.partnerOnBoarding.ui.fragments1
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Toast
import androidx.recyclerview.widget.LinearLayoutManager
import com.nivesh.production.niveshfd.databinding.NewDistributorSignStepOneBinding
import com.nivesh.production.niveshfd.partnerOnBoarding.adapters1.NewDistributorSignStepOneAdapter
import com.nivesh.production.niveshfd.partnerOnBoarding.ui.activities1.SignUpActivity
class NewDistributorSignStepOne : BaseFragment(){
private var _binding: NewDistributorSignStepOneBinding? = null
private val binding get() = _binding!!
companion object{
var listMapData: MutableMap<Int, String>? = null
}
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
_binding = NewDistributorSignStepOneBinding.inflate(inflater,container,false)
return binding.root
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
init()
}
private fun init() {
val listData = mutableListOf("Mutual Fund","Insurance","Bond","Capital Gain Bond (CGB)",
"Non-Convertible Debentures(NCDs)","Fixed Deposit (FD)","National Pension System (NPS)",
"Secondary Bond","Other")
binding.rvList.layoutManager = LinearLayoutManager(activity as SignUpActivity)
val adapter = NewDistributorSignStepOneAdapter(listData)
binding.rvList.adapter = adapter
binding.btnNext.setOnClickListener {
Toast.makeText((activity as SignUpActivity), listMapData.toString(),Toast.LENGTH_SHORT).show()
}
}
}

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

@ -18,6 +18,7 @@ import com.nivesh.production.niveshfd.fd.util.Common
class OTPFragment : BaseFragment() { class OTPFragment : BaseFragment() {
private var _binding: FragmentOtpBinding? = null private var _binding: FragmentOtpBinding? = null
private val binding get() = _binding!! private val binding get() = _binding!!
private var type: Int? = null
override fun onCreateView( override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
@ -28,6 +29,7 @@ class OTPFragment : BaseFragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
type = arguments?.getInt("type")
init() init()
} }
@ -57,13 +59,26 @@ 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)
var fragment = Fragment()
if(type == 4) {
fragment = GetStartedFragment()
} else if(type == 3){
fragment = NewDistributorSignStepOne()
}
replaceFragment(
activity as BaseActivity,
R.id.signUpContainer,
fragment,
"GET STARTED",
true
)
} }
} }
} }
@ -158,7 +173,4 @@ class OTPFragment : BaseFragment() {
} }
} }
} }

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

@ -7,6 +7,7 @@ import android.text.TextWatcher
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 androidx.fragment.app.Fragment
import com.nivesh.production.niveshfd.databinding.FragmentSignupBinding import com.nivesh.production.niveshfd.databinding.FragmentSignupBinding
import com.nivesh.production.niveshfd.fd.ui.activity.BaseActivity import com.nivesh.production.niveshfd.fd.ui.activity.BaseActivity
import com.nivesh.production.niveshfd.fd.util.Common import com.nivesh.production.niveshfd.fd.util.Common
@ -15,6 +16,7 @@ import com.nivesh.production.niveshfd.fd.util.Common
class SignUpFragment : BaseFragment() { class SignUpFragment : BaseFragment() {
private var _binding: FragmentSignupBinding? = null private var _binding: FragmentSignupBinding? = null
private val binding get() = _binding!! private val binding get() = _binding!!
private var type: Int? = null
override fun onCreateView( override fun onCreateView(
@ -26,6 +28,7 @@ class SignUpFragment : BaseFragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
type = arguments?.getInt("type")
init() init()
} }
@ -41,10 +44,15 @@ class SignUpFragment : BaseFragment() {
binding.btnSignUp.setOnClickListener { binding.btnSignUp.setOnClickListener {
if (validate()) { if (validate()) {
val bundle = Bundle()
bundle.putInt("type",type!!)
val fragment = OTPFragment()
fragment.arguments = bundle
replaceFragment( replaceFragment(
activity as BaseActivity, activity as BaseActivity,
com.nivesh.production.niveshfd.R.id.signUpContainer, com.nivesh.production.niveshfd.R.id.signUpContainer,
OTPFragment(),
fragment,
"OTP", "OTP",
true true
) )
@ -76,6 +84,4 @@ class SignUpFragment : BaseFragment() {
return true return true
} }
} }
} }

+ 35
- 0
app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/util/MaskWatcher.kt View File

@ -0,0 +1,35 @@
package com.nivesh.production.niveshfd.partnerOnBoarding.util
import android.text.Editable
import android.text.TextWatcher
class MaskWatcher(private val mask: String) : TextWatcher {
private var isRunning = false
private var isDeleting = false
override fun beforeTextChanged(charSequence: CharSequence, start: Int, count: Int, after: Int) {
isDeleting = count > after
}
override fun onTextChanged(charSequence: CharSequence, start: Int, before: Int, count: Int) {}
override fun afterTextChanged(editable: Editable) {
if (isRunning || isDeleting) {
return
}
isRunning = true
val editableLength = editable.length
if (editableLength < mask.length) {
if (mask[editableLength] != '#') {
editable.append(mask[editableLength])
} else if (mask[editableLength - 1] != '#') {
editable.insert(editableLength - 1, mask, editableLength - 1, editableLength)
}
}
isRunning = false
}
companion object {
fun buildCpf(): MaskWatcher {
return MaskWatcher("###.###.###-##")
}
}
}

+ 6
- 0
app/src/main/res/drawable/dot_background.xml View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@android:color/white" />
<corners android:radius="0dp" />
</shape>

BIN
app/src/main/res/drawable/dot_rect.png View File

Before After
Width: 106  |  Height: 65  |  Size: 536 B

+ 5
- 0
app/src/main/res/drawable/round_corner_button.xml View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="50dp"/>
<solid android:color="@color/red"></solid>
</shape>

+ 8
- 0
app/src/main/res/drawable/round_corner_grey_button.xml View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="50dp"/>
<solid android:color="@color/transparent"></solid>
<stroke
android:width="@dimen/margin_1"
android:color="@color/greyColor3"/>
</shape>

+ 8
- 0
app/src/main/res/drawable/round_corner_grey_button_fill.xml View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="50dp"/>
<solid android:color="@color/greyColor3"></solid>
<stroke
android:width="@dimen/margin_1"
android:color="@color/greyColor3"/>
</shape>

+ 11
- 0
app/src/main/res/drawable/round_corner_with_red_bg.xml View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<solid android:color="@color/transparent" />
<stroke
android:width="3dp"
android:color="#FFFF4917" />
</shape>

+ 20
- 5
app/src/main/res/drawable/svg_close.xml View File

@ -1,5 +1,20 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="50dp"
android:height="50dp"
android:viewportWidth="50"
android:viewportHeight="50">
<path
android:strokeColor="#ffffff"
android:strokeWidth="2"
android:pathData="M 25 1 C 38.2548339959 1 49 11.7451660041 49 25 C 49 38.2548339959 38.2548339959 49 25 49 C 11.7451660041 49 1 38.2548339959 1 25 C 1 11.7451660041 11.7451660041 1 25 1 Z" />
<path
android:strokeColor="#ffffff"
android:strokeWidth="2"
android:pathData="M 15.7071 14.2929 L 35.5061 34.0919" />
<path
android:strokeColor="#ffffff"
android:strokeWidth="2"
android:pathData="M 14.2929 34.2929 L 34.0919 14.4939" />
</vector>

+ 20
- 0
app/src/main/res/drawable/svg_cross.xml View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="50dp"
android:height="50dp"
android:viewportWidth="50"
android:viewportHeight="50">
<path
android:strokeColor="#ffffff"
android:strokeWidth="2"
android:pathData="M 25 1 C 38.2548339959 1 49 11.7451660041 49 25 C 49 38.2548339959 38.2548339959 49 25 49 C 11.7451660041 49 1 38.2548339959 1 25 C 1 11.7451660041 11.7451660041 1 25 1 Z" />
<path
android:strokeColor="#ffffff"
android:strokeWidth="2"
android:pathData="M 15.7071 14.2929 L 35.5061 34.0919" />
<path
android:strokeColor="#ffffff"
android:strokeWidth="2"
android:pathData="M 14.2929 34.2929 L 34.0919 14.4939" />
</vector>

+ 14
- 0
app/src/main/res/drawable/svg_info.xml View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#000000"
android:pathData="M12.01 22C17.53 22 22 17.52 22 12C22 6.48 17.53 2 12.01 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12.01 22ZM12 4C16.42 4 20 7.58 20 12C20 16.42 16.42 20 12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4Z" />
<path
android:fillColor="#000000"
android:pathData="M11.27 14.17H13.175C13.175 12.4 15.74 12.175 15.74 9.73C15.74 8.005 14.27 7 12.065 7C10.19 7 8.84 7.69 8 8.83L9.455 9.775C9.98 9.04 10.79 8.62 11.9 8.62C13.055 8.62 13.775 9.19 13.775 10.03C13.775 11.53 11.27 11.95 11.27 14.17ZM12.23 17.755C12.92 17.755 13.415 17.23 13.415 16.585C13.415 15.94 12.92 15.43 12.23 15.43C11.525 15.43 11.03 15.94 11.03 16.585C11.03 17.23 11.525 17.755 12.23 17.755Z" />
</vector>

+ 12
- 0
app/src/main/res/drawable/svg_rect_dot.xml View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="106dp"
android:height="65dp"
android:viewportWidth="106"
android:viewportHeight="65">
<path
android:strokeColor="#0050A1"
android:strokeWidth="1"
android:pathData="M 0.5 0.5 H 105.5 V 64.5 H 0.5 V 0.5 Z" />
</vector>

+ 11
- 0
app/src/main/res/drawable/svg_tik.xml View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="20dp"
android:viewportWidth="12"
android:viewportHeight="10">
<path
android:fillColor="#0050A1"
android:pathData="M1.5 4.25L0 5.75L4 9.75L12 1.75L10.5 0.25L4 6.75L1.5 4.25Z" />
</vector>

+ 0
- 2
app/src/main/res/layout/activity_login.xml View File

@ -11,7 +11,6 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/white" android:background="@color/white"
android:fillViewport="true" android:fillViewport="true"
android:padding="@dimen/margin_5"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
@ -128,7 +127,6 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txtForgotPassword" /> app:layout_constraintTop_toBottomOf="@+id/txtForgotPassword" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/btnLoginWithGoogle" android:id="@+id/btnLoginWithGoogle"
android:theme="@style/Theme.GoogleLogin" android:theme="@style/Theme.GoogleLogin"


+ 0
- 3
app/src/main/res/layout/activity_register.xml View File

@ -5,7 +5,6 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<ImageView <ImageView
android:id="@+id/logo" android:id="@+id/logo"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -113,8 +112,6 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnDistributor" /> app:layout_constraintTop_toBottomOf="@id/btnDistributor" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

+ 15
- 0
app/src/main/res/layout/dot_layout.xml View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:clipToPadding="false">
<ImageView
android:id="@+id/dot"
android:layout_width="8dp"
android:layout_height="8dp"
android:layout_gravity="center"
android:background="@drawable/dot_background" />
</FrameLayout>

+ 13
- 0
app/src/main/res/layout/fragment_almost_there.xml View File

@ -22,6 +22,19 @@
android:orientation="vertical" android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"> app:layout_constraintBottom_toBottomOf="parent">
<ImageView
android:id="@+id/ivInfo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/svg_info"
app:layout_constraintBottom_toTopOf="@+id/btnReferrer"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toEndOf="@+id/txtSignUp"
app:layout_constraintTop_toTopOf="parent"
android:contentDescription="@string/next"
app:layout_constraintVertical_bias="0.0" />
<TextView <TextView
android:id="@+id/txtSignUp" android:id="@+id/txtSignUp"
android:layout_width="wrap_content" android:layout_width="wrap_content"


+ 242
- 151
app/src/main/res/layout/fragment_get_started.xml View File

@ -6,16 +6,17 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/nestedScrollView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginBottom="@dimen/margin_90"
android:fillViewport="true" android:fillViewport="true"
android:padding="@dimen/margin_15" android:padding="@dimen/margin_15"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/signUp" android:id="@+id/signUp"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -24,6 +25,19 @@
android:orientation="vertical" android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"> app:layout_constraintBottom_toBottomOf="parent">
<ImageView
android:id="@+id/ivInfo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/next"
android:src="@drawable/svg_info"
app:layout_constraintBottom_toTopOf="@+id/subHeader"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.995"
app:layout_constraintStart_toEndOf="@+id/txtGetStart"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0" />
<TextView <TextView
android:id="@+id/txtGetStart" android:id="@+id/txtGetStart"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -48,8 +62,6 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/txtGetStart" /> app:layout_constraintTop_toBottomOf="@id/txtGetStart" />
<!--Full Name --> <!--Full Name -->
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/tlArnNumber" android:id="@+id/tlArnNumber"
@ -72,6 +84,26 @@
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tlEuinNumber"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_5"
android:hint="@string/enter_your_arn_number"
android:padding="@dimen/margin_3"
app:layout_constraintTop_toBottomOf="@+id/tlArnNumber">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/edtEuinNumber"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text"
android:textColorHint="@color/greyColor2"
android:textSize="@dimen/text_size_14" />
</com.google.android.material.textfield.TextInputLayout>
<!--Email --> <!--Email -->
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/tlPanNumber" android:id="@+id/tlPanNumber"
@ -81,7 +113,7 @@
android:layout_marginTop="@dimen/margin_5" android:layout_marginTop="@dimen/margin_5"
android:hint="@string/enter_pan_card_number" android:hint="@string/enter_pan_card_number"
android:padding="@dimen/margin_3" android:padding="@dimen/margin_3"
app:layout_constraintTop_toBottomOf="@+id/tlArnNumber">
app:layout_constraintTop_toBottomOf="@+id/tlEuinNumber">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/edtPanNumber" android:id="@+id/edtPanNumber"
@ -121,72 +153,61 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_16" android:layout_marginTop="@dimen/margin_16"
android:background="@drawable/rounded_view"
android:layout_marginBottom="@dimen/margin_16" android:layout_marginBottom="@dimen/margin_16"
app:layout_constraintTop_toBottomOf="@+id/tlFullNamePanCard"
>
</View>
android:background="@drawable/rounded_view"
app:layout_constraintTop_toBottomOf="@+id/tlFullNamePanCard" />
<TextView <TextView
android:id="@+id/addAddressProof" android:id="@+id/addAddressProof"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="@dimen/margin_4"
android:layout_marginStart="@dimen/margin_8" android:layout_marginStart="@dimen/margin_8"
android:layout_marginTop="@dimen/margin_25"
android:padding="@dimen/margin_4"
android:text="Add ADDRESS PROOF" android:text="Add ADDRESS PROOF"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="@dimen/text_size_14" android:textSize="@dimen/text_size_14"
android:textStyle="bold" android:textStyle="bold"
android:layout_marginTop="@dimen/margin_25"
app:layout_constraintTop_toBottomOf="@+id/tlFullNamePanCard"
app:layout_constraintStart_toStartOf= "parent"
app:layout_constraintHorizontal_chainStyle="spread"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
/>
app:layout_constraintHorizontal_chainStyle="spread"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tlFullNamePanCard" />
<TextView <TextView
android:id="@+id/format" android:id="@+id/format"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_25"
android:padding="@dimen/margin_4" android:padding="@dimen/margin_4"
android:text="@string/format_png_or_jpg" android:text="@string/format_png_or_jpg"
android:textColor="#909090" android:textColor="#909090"
android:textSize="@dimen/text_size_14" android:textSize="@dimen/text_size_14"
android:layout_marginTop="@dimen/margin_25"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tlFullNamePanCard"
/>
app:layout_constraintTop_toBottomOf="@+id/tlFullNamePanCard" />
<TextView <TextView
android:id="@+id/docTypeHeader" android:id="@+id/docTypeHeader"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_8"
android:layout_marginTop="@dimen/margin_3"
android:padding="@dimen/margin_4" android:padding="@dimen/margin_4"
android:text="Choose the document type" android:text="Choose the document type"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="@dimen/text_size_14" android:textSize="@dimen/text_size_14"
android:textStyle="bold" android:textStyle="bold"
android:layout_marginStart="@dimen/margin_8"
android:layout_marginTop="@dimen/margin_3"
app:layout_constraintTop_toBottomOf="@+id/addAddressProof"
app:layout_constraintStart_toStartOf= "parent"
/>
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/addAddressProof" />
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/spAddressType" android:id="@+id/spAddressType"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/margin_48" android:layout_height="@dimen/margin_48"
android:layout_marginTop="@dimen/margin_15"
android:layout_marginBottom="@dimen/margin_5"
android:layout_marginStart="@dimen/margin_8" android:layout_marginStart="@dimen/margin_8"
android:layout_marginTop="@dimen/margin_15"
android:layout_marginEnd="@dimen/margin_15" android:layout_marginEnd="@dimen/margin_15"
android:layout_marginBottom="@dimen/margin_5"
app:hintEnabled="false" app:hintEnabled="false"
app:layout_constraintTop_toBottomOf="@+id/docTypeHeader"> app:layout_constraintTop_toBottomOf="@+id/docTypeHeader">
@ -197,165 +218,235 @@
android:background="@drawable/rounded_corner_with_line1" android:background="@drawable/rounded_corner_with_line1"
android:hint="@string/addressProofType" android:hint="@string/addressProofType"
android:inputType="none" android:inputType="none"
android:padding="@dimen/margin_5"
android:labelFor="@+id/spInterestPayout" android:labelFor="@+id/spInterestPayout"
android:padding="@dimen/margin_5"
android:textColorHint="@color/greyColor2" android:textColorHint="@color/greyColor2"
android:textSize="@dimen/text_size_14"
/>
android:textSize="@dimen/text_size_14" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<TextView
android:id="@+id/txtFront"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/margin_4"
android:text="Front"
android:textColor="@color/black"
android:textSize="@dimen/text_size_14"
android:textStyle="bold"
android:layout_marginStart="@dimen/margin_8"
android:layout_marginTop="@dimen/margin_30"
app:layout_constraintTop_toBottomOf="@+id/spAddressType"
app:layout_constraintStart_toStartOf= "parent"
/>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/uploadViewFront"
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/txtFront"
android:layout_marginStart="@dimen/margin_10"
android:orientation="horizontal"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
android:layout_marginStart="@dimen/margin_8"
android:layout_marginTop="@dimen/margin_4"
app:layout_constraintHorizontal_chainStyle="spread_inside"
app:layout_constraintHorizontal_bias="0.5"
android:background="@drawable/upload_background">
app:layout_constraintTop_toBottomOf="@+id/spAddressType">
<com.google.android.material.button.MaterialButton
android:id="@+id/uploadFront"
android:layout_width="wrap_content"
<LinearLayout
android:id="@+id/llFront"
android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Upload"
android:backgroundTint="@color/white"
android:textColor="@color/red"
app:cornerRadius="@dimen/margin_15"
app:layout_constraintTop_toTopOf="@+id/uploadViewFront"
app:layout_constraintBottom_toBottomOf="@+id/uploadViewFront"
app:layout_constraintStart_toStartOf="@+id/uploadViewFront"
app:layout_constraintEnd_toEndOf="@+id/uploadViewFront"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/txtBack"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/margin_4"
android:text="Back"
android:textColor="@color/black"
android:textSize="@dimen/text_size_14"
android:textStyle="bold"
android:layout_marginTop="@dimen/margin_30"
app:layout_constraintTop_toBottomOf="@+id/spAddressType"
app:layout_constraintStart_toStartOf="@+id/uploadViewBack"
/>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/uploadViewBack"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/txtBack"
android:layout_marginStart="@dimen/margin_25"
android:layout_marginTop="@dimen/margin_4"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintStart_toEndOf="@+id/uploadViewFront"
app:layout_constraintHorizontal_bias="0.5"
android:background="@drawable/upload_background">
<com.google.android.material.button.MaterialButton
android:id="@+id/uploadBack"
android:layout_width="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/txtFront"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_10"
android:padding="@dimen/margin_4"
android:text="@string/front"
android:textColor="@color/black"
android:textSize="@dimen/text_size_14"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/uploadViewFront"
app:layout_constraintEnd_toStartOf="@+id/txtBack"
app:layout_constraintHorizontal_bias="0.129"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<RelativeLayout
android:id="@+id/rvFrontLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/dot_rect">
<ImageView
android:id="@+id/ivFront"
android:layout_width="@dimen/margin_130"
android:layout_height="@dimen/margin_90"
android:scaleType="fitXY" />
<ImageView
android:id="@+id/ivFrontLayer"
android:layout_width="@dimen/margin_130"
android:layout_height="@dimen/margin_90"
android:scaleType="fitXY" />
<ImageView
android:id="@+id/ivFrontTik"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:backgroundTint="@color/greenColor" />
<com.google.android.material.button.MaterialButton
android:id="@+id/uploadFront"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_20"
android:layout_marginTop="@dimen/margin_20"
android:layout_marginEnd="@dimen/margin_20"
android:layout_marginBottom="@dimen/margin_20"
android:backgroundTint="@color/white"
android:text="@string/upload"
android:textAllCaps="false"
android:textColor="@color/red"
app:cornerRadius="@dimen/margin_15" />
</RelativeLayout>
<com.google.android.material.button.MaterialButton
android:id="@+id/mbUploadChangeFront"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_20"
android:layout_marginEnd="@dimen/margin_20"
android:layout_marginBottom="@dimen/margin_20"
android:backgroundTint="@color/white"
android:text="@string/change"
android:textAllCaps="false"
android:textColor="@color/red"
android:textStyle="bold"
android:visibility="gone"
app:cornerRadius="@dimen/margin_15" />
</LinearLayout>
<LinearLayout
android:id="@+id/llBack"
android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_15"
android:layout_marginEnd="@dimen/margin_5"
android:text="Upload"
android:backgroundTint="@color/white"
android:textColor="@color/red"
app:cornerRadius="@dimen/margin_15"
app:layout_constraintTop_toTopOf="@+id/uploadViewBack"
app:layout_constraintBottom_toBottomOf="@+id/uploadViewBack"
app:layout_constraintStart_toStartOf="@+id/uploadViewBack"
app:layout_constraintEnd_toEndOf="@+id/uploadViewBack"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/txtBack"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_10"
android:padding="@dimen/margin_4"
android:text="@string/back"
android:textColor="@color/black"
android:textSize="@dimen/text_size_14"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/uploadViewBack"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.028"
app:layout_constraintStart_toStartOf="@+id/uploadViewBack"
app:layout_constraintTop_toTopOf="parent" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/dot_rect">
<ImageView
android:id="@+id/ivBack"
android:layout_width="@dimen/margin_130"
android:layout_height="@dimen/margin_90"
android:scaleType="fitXY" />
<ImageView
android:id="@+id/ivBackLayer"
android:layout_width="@dimen/margin_130"
android:layout_height="@dimen/margin_90"
android:scaleType="fitXY" />
<ImageView
android:id="@+id/ivBackTik"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:backgroundTint="@color/greenColor" />
<com.google.android.material.button.MaterialButton
android:id="@+id/uploadBack"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_20"
android:layout_marginStart="@dimen/margin_15"
android:layout_marginEnd="@dimen/margin_5"
android:backgroundTint="@color/white"
android:text="@string/upload"
android:textAllCaps="false"
android:textColor="@color/red"
app:cornerRadius="@dimen/margin_15" />
</RelativeLayout>
<com.google.android.material.button.MaterialButton
android:id="@+id/mbUploadChangeBack"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_20"
android:layout_marginEnd="@dimen/margin_20"
android:layout_marginBottom="@dimen/margin_20"
android:backgroundTint="@color/white"
android:text="@string/change"
android:textAllCaps="false"
android:textColor="@color/red"
android:textStyle="bold"
android:visibility="gone"
app:cornerRadius="@dimen/margin_15" />
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
`
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/saveDraft" android:id="@+id/saveDraft"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_15" android:layout_marginStart="@dimen/margin_15"
android:layout_marginEnd="@dimen/margin_5" android:layout_marginEnd="@dimen/margin_5"
android:layout_marginBottom="@dimen/margin_20"
android:text="@string/save_draft"
android:layout_marginBottom="@dimen/margin_40"
android:backgroundTint="@color/white" android:backgroundTint="@color/white"
android:text="@string/save_draft"
android:textColor="@color/red" android:textColor="@color/red"
app:cornerRadius="@dimen/margin_15" app:cornerRadius="@dimen/margin_15"
app:layout_constraintHorizontal_chainStyle="spread"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/btnNext" app:layout_constraintEnd_toStartOf="@+id/btnNext"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintHorizontal_chainStyle="spread"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/btnNext" app:layout_constraintRight_toLeftOf="@+id/btnNext"
app:layout_constraintBottom_toBottomOf="parent"
/>
app:layout_constraintStart_toStartOf="parent"/>
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/btnNext" android:id="@+id/btnNext"
android:layout_width="170dp" android:layout_width="170dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
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:textColor="@color/white"
android:layout_marginBottom="@dimen/margin_40"
android:backgroundTint="@color/red" android:backgroundTint="@color/red"
android:text="@string/continueText"
android:textColor="@color/white"
app:cornerRadius="@dimen/margin_15" app:cornerRadius="@dimen/margin_15"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/saveDraft"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintLeft_toRightOf="@+id/saveDraft" app:layout_constraintLeft_toRightOf="@+id/saveDraft"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
/>
app:layout_constraintStart_toEndOf="@+id/saveDraft" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/margin_4"
android:text="@string/up_next_address"
android:textColor="@color/textColor1"
style="@style/regularStyle"
android:textSize="@dimen/text_size_14"
app:layout_constraintEnd_toEndOf="@+id/btnNext"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintStart_toStartOf="@+id/btnNext"
app:layout_constraintTop_toBottomOf="@+id/btnNext" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

+ 86
- 0
app/src/main/res/layout/new_distributor_sign_step_one.xml View File

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<TextView
android:id="@+id/txtTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/margin_5"
android:text="@string/choose_the_business_you_are_interested_in"
android:textColor="@color/black"
android:textSize="@dimen/text_size_20"
android:textStyle="bold"
android:layout_marginTop="@dimen/margin_20"
android:layout_marginStart="@dimen/margin_5"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/txtSubTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_10"
android:layout_marginTop="4dp"
android:gravity="center"
android:layout_marginLeft="@dimen/margin_5"
android:text="@string/please_choose_the_business_type"
android:textColor="@color/black"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/txtTitle" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvList"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/margin_10"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/txtSubTitle" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_margin="@dimen/margin_10"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0">
<com.google.android.material.button.MaterialButton
android:id="@+id/btnBack"
android:theme="@style/Theme.borderRed"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:text="@string/back"
android:textAllCaps="true"
android:textColor="@color/red"
android:layout_marginEnd="@dimen/margin_10" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btnNext"
android:theme="@style/Theme.lightRed"
app:cornerRadius="@dimen/margin_15"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginStart="@dimen/margin_10"
android:text="@string/next"
android:textAllCaps="false"
android:textColor="@color/white" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

+ 120
- 0
app/src/main/res/layout/new_distributor_sign_step_one_adapter.xml View File

@ -0,0 +1,120 @@
<?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:layout_width="match_parent"
android:layout_height="wrap_content">
<CheckBox
android:id="@+id/checkBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0" />
<RelativeLayout
android:id="@+id/rlInsurance"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone"
android:paddingStart="@dimen/margin_10"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/checkBox">
<TextView
android:id="@+id/tvPosAnywhere"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/regularStyle"
android:layout_marginTop="@dimen/margin_20"
android:text="@string/have_a_pos_anywhere" />
<RadioGroup
android:id="@+id/radioGroup"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_marginEnd="@dimen/margin_20"
android:orientation="horizontal">
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/yes"/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/no"/>
</RadioGroup>
<LinearLayout
android:id="@+id/llPOS"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/radioGroup"
android:orientation="vertical">
<TextView
android:id="@+id/tvPosInsurer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/regularStyle"
android:paddingTop="@dimen/margin_5"
android:paddingBottom="@dimen/margin_5"
android:paddingStart="@dimen/margin_10"
android:paddingEnd="@dimen/margin_10"
android:drawablePadding="@dimen/margin_10"
android:background="@drawable/round_corner_grey_button"
android:text="@string/pos_with_an_insurer"/>
<TextView
android:id="@+id/tvPOSBroker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/regularStyle"
android:paddingTop="@dimen/margin_5"
android:paddingBottom="@dimen/margin_5"
android:paddingStart="@dimen/margin_10"
android:paddingEnd="@dimen/margin_10"
android:layout_marginTop="@dimen/margin_5"
android:background="@drawable/round_corner_grey_button"
android:text="@string/pos_with_broker_corporate_agent"/>
</LinearLayout>
</RelativeLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tlOtherName"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_5"
android:hint="@string/please_name_other"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/rlInsurance">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/edtMobileNumber"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="phone"
android:maxEms="10"
android:paddingTop="@dimen/margin_15"
android:paddingBottom="@dimen/margin_15"
android:textSize="@dimen/text_size_14" />
</com.google.android.material.textfield.TextInputLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

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

@ -309,6 +309,21 @@
<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>
<string name="front">Front</string>
<string name="upload">Upload</string>
<string name="choose_the_business_you_are_interested_in">Choose the business you are interested in</string>
<string name="please_choose_the_business_type">Please choose the business type</string>
<string name="have_a_pos_anywhere">Have a POS anywhere?</string>
<string name="pos_with_an_insurer">POS with an insurer</string>
<string name="pos_with_broker_corporate_agent">POS with Broker / Corporate Agent</string>
<string name="yes">Yes</string>
<string name="no">No</string>
<string name="please_name_other">Please Name Other</string>
<string name="change">Change</string>
<string name="up_next_address">Up Next: Address</string>
</resources> </resources>

+ 3
- 0
app/src/main/res/values/colors.xml View File

@ -24,6 +24,9 @@
<color name="greyColor4">#E6EBE0</color> <color name="greyColor4">#E6EBE0</color>
<color name="greyColor5">#303030</color> <color name="greyColor5">#303030</color>
<color name="greenColor">#41CA00</color>
<color name="textColor1">#545454</color>
<color name="teal_200">#FF03DAC5</color> <color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color> <color name="teal_700">#FF018786</color>

+ 1
- 0
app/src/main/res/values/dimens.xml View File

@ -26,6 +26,7 @@
<dimen name="text_size_18">18sp</dimen> <dimen name="text_size_18">18sp</dimen>
<dimen name="text_size_19">19sp</dimen> <dimen name="text_size_19">19sp</dimen>
<dimen name="text_size_20">20sp</dimen> <dimen name="text_size_20">20sp</dimen>
<dimen name="text_size_24">24sp</dimen>
<dimen name="text_size_30">30sp</dimen> <dimen name="text_size_30">30sp</dimen>
<dimen name="margin_0.5" tools:ignore="MissingDefaultResource">0.5dp</dimen> <dimen name="margin_0.5" tools:ignore="MissingDefaultResource">0.5dp</dimen>


+ 20
- 0
app/src/main/res/values/strings.xml View File

@ -317,5 +317,25 @@
<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="front">Front</string>
<string name="upload">Upload</string>
<string name="choose_the_business_you_are_interested_in">Choose the business you are interested in</string>
<string name="please_choose_the_business_type">Please choose the business type</string>
<string name="have_a_pos_anywhere">Have a POS anywhere?</string>
<string name="pos_with_an_insurer">POS with an insurer</string>
<string name="pos_with_broker_corporate_agent">POS with Broker / Corporate Agent</string>
<string name="yes">Yes</string>
<string name="no">No</string>
<string name="please_name_other">Please Name Other</string>
<string name="change">Change</string>
<string name="up_next_address">Up Next: Address</string>
<array name="idProof">
<item>Aadhar Front</item>
<item>Aadhar Back</item>
<item>Passport</item>
<item>Driving Licenses</item>
<item>Voter Id</item>
</array>
</resources> </resources>

+ 11
- 0
app/src/main/res/values/style.xml View File

@ -156,4 +156,15 @@
<item name="elevation">@dimen/margin_8</item> <item name="elevation">@dimen/margin_8</item>
<item name="android:solidColor">@color/white</item> <item name="android:solidColor">@color/white</item>
</style> </style>
<style name="MyButtonStyle" parent="Widget.MaterialComponents.Button">
<item name="shapeAppearanceOverlay">@style/ShapeAppearanceOverlay.MyApp.Button.Rounded</item>
</style>
<style name="ShapeAppearanceOverlay.MyApp.Button.Rounded" parent="">
<item name="cornerFamily">rounded</item>
<item name="cornerSize">16dp</item>
<item name="boxStrokeColor">@color/red</item>
<item name="strokeColor">@color/red</item>
</style>
</resources> </resources>

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

@ -43,6 +43,14 @@
<item name="android:solidColor">@color/white</item> <item name="android:solidColor">@color/white</item>
</style> </style>
<style name="Theme.borderRed" parent="Widget.MaterialComponents.Button.OutlinedButton">
<item name="colorPrimary">@color/white</item>
<item name="strokeWidth">1dp</item>
<item name="elevation">@dimen/margin_8</item>
<item name="strokeColor">@color/red</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) -->
<item name="colorControlActivated">@color/green</item> <item name="colorControlActivated">@color/green</item>


+ 3
- 0
app/src/main/res/xml/file_paths.xml View File

@ -18,6 +18,9 @@
<files-path <files-path
name="files" name="files"
path="." /> path="." />
<external-path
name="external_files"
path="." />
<!-- Android/data/com.nivesh.production.debug/files/Pictures --> <!-- Android/data/com.nivesh.production.debug/files/Pictures -->
<!-- https://stackoverflow.com/questions/42516126/fileprovider-illegalargumentexception-failed-to-find-configured-root --> <!-- https://stackoverflow.com/questions/42516126/fileprovider-illegalargumentexception-failed-to-find-configured-root -->
</paths> </paths>

Loading…
Cancel
Save

Powered by TurnKey Linux.