Browse Source

POB Ui

master
Manoj 2 years ago
parent
commit
4be70510b6
20 changed files with 799 additions and 120 deletions
  1. +1
    -1
      app/src/main/AndroidManifest.xml
  2. +2
    -2
      app/src/main/java/com/nivesh/production/niveshfd/fd/ui/fragment/StepThreeNiveshFDFragment.kt
  3. +82
    -0
      app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/adapters1/NewDistributorSignStepOneAdapter.kt
  4. +220
    -15
      app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/ui/fragments1/GetStartedFragment.kt
  5. +41
    -0
      app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/ui/fragments1/NewDistributorSignStepOne.kt
  6. +3
    -1
      app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/ui/fragments1/OTPFragment.kt
  7. BIN
      app/src/main/res/drawable/dot_rect.png
  8. +8
    -0
      app/src/main/res/drawable/round_corner_grey_button.xml
  9. +11
    -0
      app/src/main/res/drawable/round_corner_with_red_bg.xml
  10. +12
    -0
      app/src/main/res/drawable/svg_rect_dot.xml
  11. +11
    -0
      app/src/main/res/drawable/svg_tik.xml
  12. +0
    -1
      app/src/main/res/layout/activity_login.xml
  13. +196
    -95
      app/src/main/res/layout/fragment_get_started.xml
  14. +86
    -0
      app/src/main/res/layout/new_distributor_sign_step_one.xml
  15. +93
    -0
      app/src/main/res/layout/new_distributor_sign_step_one_adapter.xml
  16. +7
    -0
      app/src/main/res/values-hi-rIN/strings.xml
  17. +1
    -0
      app/src/main/res/values/dimens.xml
  18. +7
    -0
      app/src/main/res/values/strings.xml
  19. +11
    -0
      app/src/main/res/values/style.xml
  20. +7
    -5
      app/src/main/res/values/themes.xml

+ 1
- 1
app/src/main/AndroidManifest.xml View File

@ -4,7 +4,7 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" />
<!-- <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.READ_EXTERNAL_STORAGE" />


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


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

@ -0,0 +1,82 @@
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.RelativeLayout
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.nivesh.production.niveshfd.R
class NewDistributorSignStepOneAdapter(private var listData: MutableList<String>) :
RecyclerView.Adapter<NewDistributorSignStepOneAdapter.ViewHolder>() {
private var context: Context? = null
private var isPosBroker: Boolean? = false
private 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
} else {
holder.rlInsurance.visibility = View.GONE
}
}
holder.tvPosInsurer.setOnClickListener {
// isPosInsurer?.let { it1 -> setSelected(holder.tvPosInsurer, it1, 0) }
}
holder.tvPOSBroker.setOnClickListener {
// isPosBroker?.let { it1 -> setSelected(holder.tvPOSBroker, it1, 1) }
setSelected(holder.tvPOSBroker,isPosBroker,1)
}
}
private fun setSelected(textView: TextView, check: Boolean?, pos: Int) {
if (check == true) {
textView.setCompoundDrawablesWithIntrinsicBounds(
0,
0,
0,
0
)
textView.compoundDrawablePadding = 0
if(pos==0) isPosBroker = false
else isPosInsurer = false
} else {
textView.setCompoundDrawablesWithIntrinsicBounds(
0,
0,
R.drawable.svg_tik,
0
)
textView.compoundDrawablePadding = 20
if(pos==0) isPosBroker = true
else isPosInsurer = true
}
}
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)
}
}

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

@ -1,5 +1,11 @@
package com.nivesh.production.niveshfd.partnerOnBoarding.ui.fragments1
import android.Manifest
import android.app.Activity
import android.content.DialogInterface
import android.content.pm.PackageManager
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.net.Uri
import android.os.Bundle
import android.view.LayoutInflater
@ -10,6 +16,9 @@ import android.widget.ArrayAdapter
import android.widget.Switch
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.google.android.material.button.MaterialButton
@ -20,6 +29,8 @@ import com.nivesh.production.niveshfd.fd.ui.activity.BaseActivity
import com.nivesh.production.niveshfd.fd.util.Common.Companion.showDialogWithTwoButtons
import com.nivesh.production.niveshfd.partnerOnBoarding.ui.activities1.SignUpActivity
import java.io.File
import java.io.FileDescriptor
import java.io.IOException
private const val ARG_PARAM1 = "param1"
private const val ARG_PARAM2 = "param2"
@ -32,12 +43,19 @@ class GetStartedFragment : BaseFragment() {
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 val listArray = ArrayList<String>()
private val permissions = arrayOf(
Manifest.permission.READ_EXTERNAL_STORAGE,
Manifest.permission.WRITE_EXTERNAL_STORAGE
)
private val requestCameraPermission = registerForActivityResult(
ActivityResultContracts.RequestPermission()
@ -53,6 +71,22 @@ class GetStartedFragment : BaseFragment() {
}
}
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 onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
arguments?.let {
@ -70,6 +104,37 @@ class GetStartedFragment : BaseFragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
init()
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")
}
}
}
}
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 init() {
@ -84,8 +149,7 @@ class GetStartedFragment : BaseFragment() {
)
}
listArray.add("Aadhaar Front")
listArray.add("Aadhaar Back")
listArray.add("Aadhaar")
listArray.add("Passport")
listArray.add("Driving Licenses")
listArray.add("Voter Id")
@ -94,29 +158,109 @@ class GetStartedFragment : BaseFragment() {
binding.spDocType.setAdapter(arrayAdapter)
binding.spDocType.setOnItemClickListener{ _, _, position, _ ->
setVisibility(listArray[position])
// setVisibility(listArray[position])
}
binding.uploadFront
binding.uploadFront.setOnClickListener {
actionType = mainPANUpload
selectImage()
}
}
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 setVisibility(s: String) {
if(s.contains("Aadhaar")){
binding.txtFront.visibility = View.VISIBLE
binding.uploadFront.visibility = View.VISIBLE
binding.txtBack.visibility = View.VISIBLE
binding.uploadViewBack.visibility = View.VISIBLE
}else{
binding.txtFront.visibility = View.VISIBLE
binding.uploadFront.visibility = View.VISIBLE
binding.txtBack.visibility = View.GONE
binding.uploadViewBack.visibility = View.GONE
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
}
// 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.uploadViewBack.visibility = View.VISIBLE
// }else{
// binding.txtFront.visibility = View.VISIBLE
// binding.uploadFront.visibility = View.VISIBLE
// binding.txtBack.visibility = View.GONE
// binding.uploadViewBack.visibility = View.GONE
// }
// }
private fun takeImage() {
lifecycleScope.launchWhenStarted {
getTmpFileUri().let { uri ->
@ -126,6 +270,67 @@ class GetStartedFragment : BaseFragment() {
}
}
// private fun uploadDocument(uri: Uri, type: String) {
// when (actionType) {
// mainPANUpload -> {
// binding.ivPan.visibility = View.VISIBLE
// val fileDir: File = requireActivity().cacheDir
// val fileExtension = File(fileDir.toString().plus("/").plus(getFileName(uri)))
// panFileExt = getFileExtension(getFileName(uri))
// val size: Double = Common.getFileSizeInMB(fileExtension.length())
// 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 getTmpFileUri(): Uri {
val tmpFile =
File.createTempFile("tmp_image_file", ".png", requireActivity().cacheDir).apply {


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

@ -0,0 +1,41 @@
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 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!!
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 listMapData: Map<String,Boolean>
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
}
}

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

@ -14,6 +14,7 @@ import com.nivesh.production.niveshfd.R
import com.nivesh.production.niveshfd.databinding.FragmentOtpBinding
import com.nivesh.production.niveshfd.fd.ui.activity.BaseActivity
import com.nivesh.production.niveshfd.fd.util.Common
import com.nivesh.production.niveshfd.partnerOnBoarding.adapters1.NewDistributorSignStepOneAdapter
class OTPFragment : BaseFragment() {
private var _binding: FragmentOtpBinding? = null
@ -66,7 +67,8 @@ class OTPFragment : BaseFragment() {
replaceFragment(
activity as BaseActivity,
R.id.signUpContainer,
GetStartedFragment(),
// GetStartedFragment(),
NewDistributorSignStepOne(),
"GET STARTED",
true
)


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

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

+ 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>

+ 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>

+ 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="12dp"
android:height="10dp"
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
- 1
app/src/main/res/layout/activity_login.xml View File

@ -127,7 +127,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txtForgotPassword" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btnLoginWithGoogle"
android:theme="@style/Theme.GoogleLogin"


+ 196
- 95
app/src/main/res/layout/fragment_get_started.xml View File

@ -136,11 +136,7 @@
android:layout_marginTop="@dimen/margin_16"
android:layout_marginBottom="@dimen/margin_16"
android:background="@drawable/rounded_view"
app:layout_constraintTop_toBottomOf="@+id/tlFullNamePanCard"
>
</View>
app:layout_constraintTop_toBottomOf="@+id/tlFullNamePanCard" />
<TextView
android:id="@+id/addAddressProof"
@ -156,10 +152,7 @@
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="spread"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tlFullNamePanCard"
/>
app:layout_constraintTop_toBottomOf="@+id/tlFullNamePanCard" />
<TextView
android:id="@+id/format"
@ -173,7 +166,6 @@
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tlFullNamePanCard" />
<TextView
android:id="@+id/docTypeHeader"
android:layout_width="wrap_content"
@ -214,112 +206,221 @@
</com.google.android.material.textfield.TextInputLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="@dimen/margin_10"
android:orientation="horizontal"
android:layout_marginStart="@dimen/margin_10"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/spAddressType">
<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"
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" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/uploadViewFront"
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_8"
android:layout_marginTop="@dimen/margin_4"
android:background="@drawable/upload_background"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="spread_inside"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txtFront">
android:layout_weight="1"
android:orientation="vertical">
<com.google.android.material.button.MaterialButton
android:id="@+id/uploadFront"
<TextView
android:id="@+id/txtFront"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@color/white"
android:text="Upload"
android:textColor="@color/red"
app:cornerRadius="@dimen/margin_15"
app:layout_constraintBottom_toBottomOf="@+id/uploadViewFront"
app:layout_constraintEnd_toEndOf="@+id/uploadViewFront"
app:layout_constraintStart_toStartOf="@+id/uploadViewFront"
app:layout_constraintTop_toTopOf="@+id/uploadViewFront" />
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:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/dot_rect">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</androidx.constraintlayout.widget.ConstraintLayout>
<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>
<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"
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" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/uploadViewBack"
android:layout_width="wrap_content"
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_25"
android:layout_marginTop="@dimen/margin_4"
android:background="@drawable/upload_background"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintStart_toEndOf="@+id/uploadViewFront"
app:layout_constraintTop_toBottomOf="@+id/txtBack">
<com.google.android.material.button.MaterialButton
android:id="@+id/uploadBack"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/txtBack"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_15"
android:layout_marginEnd="@dimen/margin_5"
android:backgroundTint="@color/white"
android:text="Upload"
android:textColor="@color/red"
app:cornerRadius="@dimen/margin_15"
app:layout_constraintBottom_toBottomOf="@+id/uploadViewBack"
app:layout_constraintEnd_toEndOf="@+id/uploadViewBack"
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="@+id/uploadViewBack" />
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/dot_rect">
<com.google.android.material.button.MaterialButton
android:id="@+id/uploadBack"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_15"
android:layout_marginEnd="@dimen/margin_5"
android:backgroundTint="@color/white"
android:layout_margin="@dimen/margin_20"
android:text="@string/upload"
android:textAllCaps="false"
android:textColor="@color/red"
app:cornerRadius="@dimen/margin_15" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
<!-- android:id="@+id/constraintLayout"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="vertical"-->
<!-- android:layout_marginTop="@dimen/margin_10"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toBottomOf="@+id/spAddressType">-->
<!-- <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"-->
<!-- 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" />-->
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
<!-- android:id="@+id/uploadViewFront"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginStart="@dimen/margin_8"-->
<!-- android:layout_marginTop="@dimen/margin_4"-->
<!-- android:background="@drawable/upload_background"-->
<!-- app:layout_constraintHorizontal_bias="0.5"-->
<!-- app:layout_constraintHorizontal_chainStyle="spread_inside"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toBottomOf="@+id/txtFront">-->
<!-- <ImageView-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:background="@mipmap/ic_launcher"-->
<!-- app:cornerRadius="@dimen/margin_15"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintEnd_toEndOf="parent" />-->
<!-- <com.google.android.material.button.MaterialButton-->
<!-- android:id="@+id/uploadFront"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:backgroundTint="@color/white"-->
<!-- android:text="Upload"-->
<!-- android:textColor="@color/red"-->
<!-- app:cornerRadius="@dimen/margin_15"-->
<!-- app:layout_constraintBottom_toBottomOf="@+id/uploadViewFront"-->
<!-- app:layout_constraintEnd_toEndOf="@+id/uploadViewFront"-->
<!-- app:layout_constraintStart_toStartOf="@+id/uploadViewFront"-->
<!-- app:layout_constraintTop_toTopOf="@+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"-->
<!-- 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" />-->
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
<!-- android:id="@+id/uploadViewBack"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginStart="@dimen/margin_25"-->
<!-- android:layout_marginTop="@dimen/margin_4"-->
<!-- android:background="@drawable/upload_background"-->
<!-- app:layout_constraintHorizontal_bias="0.5"-->
<!-- app:layout_constraintRight_toRightOf="parent"-->
<!-- app:layout_constraintStart_toEndOf="@+id/uploadViewFront"-->
<!-- app:layout_constraintTop_toBottomOf="@+id/txtBack">-->
<!-- <com.google.android.material.button.MaterialButton-->
<!-- android:id="@+id/uploadBack"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginStart="@dimen/margin_15"-->
<!-- android:layout_marginEnd="@dimen/margin_5"-->
<!-- android:backgroundTint="@color/white"-->
<!-- android:text="Upload"-->
<!-- android:textColor="@color/red"-->
<!-- app:cornerRadius="@dimen/margin_15"-->
<!-- app:layout_constraintBottom_toBottomOf="@+id/uploadViewBack"-->
<!-- app:layout_constraintEnd_toEndOf="@+id/uploadViewBack"-->
<!-- app:layout_constraintStart_toStartOf="@+id/uploadViewBack"-->
<!-- app:layout_constraintTop_toTopOf="@+id/uploadViewBack" />-->
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
</androidx.constraintlayout.widget.ConstraintLayout>
`
</androidx.core.widget.NestedScrollView>


+ 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>

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

@ -0,0 +1,93 @@
<?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:orientation="horizontal">
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Yes"/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="No"/>
</RadioGroup>
<LinearLayout
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>
</androidx.constraintlayout.widget.ConstraintLayout>

+ 7
- 0
app/src/main/res/values-hi-rIN/strings.xml View File

@ -313,5 +313,12 @@
<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>
</resources>

+ 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_19">19sp</dimen>
<dimen name="text_size_20">20sp</dimen>
<dimen name="text_size_24">24sp</dimen>
<dimen name="text_size_30">30sp</dimen>
<dimen name="margin_0.5" tools:ignore="MissingDefaultResource">0.5dp</dimen>


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

@ -317,6 +317,13 @@
<string name="let_s_get_started">Let’s get started</string>
<string name="save_draft">SAVE DRAFT</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>
<array name="idProof">
<item>Aadhar Front</item>


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

@ -156,4 +156,15 @@
<item name="elevation">@dimen/margin_8</item>
<item name="android:solidColor">@color/white</item>
</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>

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

@ -43,11 +43,13 @@
<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="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">
<!-- active thumb & track color (30% transparency) -->


Loading…
Cancel
Save

Powered by TurnKey Linux.