7 Commits

Author SHA1 Message Date
  pankaj 149f38fa9a title done 2 years ago
  pankaj 97739e1820 Merge branch 'HemantBranch' of https://git.nivesh.com:443/hemant.khadase/BajajFDLib into PankajBranch 2 years ago
  Hemant Khadase e00bca7705 setting data from clientdetails 2 years ago
  Hemant Khadase 3a0a972b9e added code for citylist 2 years ago
  Hemant Khadase 9e3fa684e6 working on datepicker 2 years ago
  Hemant Khadase 80f3c2d538 working on apis 2 years ago
  Hemant Khadase 4d67fd93d7 completed 4th screen 2 years ago
40 changed files with 1856 additions and 655 deletions
Unified View
  1. +34
    -4
      app/src/main/java/com/nivesh/production/bajajfd/interfaces/ApiInterface.kt
  2. +6
    -0
      app/src/main/java/com/nivesh/production/bajajfd/model/CityListResponse.kt
  3. +15
    -0
      app/src/main/java/com/nivesh/production/bajajfd/model/CityRequest.kt
  4. +22
    -0
      app/src/main/java/com/nivesh/production/bajajfd/model/ClientDetails.kt
  5. +40
    -0
      app/src/main/java/com/nivesh/production/bajajfd/model/ClientMasterMFD.kt
  6. +17
    -0
      app/src/main/java/com/nivesh/production/bajajfd/model/DataObject.kt
  7. +10
    -0
      app/src/main/java/com/nivesh/production/bajajfd/model/DataObjectX.kt
  8. +11
    -0
      app/src/main/java/com/nivesh/production/bajajfd/model/DeviceInfo.kt
  9. +6
    -0
      app/src/main/java/com/nivesh/production/bajajfd/model/FDStepsCountRequest.kt
  10. +3
    -0
      app/src/main/java/com/nivesh/production/bajajfd/model/GetCodes.kt
  11. +12
    -0
      app/src/main/java/com/nivesh/production/bajajfd/model/Nominee.kt
  12. +8
    -0
      app/src/main/java/com/nivesh/production/bajajfd/model/ObjectResponse.kt
  13. +9
    -0
      app/src/main/java/com/nivesh/production/bajajfd/model/ResponseXXXX.kt
  14. +7
    -0
      app/src/main/java/com/nivesh/production/bajajfd/model/ResponseXXXXX.kt
  15. +7
    -0
      app/src/main/java/com/nivesh/production/bajajfd/model/ResponseXXXXXX.kt
  16. +7
    -0
      app/src/main/java/com/nivesh/production/bajajfd/model/ResponseXXXXXXX.kt
  17. +8
    -0
      app/src/main/java/com/nivesh/production/bajajfd/model/StateListResponse.kt
  18. +5
    -0
      app/src/main/java/com/nivesh/production/bajajfd/model/StepsCountResponse.kt
  19. +10
    -0
      app/src/main/java/com/nivesh/production/bajajfd/model/UserRequest.kt
  20. +8
    -0
      app/src/main/java/com/nivesh/production/bajajfd/model/getClientDetailsRequest.kt
  21. +8
    -0
      app/src/main/java/com/nivesh/production/bajajfd/model/getClientDetailsResponse.kt
  22. +28
    -4
      app/src/main/java/com/nivesh/production/bajajfd/repositories/MainRepository.kt
  23. +100
    -32
      app/src/main/java/com/nivesh/production/bajajfd/ui/activity/BajajFdMainActivity.kt
  24. +34
    -5
      app/src/main/java/com/nivesh/production/bajajfd/ui/fragment/StepFourBajajFDFragment.kt
  25. +173
    -35
      app/src/main/java/com/nivesh/production/bajajfd/ui/fragment/StepOneBajajFDFragment.kt
  26. +604
    -88
      app/src/main/java/com/nivesh/production/bajajfd/ui/fragment/StepTwoBajajFDFragment.kt
  27. +27
    -10
      app/src/main/java/com/nivesh/production/bajajfd/util/Common.kt
  28. +18
    -0
      app/src/main/java/com/nivesh/production/bajajfd/viewModel/BajajFDViewModel.kt
  29. +25
    -2
      app/src/main/java/com/nivesh/production/bajajfd/viewModel/StepOneBajajFDViewModel.kt
  30. +59
    -0
      app/src/main/java/com/nivesh/production/bajajfd/viewModel/StepTwoBajajFDViewModel.kt
  31. +12
    -16
      app/src/main/res/layout/fragment_bajajfd_step_five.xml
  32. +31
    -33
      app/src/main/res/layout/fragment_bajajfd_step_four.xml
  33. +232
    -312
      app/src/main/res/layout/fragment_bajajfd_step_one.xml
  34. +16
    -19
      app/src/main/res/layout/fragment_bajajfd_step_three.xml
  35. +141
    -41
      app/src/main/res/layout/fragment_bajajfd_step_two.xml
  36. +6
    -4
      app/src/main/res/layout/row_dropdown.xml
  37. +4
    -1
      app/src/main/res/layout/spinner_dropdown.xml
  38. +24
    -5
      app/src/main/res/values-hi-rIN/strings.xml
  39. +5
    -1
      app/src/main/res/values/dimens.xml
  40. +64
    -43
      app/src/main/res/values/strings.xml

+ 34
- 4
app/src/main/java/com/nivesh/production/bajajfd/interfaces/ApiInterface.kt View File

@ -1,10 +1,7 @@
package com.nivesh.production.bajajfd.interfaces package com.nivesh.production.bajajfd.interfaces
import com.google.gson.JsonObject import com.google.gson.JsonObject
import com.nivesh.production.bajajfd.model.GetCodeRequest
import com.nivesh.production.bajajfd.model.GetMaturityAmountRequest
import com.nivesh.production.bajajfd.model.GetRatesRequest
import com.nivesh.production.bajajfd.model.PanCheckRequest
import com.nivesh.production.bajajfd.model.*
import okhttp3.RequestBody import okhttp3.RequestBody
import retrofit2.Response import retrofit2.Response
import retrofit2.http.* import retrofit2.http.*
@ -50,4 +47,37 @@ interface ApiInterface {
@POST("api/PanCheck_S") @POST("api/PanCheck_S")
suspend fun panCheckApi(@Body panCheck: PanCheckRequest, @Header("token") token: String): Response<JsonObject> suspend fun panCheckApi(@Body panCheck: PanCheckRequest, @Header("token") token: String): Response<JsonObject>
@POST("getFDStepsCount")
suspend fun getFDStepsCount(@Body fdStepsCountRequest: FDStepsCountRequest, @Header("token") token: String): Response<JsonObject>
@POST("api/GetClientDetailV2_S")
suspend fun getClientDetails(@Body getClientDetailsRequest: getClientDetailsRequest, @Header("token") token: String): Response<JsonObject>
@POST("GetCodes")
suspend fun titleApi(@Body getCodeRequest: GetCodeRequest, @Header("token") token: String): Response<JsonObject>
@POST("GetCodes")
suspend fun genderApi(@Body getCodeRequest: GetCodeRequest, @Header("token") token: String): Response<JsonObject>
@POST("GetCodes")
suspend fun annualIncomeApi(@Body getCodeRequest: GetCodeRequest, @Header("token") token: String): Response<JsonObject>
@POST("GetCodes")
suspend fun relationShipApi(@Body getCodeRequest: GetCodeRequest, @Header("token") token: String): Response<JsonObject>
@POST("GetCodes")
suspend fun maritalStatusApi(@Body getCodeRequest: GetCodeRequest, @Header("token") token: String): Response<JsonObject>
@POST("GetCodes")
suspend fun occupationApi(@Body getCodeRequest: GetCodeRequest, @Header("token") token: String): Response<JsonObject>
@POST("api/GetStateMaster")
suspend fun stateApi( @Header("token") token: String): Response<JsonObject>
@POST("api/GetCity")
suspend fun cityApi(@Body cityRequest: CityRequest, @Header("token") token: String): Response<JsonObject>
} }

+ 6
- 0
app/src/main/java/com/nivesh/production/bajajfd/model/CityListResponse.kt View File

@ -0,0 +1,6 @@
package com.nivesh.production.bajajfd.model
data class CityListResponse(
val DataObject: List<DataObjectX>,
val response: ResponseXXXXXX
)

+ 15
- 0
app/src/main/java/com/nivesh/production/bajajfd/model/CityRequest.kt View File

@ -0,0 +1,15 @@
package com.nivesh.production.bajajfd.model
data class CityRequest(
var APIName: String? = "",
var APP_Web: String?="",
var ClientCode: String?="",
var HOCode: String?="",
var RMCode: String?="",
var RoleID: Int = 0,
var Source: String? = "",
var StateCode: Int? = 0,
var Subbroker_Code: String? = "",
var Type: String?= "",
var UID: Int = 0
)

+ 22
- 0
app/src/main/java/com/nivesh/production/bajajfd/model/ClientDetails.kt View File

@ -0,0 +1,22 @@
package com.nivesh.production.bajajfd.model
data class ClientDetails(
val ARNexpiredFlag: Boolean,
val EditProfileMessage: String,
val IsPartiallyFilled: Boolean,
val KYCstatus: String,
val ProfileMessage: String,
val ProfileStatus: String,
val UnifiedMessage: String,
val appliaction1_image_name: String,
val city_of_birth: String,
val clientMasterMFD: ClientMasterMFD,
val country_of_birth: String,
val created_by: String,
val created_date: String,
val email: String,
val mobile: String,
val modified_by: String,
val modified_date: String,
val sub_broker_code: String
)

+ 40
- 0
app/src/main/java/com/nivesh/production/bajajfd/model/ClientMasterMFD.kt View File

@ -0,0 +1,40 @@
package com.nivesh.production.bajajfd.model
data class ClientMasterMFD(
val CLIENT_ACCNO1: String,
val CLIENT_ACCTYPE1: String,
val CLIENT_ADD1: String,
val CLIENT_ADD2: String,
val CLIENT_ADD3: String,
val CLIENT_APPNAME1: String,
val CLIENT_CITY: String,
val CLIENT_CODE: String,
val CLIENT_COMMMODE: String,
val CLIENT_COUNTRY: String,
val CLIENT_DIVPAYMODE: String,
val CLIENT_DOB: String,
val CLIENT_EMAIL: String,
val CLIENT_FATHER_HUSBAND_GUARDIAN: String,
val CLIENT_GENDER: String,
val CLIENT_GUARDIANPAN: String,
val CLIENT_HOLDING: String,
val CLIENT_NEFT_IFSCCODE1: String,
val CLIENT_OCCUPATION_CODE: String,
val CLIENT_PAN: String,
val CLIENT_PINCODE: String,
val CLIENT_STATE: String,
val CLIENT_TAXSTATUS: String,
val CLIENT_TYPE: String,
val CM_MOBILE: String,
val Client_Title: String,
val DEFAULT_BLANK_FLAG1: String,
val Filler1: String,
val Filler2: String,
val Filler3: Any,
val NominationAuthMode: String,
val NominationOptFlag: String,
val Nominee_Title: String,
val Nominees: List<Nominee>,
val ParentName: String,
val ums_id: String
)

+ 17
- 0
app/src/main/java/com/nivesh/production/bajajfd/model/DataObject.kt View File

@ -0,0 +1,17 @@
package com.nivesh.production.bajajfd.model
import java.io.Serializable
data class DataObject(
val BSE_State_Code: String,
val CAMS_statecode: String,
val Country_Id: Int,
val State_Code: String,
val State_Id: Int,
val State_Name: String,
val signzyCode: String
): Serializable {
override fun toString(): String {
return State_Name
}
}

+ 10
- 0
app/src/main/java/com/nivesh/production/bajajfd/model/DataObjectX.kt View File

@ -0,0 +1,10 @@
package com.nivesh.production.bajajfd.model
data class DataObjectX(
val city_id: Int,
val city_name: String
) {
override fun toString(): String {
return city_name
}
}

+ 11
- 0
app/src/main/java/com/nivesh/production/bajajfd/model/DeviceInfo.kt View File

@ -0,0 +1,11 @@
package com.nivesh.production.bajajfd.model
data class DeviceInfo(
var app_version: String? = "",
var device_id: String? = "",
var device_model: String? = "",
var device_name: String? ="",
var device_os_version: String? = "",
var device_token: String? = "",
var device_type: String? = ""
)

+ 6
- 0
app/src/main/java/com/nivesh/production/bajajfd/model/FDStepsCountRequest.kt View File

@ -0,0 +1,6 @@
package com.nivesh.production.bajajfd.model
data class FDStepsCountRequest(
var FDProvider: String? = "",
var NiveshClientCode: String? = ""
)

+ 3
- 0
app/src/main/java/com/nivesh/production/bajajfd/model/GetCodes.kt View File

@ -7,4 +7,7 @@ data class GetCodes(
override fun toString(): String { override fun toString(): String {
return Value return Value
} }
} }

+ 12
- 0
app/src/main/java/com/nivesh/production/bajajfd/model/Nominee.kt View File

@ -0,0 +1,12 @@
package com.nivesh.production.bajajfd.model
data class Nominee(
val NomineeApplicablePercent: Double,
val NomineeDOB: String,
val NomineeGuardian: String,
val NomineeGuardianPAN: String,
val NomineeMinorFlag: String,
val NomineeName: String,
val NomineePAN: String,
val NomineeRelationship: String
)

+ 8
- 0
app/src/main/java/com/nivesh/production/bajajfd/model/ObjectResponse.kt View File

@ -0,0 +1,8 @@
package com.nivesh.production.bajajfd.model
data class ObjectResponse(
val TransactionCount: Int,
val clientDetails: ClientDetails,
val languageid: Int,
val membersList: List<Any>
)

+ 9
- 0
app/src/main/java/com/nivesh/production/bajajfd/model/ResponseXXXX.kt View File

@ -0,0 +1,9 @@
package com.nivesh.production.bajajfd.model
data class ResponseXXXX(
val Errors: Any,
val Message: String,
val Status: String,
val StatusCode: Int,
val StepsCount: Int
)

+ 7
- 0
app/src/main/java/com/nivesh/production/bajajfd/model/ResponseXXXXX.kt View File

@ -0,0 +1,7 @@
package com.nivesh.production.bajajfd.model
data class ResponseXXXXX(
val message: String,
val status: String,
val status_code: Int
)

+ 7
- 0
app/src/main/java/com/nivesh/production/bajajfd/model/ResponseXXXXXX.kt View File

@ -0,0 +1,7 @@
package com.nivesh.production.bajajfd.model
data class ResponseXXXXXX(
val message: String,
val status: String,
val status_code: Int
)

+ 7
- 0
app/src/main/java/com/nivesh/production/bajajfd/model/ResponseXXXXXXX.kt View File

@ -0,0 +1,7 @@
package com.nivesh.production.bajajfd.model
data class ResponseXXXXXXX(
val message: String,
val status: String,
val status_code: Int
)

+ 8
- 0
app/src/main/java/com/nivesh/production/bajajfd/model/StateListResponse.kt View File

@ -0,0 +1,8 @@
package com.nivesh.production.bajajfd.model
data class StateListResponse(
val DataObject: List<DataObject>,
val Message: Any,
val ObjectResponse: Any,
val response: ResponseXXXXX
)

+ 5
- 0
app/src/main/java/com/nivesh/production/bajajfd/model/StepsCountResponse.kt View File

@ -0,0 +1,5 @@
package com.nivesh.production.bajajfd.model
data class StepsCountResponse(
val Response: ResponseXXXX
)

+ 10
- 0
app/src/main/java/com/nivesh/production/bajajfd/model/UserRequest.kt View File

@ -0,0 +1,10 @@
package com.nivesh.production.bajajfd.model
data class UserRequest(
var AppOrWeb: String? = "",
var IPAddress: String? = "",
var LoggedInRoleId: Int = 0,
var Source: String? = "",
var UID: String? = "",
var deviceInfo: DeviceInfo? = null
)

+ 8
- 0
app/src/main/java/com/nivesh/production/bajajfd/model/getClientDetailsRequest.kt View File

@ -0,0 +1,8 @@
package com.nivesh.production.bajajfd.model
data class getClientDetailsRequest(
var AppOrWeb: String? = "",
var UserRequest: UserRequest? = null,
var client_code: String? = "",
var sub_broker_code: String? = ""
)

+ 8
- 0
app/src/main/java/com/nivesh/production/bajajfd/model/getClientDetailsResponse.kt View File

@ -0,0 +1,8 @@
package com.nivesh.production.bajajfd.model
data class getClientDetailsResponse(
// val DataObject: Any ? = "",
// val Message: Any = "",
var ObjectResponse: ObjectResponse? = null,
var response: ResponseXXXXXXX? = null
)

+ 28
- 4
app/src/main/java/com/nivesh/production/bajajfd/repositories/MainRepository.kt View File

@ -1,10 +1,7 @@
package com.nivesh.production.bajajfd.repositories package com.nivesh.production.bajajfd.repositories
import com.nivesh.production.bajajfd.interfaces.ApiInterface import com.nivesh.production.bajajfd.interfaces.ApiInterface
import com.nivesh.production.bajajfd.model.GetCodeRequest
import com.nivesh.production.bajajfd.model.GetMaturityAmountRequest
import com.nivesh.production.bajajfd.model.GetRatesRequest
import com.nivesh.production.bajajfd.model.PanCheckRequest
import com.nivesh.production.bajajfd.model.*
class MainRepository constructor(private val apiInterface: ApiInterface) { class MainRepository constructor(private val apiInterface: ApiInterface) {
suspend fun getRatesResponse(getRatesRequest: GetRatesRequest, token: String) = suspend fun getRatesResponse(getRatesRequest: GetRatesRequest, token: String) =
@ -12,6 +9,11 @@ class MainRepository constructor(private val apiInterface: ApiInterface) {
suspend fun getCodesResponse(requestBody: GetCodeRequest , token: String) = suspend fun getCodesResponse(requestBody: GetCodeRequest , token: String) =
apiInterface.getCodes(requestBody, token) apiInterface.getCodes(requestBody, token)
suspend fun getStepsCountResponse(requestBody: FDStepsCountRequest , token: String) =
apiInterface.getFDStepsCount(requestBody, token)
suspend fun getClientDetailsResponse(getClientDetails: getClientDetailsRequest , token: String) =
apiInterface.getClientDetails(getClientDetails, token)
suspend fun createCalculateFDMaturityAmount(requestBody: GetMaturityAmountRequest, token: String) = suspend fun createCalculateFDMaturityAmount(requestBody: GetMaturityAmountRequest, token: String) =
apiInterface.getCalculateFDMaturityAmount(requestBody, token) apiInterface.getCalculateFDMaturityAmount(requestBody, token)
@ -44,4 +46,26 @@ class MainRepository constructor(private val apiInterface: ApiInterface) {
suspend fun panCheck(panCheck: PanCheckRequest, token: String) = suspend fun panCheck(panCheck: PanCheckRequest, token: String) =
apiInterface.panCheckApi(panCheck, token) apiInterface.panCheckApi(panCheck, token)
suspend fun titleCheck(getCodeRequest: GetCodeRequest, token: String) =
apiInterface.titleApi(getCodeRequest, token)
suspend fun genderCheck(getCodeRequest: GetCodeRequest, token: String) =
apiInterface.genderApi(getCodeRequest, token)
suspend fun annualIncomeCheck(getCodeRequest: GetCodeRequest, token: String) =
apiInterface.annualIncomeApi(getCodeRequest, token)
suspend fun relationShipCheck(getCodeRequest: GetCodeRequest, token: String) =
apiInterface.relationShipApi(getCodeRequest, token)
suspend fun maritalStatusCheck(getCodeRequest: GetCodeRequest, token: String) =
apiInterface.maritalStatusApi(getCodeRequest, token)
suspend fun occupationCheck(getCodeRequest: GetCodeRequest, token: String) =
apiInterface.occupationApi(getCodeRequest, token)
suspend fun stateCheck( token: String) =
apiInterface.stateApi( token)
suspend fun cityCheck(cityRequest: CityRequest, token: String) =
apiInterface.cityApi(cityRequest, token)
} }

+ 100
- 32
app/src/main/java/com/nivesh/production/bajajfd/ui/activity/BajajFdMainActivity.kt View File

@ -33,26 +33,22 @@ class BajajFdMainActivity : AppCompatActivity(), BajajFDInterface {
lateinit var stepFourBajajFDViewModel: StepFourBajajFDViewModel lateinit var stepFourBajajFDViewModel: StepFourBajajFDViewModel
lateinit var stepFiveBajajFDViewModel: StepFiveBajajFDViewModel lateinit var stepFiveBajajFDViewModel: StepFiveBajajFDViewModel
lateinit var listOfFrequency: List<GetCodes>
lateinit var createFDRequest: CreateFDRequest
lateinit var createFDApplicantRequest: CreateFDApplicationRequest
lateinit var applicantDetails: ApplicantDetails
lateinit var fdInvestmentDetails: FDInvestmentDetails
lateinit var applicantRelationDetails: ApplicantRelationDetails
lateinit var fdBankDetails: FdBankDetails
lateinit var nomineeDetails: NomineeDetails
lateinit var nomineeGuardianDetails: NomineeGuardianDetails
var createFDRequest: CreateFDRequest
var createFDApplicantRequest: CreateFDApplicationRequest
var applicantDetails: ApplicantDetails
var fdInvestmentDetails: FDInvestmentDetails
var applicantRelationDetails: ApplicantRelationDetails
var fdBankDetails: FdBankDetails
var nomineeDetails: NomineeDetails
var nomineeGuardianDetails: NomineeGuardianDetails
var getClientDetailsResponse : getClientDetailsResponse
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
init() init()
} }
private fun init() {
binding = ActivityBajajFdBinding.inflate(layoutInflater)
setContentView(binding.root)
init {
getClientDetailsResponse = getClientDetailsResponse()
createFDRequest = CreateFDRequest() createFDRequest = CreateFDRequest()
createFDApplicantRequest = CreateFDApplicationRequest() createFDApplicantRequest = CreateFDApplicationRequest()
@ -62,6 +58,23 @@ class BajajFdMainActivity : AppCompatActivity(), BajajFDInterface {
fdBankDetails = FdBankDetails() fdBankDetails = FdBankDetails()
nomineeDetails = NomineeDetails() nomineeDetails = NomineeDetails()
nomineeGuardianDetails = NomineeGuardianDetails() nomineeGuardianDetails = NomineeGuardianDetails()
}
private fun init() {
binding = ActivityBajajFdBinding.inflate(layoutInflater)
setContentView(binding.root)
// createFDRequest = CreateFDRequest()
// createFDApplicantRequest = CreateFDApplicationRequest()
//
// fdInvestmentDetails = FDInvestmentDetails()
// applicantDetails = ApplicantDetails()
// applicantRelationDetails = ApplicantRelationDetails()
// fdBankDetails = FdBankDetails()
// nomineeDetails = NomineeDetails()
// nomineeGuardianDetails = NomineeGuardianDetails()
//start Repository //start Repository
viewModel = ViewModelProvider(this, FDModelProviderFactory(MainRepository(ApiClient.getApiClient)))[BajajFDViewModel::class.java] viewModel = ViewModelProvider(this, FDModelProviderFactory(MainRepository(ApiClient.getApiClient)))[BajajFDViewModel::class.java]
@ -71,9 +84,8 @@ class BajajFdMainActivity : AppCompatActivity(), BajajFDInterface {
stepFourBajajFDViewModel = ViewModelProvider(this, StepFourModelProviderFactory(MainRepository(ApiClient.getApiClient)))[StepFourBajajFDViewModel::class.java] stepFourBajajFDViewModel = ViewModelProvider(this, StepFourModelProviderFactory(MainRepository(ApiClient.getApiClient)))[StepFourBajajFDViewModel::class.java]
stepFiveBajajFDViewModel = ViewModelProvider(this, StepFiveModelProviderFactory(MainRepository(ApiClient.getApiClient)))[StepFiveBajajFDViewModel::class.java] stepFiveBajajFDViewModel = ViewModelProvider(this, StepFiveModelProviderFactory(MainRepository(ApiClient.getApiClient)))[StepFiveBajajFDViewModel::class.java]
listOfFrequency = ArrayList()
if (Common.isNetworkAvailable(this)) { if (Common.isNetworkAvailable(this)) {
getCodeApi()
getStepsCountApi()
} }
binding.imgBack.setOnClickListener { binding.imgBack.setOnClickListener {
@ -81,24 +93,22 @@ class BajajFdMainActivity : AppCompatActivity(), BajajFDInterface {
} }
} }
private fun getCodeApi() {
val getCodeRequest = GetCodeRequest()
getCodeRequest.ProductName = getString(R.string.bajajFD)
getCodeRequest.Category = getString(R.string.category)
getCodeRequest.Language = getString(R.string.language)
getCodeRequest.InputValue = ""
viewModel.getCode(getCodeRequest, token)
viewModel.getRatesMutableData.observe(this) { response ->
private fun getStepsCountApi(){
val fdStepsCount = FDStepsCountRequest()
fdStepsCount.FDProvider = getString(R.string.bajaj)
fdStepsCount.NiveshClientCode = "8872"
viewModel.getStepsCount(fdStepsCount, token)
viewModel.getStepsCountMutableData.observe(this) { response ->
when (response) { when (response) {
is Resource.Success -> { is Resource.Success -> {
Log.e("response", "-->$response") Log.e("response", "-->$response")
val getCodeResponse: GetCodeResponse =
Gson().fromJson(response.data?.toString(), GetCodeResponse::class.java)
getCodeResponse.Response.StatusCode.let { code ->
val stepsCountResponse: StepsCountResponse =
Gson().fromJson(response.data?.toString(), StepsCountResponse::class.java)
stepsCountResponse.Response.StatusCode.let { code ->
when (code) { when (code) {
200 -> { 200 -> {
listOfFrequency = getCodeResponse.Response.GetCodesList
setViewPager()
getClientDetailsApi(stepsCountResponse.Response.StepsCount)
// setViewPager(stepsCountResponse.Response.StepsCount)
} }
// 650 -> refreshToken() // 650 -> refreshToken()
else -> {} else -> {}
@ -118,7 +128,63 @@ class BajajFdMainActivity : AppCompatActivity(), BajajFDInterface {
} }
} }
private fun setViewPager() {
private fun getClientDetailsApi(stepsCount: Int) {
if (Common.isNetworkAvailable(this@BajajFdMainActivity)){
val getClientDetailsRequest = getClientDetailsRequest()
getClientDetailsRequest.client_code = "8872"
getClientDetailsRequest.AppOrWeb = "App"
getClientDetailsRequest.sub_broker_code = "1014"
val userRequest = UserRequest()
userRequest.UID = "19060"
userRequest.IPAddress = ""
userRequest.Source = "Nivesh"
userRequest.AppOrWeb = "App"
userRequest.LoggedInRoleId = 5
val deviceInfo = DeviceInfo()
deviceInfo.device_id = ""
deviceInfo.device_model = ""
deviceInfo.device_token = ""
deviceInfo.device_name = ""
deviceInfo.app_version = "2.44.13"
deviceInfo.device_os_version = "Android 11"
userRequest.deviceInfo = deviceInfo
getClientDetailsRequest.UserRequest = userRequest
Log.e("getClientDetailRequest","-->"+Gson().toJson(getClientDetailsRequest))
viewModel.getClientDetails(getClientDetailsRequest, token)
viewModel.getClientDetailsMutableData.observe(this) { response ->
when (response) {
is Resource.Success -> {
Log.e("response", "-->$response")
getClientDetailsResponse =
Gson().fromJson(response.data?.toString(), getClientDetailsResponse::class.java)
getClientDetailsResponse.response?.status_code.let { code ->
when (code) {
200 -> {
setViewPager(stepsCount)
}
// 650 -> refreshToken()
else -> {}
}
}
}
is Resource.Error -> {
response.message?.let { message ->
Log.e(" ", "An error occurred:$message")
}
}
is Resource.Loading -> {
}
}
}
}
}
private fun setViewPager(stepsCount: Int) {
// steps setting // steps setting
setBackground(selectedShape(), defaultShape(), defaultShape(), defaultShape()) setBackground(selectedShape(), defaultShape(), defaultShape(), defaultShape())
@ -128,7 +194,9 @@ class BajajFdMainActivity : AppCompatActivity(), BajajFDInterface {
val viewPager: ViewPager = binding.viewPager val viewPager: ViewPager = binding.viewPager
sectionsPagerAdapter.addFragment(StepOneBajajFDFragment.getInstance(this@BajajFdMainActivity)) sectionsPagerAdapter.addFragment(StepOneBajajFDFragment.getInstance(this@BajajFdMainActivity))
sectionsPagerAdapter.addFragment(StepTwoBajajFDFragment.getInstance(this@BajajFdMainActivity)) sectionsPagerAdapter.addFragment(StepTwoBajajFDFragment.getInstance(this@BajajFdMainActivity))
sectionsPagerAdapter.addFragment(StepThreeBajajFDFragment.getInstance(this@BajajFdMainActivity))
if (stepsCount == 4) {
sectionsPagerAdapter.addFragment(StepThreeBajajFDFragment.getInstance(this@BajajFdMainActivity))
}
sectionsPagerAdapter.addFragment(StepFourBajajFDFragment.getInstance(this@BajajFdMainActivity)) sectionsPagerAdapter.addFragment(StepFourBajajFDFragment.getInstance(this@BajajFdMainActivity))
sectionsPagerAdapter.addFragment(StepFiveBajajFDFragment.getInstance(this@BajajFdMainActivity)) sectionsPagerAdapter.addFragment(StepFiveBajajFDFragment.getInstance(this@BajajFdMainActivity))
viewPager.adapter = sectionsPagerAdapter viewPager.adapter = sectionsPagerAdapter


+ 34
- 5
app/src/main/java/com/nivesh/production/bajajfd/ui/fragment/StepFourBajajFDFragment.kt View File

@ -5,9 +5,11 @@ 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.bajajfd.R
import com.nivesh.production.bajajfd.databinding.FragmentBajajfdStepFourBinding import com.nivesh.production.bajajfd.databinding.FragmentBajajfdStepFourBinding
import com.nivesh.production.bajajfd.interfaces.BajajFDInterface import com.nivesh.production.bajajfd.interfaces.BajajFDInterface
import com.nivesh.production.bajajfd.ui.activity.BajajFdMainActivity import com.nivesh.production.bajajfd.ui.activity.BajajFdMainActivity
import com.nivesh.production.bajajfd.util.Common.Companion.showDialogValidation
import com.nivesh.production.bajajfd.viewModel.StepFourBajajFDViewModel import com.nivesh.production.bajajfd.viewModel.StepFourBajajFDViewModel
class StepFourBajajFDFragment : Fragment() { class StepFourBajajFDFragment : Fragment() {
@ -41,19 +43,46 @@ class StepFourBajajFDFragment : Fragment() {
stepFourBajajFDViewModel = (activity as BajajFdMainActivity).stepFourBajajFDViewModel stepFourBajajFDViewModel = (activity as BajajFdMainActivity).stepFourBajajFDViewModel
binding.tvInvestedAmount.text = ""
binding.tvTenure.text = ""
binding.tvInterestPayout.text = ""
binding.tvRateOfInterest.text = ""
binding.swDirectorBajajFinance.setOnCheckedChangeListener { _, _ ->
}
binding.swPromoterBajajFinance.setOnCheckedChangeListener { _, _ ->
}
binding.swRelativeDirector.setOnCheckedChangeListener { _, _ ->
}
binding.swShareholder.setOnCheckedChangeListener { _, _ ->
}
binding.swPoliticallyExposed.setOnCheckedChangeListener { _, _ ->
}
binding.swCitizen.setOnCheckedChangeListener { _, _ ->
}
binding.checkBox.setOnCheckedChangeListener { _, _ ->
}
binding.btnNext.setOnClickListener { binding.btnNext.setOnClickListener {
if (validate()) {
if (binding.checkBox.isChecked) {
bajajFDInterface.stepThreeApi("stepThreeResponse") bajajFDInterface.stepThreeApi("stepThreeResponse")
}else{
showDialogValidation(activity as BajajFdMainActivity, resources.getString(R.string.validTermsConditions))
} }
} }
return root return root
} }
private fun validate(): Boolean {
return false
}
override fun onDestroyView() { override fun onDestroyView() {
super.onDestroyView() super.onDestroyView()
_binding = null _binding = null


+ 173
- 35
app/src/main/java/com/nivesh/production/bajajfd/ui/fragment/StepOneBajajFDFragment.kt View File

@ -21,9 +21,7 @@ import com.nivesh.production.bajajfd.R
import com.nivesh.production.bajajfd.adapter.HorizontalRecyclerViewAdapter import com.nivesh.production.bajajfd.adapter.HorizontalRecyclerViewAdapter
import com.nivesh.production.bajajfd.databinding.FragmentBajajfdStepOneBinding import com.nivesh.production.bajajfd.databinding.FragmentBajajfdStepOneBinding
import com.nivesh.production.bajajfd.interfaces.BajajFDInterface import com.nivesh.production.bajajfd.interfaces.BajajFDInterface
import com.nivesh.production.bajajfd.model.GetCalculateMaturityAmountResponse
import com.nivesh.production.bajajfd.model.GetMaturityAmountRequest
import com.nivesh.production.bajajfd.model.GetRatesRequest
import com.nivesh.production.bajajfd.model.*
import com.nivesh.production.bajajfd.ui.activity.BajajFdMainActivity import com.nivesh.production.bajajfd.ui.activity.BajajFdMainActivity
import com.nivesh.production.bajajfd.util.Common import com.nivesh.production.bajajfd.util.Common
import com.nivesh.production.bajajfd.util.Common.Companion.commonErrorMethod import com.nivesh.production.bajajfd.util.Common.Companion.commonErrorMethod
@ -32,6 +30,7 @@ import com.nivesh.production.bajajfd.util.Constants.Companion.token
import com.nivesh.production.bajajfd.util.Resource import com.nivesh.production.bajajfd.util.Resource
import com.nivesh.production.bajajfd.viewModel.StepOneBajajFDViewModel import com.nivesh.production.bajajfd.viewModel.StepOneBajajFDViewModel
class StepOneBajajFDFragment : Fragment() { class StepOneBajajFDFragment : Fragment() {
private var _binding: FragmentBajajfdStepOneBinding? = null private var _binding: FragmentBajajfdStepOneBinding? = null
private val binding get() = _binding!! private val binding get() = _binding!!
@ -41,6 +40,9 @@ class StepOneBajajFDFragment : Fragment() {
private lateinit var rgMaturity: RadioButton private lateinit var rgMaturity: RadioButton
private lateinit var listOfTenure: MutableList<ROIDataList> private lateinit var listOfTenure: MutableList<ROIDataList>
private lateinit var recyclerViewDropDownAdapter: HorizontalRecyclerViewAdapter private lateinit var recyclerViewDropDownAdapter: HorizontalRecyclerViewAdapter
private lateinit var listOfMinAmount: List<GetCodes>
private lateinit var listOfMaxAmount: List<GetCodes>
private lateinit var listOfFrequency: List<GetCodes>
private var tenure: Int = 0 private var tenure: Int = 0
private var interest: Double = 0.0 private var interest: Double = 0.0
@ -68,31 +70,27 @@ class StepOneBajajFDFragment : Fragment() {
binding.edtAmount.filters = arrayOf<InputFilter>(InputFilter.LengthFilter(8)) // upto 1 Cr binding.edtAmount.filters = arrayOf<InputFilter>(InputFilter.LengthFilter(8)) // upto 1 Cr
listOfMinAmount = ArrayList()
listOfMaxAmount = ArrayList()
listOfFrequency = ArrayList()
// Amount // Amount
binding.edtAmount.addTextChangedListener(object : TextWatcher { binding.edtAmount.addTextChangedListener(object : TextWatcher {
override fun afterTextChanged(s: Editable?) {} override fun afterTextChanged(s: Editable?) {}
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {} override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {}
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) { override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
removeError(binding.tlDepositAmount) removeError(binding.tlDepositAmount)
if (s.toString().trim().length >= 4 ) {
getRatesApi()
if (s.toString().trim().length >= 4) {
maturityAmountApi(tenure, interest) maturityAmountApi(tenure, interest)
} }
} }
}) })
// Frequency // Frequency
if ((activity as BajajFdMainActivity).listOfFrequency.isNotEmpty()) {
val adapter = ArrayAdapter(
activity as BajajFdMainActivity,
R.layout.spinner_dropdown,
(activity as BajajFdMainActivity).listOfFrequency
)
binding.spInterestPayout.setAdapter(adapter)
binding.spInterestPayout.setOnItemClickListener { _, _, position, _ ->
removeError(binding.tlInterestPayout)
binding.tvFrequency.text =
(activity as BajajFdMainActivity).listOfFrequency[position].Value
binding.spInterestPayout.setOnItemClickListener { _, _, position, _ ->
removeError(binding.tlInterestPayout)
if (listOfFrequency.isNotEmpty()) {
binding.tvFrequency.text = listOfFrequency[position].Value
if (!binding.tvFrequency.text.equals(getString(R.string.cumulativeText))) { if (!binding.tvFrequency.text.equals(getString(R.string.cumulativeText))) {
binding.txtCumulativeNon.text = getString(R.string.nonCumulativeROI) binding.txtCumulativeNon.text = getString(R.string.nonCumulativeROI)
} else { } else {
@ -101,18 +99,11 @@ class StepOneBajajFDFragment : Fragment() {
if (binding.edtAmount.text.toString().trim().isNotEmpty()) { if (binding.edtAmount.text.toString().trim().isNotEmpty()) {
maturityAmountApi(tenure, interest) maturityAmountApi(tenure, interest)
getRatesApi()
} else {
// please enter Amount first
commonErrorMethod(
binding.edtAmount,
binding.tlDepositAmount,
getString(R.string.emptyAmountFirst)
)
} }
} }
} }
// Tenure // Tenure
binding.spTenure.setOnItemClickListener { _, _, position, _ -> binding.spTenure.setOnItemClickListener { _, _, position, _ ->
removeError(binding.tlInterestTenure) removeError(binding.tlInterestTenure)
@ -121,7 +112,6 @@ class StepOneBajajFDFragment : Fragment() {
interest = listOfTenure[position].ROI interest = listOfTenure[position].ROI
binding.tvROI.text = interest.toString().plus(" %") binding.tvROI.text = interest.toString().plus(" %")
maturityAmountApi(tenure, interest) maturityAmountApi(tenure, interest)
recyclerViewDropDownAdapter.refresh() recyclerViewDropDownAdapter.refresh()
} }
} }
@ -158,7 +148,8 @@ class StepOneBajajFDFragment : Fragment() {
(activity as BajajFdMainActivity).fdInvestmentDetails.IPAddress = "" (activity as BajajFdMainActivity).fdInvestmentDetails.IPAddress = ""
(activity as BajajFdMainActivity).fdInvestmentDetails.Device = (activity as BajajFdMainActivity).fdInvestmentDetails.Device =
getString(R.string.app) getString(R.string.app)
(activity as BajajFdMainActivity).fdInvestmentDetails.Source = getString(R.string.source)
(activity as BajajFdMainActivity).fdInvestmentDetails.Source =
getString(R.string.source)
if (binding.swSeniorCitizen.isChecked) { if (binding.swSeniorCitizen.isChecked) {
(activity as BajajFdMainActivity).fdInvestmentDetails.CitizenType = (activity as BajajFdMainActivity).fdInvestmentDetails.CitizenType =
getString(R.string.seniorCitizen) getString(R.string.seniorCitizen)
@ -169,14 +160,147 @@ class StepOneBajajFDFragment : Fragment() {
(activity as BajajFdMainActivity).fdInvestmentDetails.CustomerType = "" (activity as BajajFdMainActivity).fdInvestmentDetails.CustomerType = ""
(activity as BajajFdMainActivity).fdInvestmentDetails.CKYCNumber = "" (activity as BajajFdMainActivity).fdInvestmentDetails.CKYCNumber = ""
(activity as BajajFdMainActivity).createFDApplicantRequest.FDInvestmentDetails
bajajFDInterface.stepOneApi("stepOneResponse") bajajFDInterface.stepOneApi("stepOneResponse")
} }
} }
minAmountApi()
interestPayoutApi()
return root return root
} }
private fun interestPayoutApi() {
val getCodeRequest = GetCodeRequest()
getCodeRequest.ProductName = getString(R.string.bajajFD)
getCodeRequest.Category = getString(R.string.category)
getCodeRequest.Language = getString(R.string.language)
getCodeRequest.InputValue = ""
stepOneBajajFDViewModel.getCode(getCodeRequest, token)
stepOneBajajFDViewModel.getCodeMutableData.observe(viewLifecycleOwner) { response ->
when (response) {
is Resource.Success -> {
Log.e("response", "-->$response")
val getCodeResponse: GetCodeResponse =
Gson().fromJson(response.data?.toString(), GetCodeResponse::class.java)
getCodeResponse.Response.StatusCode.let { code ->
when (code) {
200 -> {
listOfFrequency = getCodeResponse.Response.GetCodesList
if (listOfFrequency.isNotEmpty()) {
val adapter = ArrayAdapter(
activity as BajajFdMainActivity,
R.layout.spinner_dropdown,
listOfFrequency
)
binding.spInterestPayout.setAdapter(adapter)
binding.spInterestPayout.setText(
adapter.getItem(listOfFrequency.size - 1)?.Value,
false
)
binding.tvFrequency.text =
adapter.getItem(listOfFrequency.size - 1)?.Value
getRatesApi()
}
}
// 650 -> refreshToken()
else -> {}
}
}
}
is Resource.Error -> {
response.message?.let { message ->
Log.e(" ", "An error occurred:$message")
}
}
is Resource.Loading -> {
}
}
}
}
private fun minAmountApi() {
val getCodeRequest = GetCodeRequest()
getCodeRequest.ProductName = getString(R.string.bajajFD)
getCodeRequest.Category = getString(R.string.minAmountCategory)
getCodeRequest.Language = getString(R.string.language)
getCodeRequest.InputValue = ""
stepOneBajajFDViewModel.getMinAmount(getCodeRequest, token)
stepOneBajajFDViewModel.getMinAmountMutableData.observe(viewLifecycleOwner) { response ->
when (response) {
is Resource.Success -> {
Log.e("response", "-->$response")
val getCodeResponse: GetCodeResponse =
Gson().fromJson(response.data?.toString(), GetCodeResponse::class.java)
getCodeResponse.Response.StatusCode.let { code ->
when (code) {
200 -> {
listOfMinAmount = getCodeResponse.Response.GetCodesList
if (listOfMinAmount.isNotEmpty()) {
binding.txtMinAmount.text = getString(R.string.minAmount).plus(
listOfMinAmount[0].Value
)
}
maxAmountApi()
}
// 650 -> refreshToken()
else -> {}
}
}
}
is Resource.Error -> {
response.message?.let { message ->
Log.e(" ", "An error occurred:$message")
}
}
is Resource.Loading -> {
}
}
}
}
private fun maxAmountApi() {
val getCodeRequest = GetCodeRequest()
getCodeRequest.ProductName = getString(R.string.bajajFD)
getCodeRequest.Category = getString(R.string.MaxAmountCategory)
getCodeRequest.Language = getString(R.string.language)
getCodeRequest.InputValue = ""
stepOneBajajFDViewModel.getMaxAmount(getCodeRequest, token)
stepOneBajajFDViewModel.getMaxAmountMutableData.observe(viewLifecycleOwner) { response ->
when (response) {
is Resource.Success -> {
Log.e("response", "-->$response")
val getCodeResponse: GetCodeResponse =
Gson().fromJson(response.data?.toString(), GetCodeResponse::class.java)
getCodeResponse.Response.StatusCode.let { code ->
when (code) {
200 -> {
listOfMaxAmount = getCodeResponse.Response.GetCodesList
}
// 650 -> refreshToken()
else -> {}
}
}
}
is Resource.Error -> {
response.message?.let { message ->
Log.e(" ", "An error occurred:$message")
}
}
is Resource.Loading -> {
}
}
}
}
private fun setUpRecyclerView() { private fun setUpRecyclerView() {
recyclerViewDropDownAdapter = HorizontalRecyclerViewAdapter( recyclerViewDropDownAdapter = HorizontalRecyclerViewAdapter(
@ -199,7 +323,7 @@ class StepOneBajajFDFragment : Fragment() {
private fun maturityAmountApi(tenure: Int, interest: Double) { private fun maturityAmountApi(tenure: Int, interest: Double) {
if (Common.isNetworkAvailable(activity as BajajFdMainActivity)) { if (Common.isNetworkAvailable(activity as BajajFdMainActivity)) {
if (binding.edtAmount.text.toString().length >= 4 && interest != 0.0 && tenure != 0) {
if (binding.edtAmount.text.toString().length >= 4 && interest != 0.0 && tenure != 0) {
val maturityAmountRequest = GetMaturityAmountRequest() val maturityAmountRequest = GetMaturityAmountRequest()
maturityAmountRequest.FDProvider = getString(R.string.bajaj) maturityAmountRequest.FDProvider = getString(R.string.bajaj)
maturityAmountRequest.FDAmount = binding.edtAmount.text.toString().toInt() maturityAmountRequest.FDAmount = binding.edtAmount.text.toString().toInt()
@ -218,9 +342,10 @@ class StepOneBajajFDFragment : Fragment() {
getMaturityAmountResponse.Response.StatusCode.let { code -> getMaturityAmountResponse.Response.StatusCode.let { code ->
when (code) { when (code) {
200 -> { 200 -> {
binding.tvMaturityAmount.text = getString(R.string.rs).plus(
getMaturityAmountResponse.Response.MaturityAmount.toString()
)
binding.tvMaturityAmount.text =
getString(R.string.rs).plus(" ").plus(
getMaturityAmountResponse.Response.MaturityAmount.toString()
)
} }
// 650 -> refreshToken() // 650 -> refreshToken()
else -> { else -> {
@ -252,20 +377,23 @@ class StepOneBajajFDFragment : Fragment() {
binding.tlDepositAmount, binding.tlDepositAmount,
getString(R.string.emptyAmount) getString(R.string.emptyAmount)
) )
} else if (binding.edtAmount.text.toString().toDouble() < 5000) {
} else if (binding.edtAmount.text.toString()
.toDouble() < listOfMinAmount[0].Value.toDouble()
) {
commonErrorMethod( commonErrorMethod(
binding.edtAmount, binding.edtAmount,
binding.tlDepositAmount, binding.tlDepositAmount,
getString(R.string.validMinAmount) getString(R.string.validMinAmount)
) )
} else if (binding.edtAmount.text.toString().toDouble() > 50000000) {
} else if (binding.edtAmount.text.toString()
.toDouble() > listOfMaxAmount[0].Value.toDouble()
) {
commonErrorMethod( commonErrorMethod(
binding.edtAmount, binding.edtAmount,
binding.tlDepositAmount, binding.tlDepositAmount,
getString(R.string.validMaxAmount) getString(R.string.validMaxAmount)
) )
}
else if (binding.spInterestPayout.text.isEmpty()) {
} else if (binding.spInterestPayout.text.isEmpty()) {
Common.commonSpinnerErrorMethod( Common.commonSpinnerErrorMethod(
binding.spInterestPayout, binding.spInterestPayout,
binding.tlInterestPayout, binding.tlInterestPayout,
@ -320,6 +448,16 @@ class StepOneBajajFDFragment : Fragment() {
listOfTenure listOfTenure
) )
binding.spTenure.setAdapter(tenureAdapter) binding.spTenure.setAdapter(tenureAdapter)
binding.spTenure.setText(
tenureAdapter.getItem(0)?.Tenure.plus(
" Months | "
).plus(tenureAdapter.getItem(0)?.ROI).plus(" %"), false
)
tenure = tenureAdapter.getItem(0)?.Tenure.toString().toInt()
interest = tenureAdapter.getItem(0)?.ROI ?: 0.0
binding.tvROI.text =
tenureAdapter.getItem(0)?.ROI.toString().plus(" %")
setUpRecyclerView() setUpRecyclerView()
} else { } else {
binding.ORLayout.visibility = View.GONE binding.ORLayout.visibility = View.GONE


+ 604
- 88
app/src/main/java/com/nivesh/production/bajajfd/ui/fragment/StepTwoBajajFDFragment.kt View File

@ -1,5 +1,7 @@
package com.nivesh.production.bajajfd.ui.fragment package com.nivesh.production.bajajfd.ui.fragment
import android.annotation.SuppressLint
import android.app.DatePickerDialog
import android.os.Bundle import android.os.Bundle
import android.text.Editable import android.text.Editable
import android.text.InputFilter import android.text.InputFilter
@ -7,22 +9,25 @@ import android.text.InputFilter.LengthFilter
import android.text.TextWatcher import android.text.TextWatcher
import android.util.Log import android.util.Log
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.MotionEvent
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.ArrayAdapter import android.widget.ArrayAdapter
import android.widget.RadioButton import android.widget.RadioButton
import android.widget.Toast
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import com.google.android.material.textfield.TextInputEditText
import com.google.gson.Gson import com.google.gson.Gson
import com.nivesh.production.bajajfd.R import com.nivesh.production.bajajfd.R
import com.nivesh.production.bajajfd.databinding.FragmentBajajfdStepTwoBinding import com.nivesh.production.bajajfd.databinding.FragmentBajajfdStepTwoBinding
import com.nivesh.production.bajajfd.interfaces.BajajFDInterface import com.nivesh.production.bajajfd.interfaces.BajajFDInterface
import com.nivesh.production.bajajfd.model.PanCheckRequest
import com.nivesh.production.bajajfd.model.PanCheckResponse
import com.nivesh.production.bajajfd.model.*
import com.nivesh.production.bajajfd.ui.activity.BajajFdMainActivity import com.nivesh.production.bajajfd.ui.activity.BajajFdMainActivity
import com.nivesh.production.bajajfd.util.Common import com.nivesh.production.bajajfd.util.Common
import com.nivesh.production.bajajfd.util.Common.Companion.commonErrorMethod import com.nivesh.production.bajajfd.util.Common.Companion.commonErrorMethod
import com.nivesh.production.bajajfd.util.Common.Companion.commonSpinnerErrorMethod import com.nivesh.production.bajajfd.util.Common.Companion.commonSpinnerErrorMethod
import com.nivesh.production.bajajfd.util.Common.Companion.getDate
import com.nivesh.production.bajajfd.util.Common.Companion.isIndianMobileNo import com.nivesh.production.bajajfd.util.Common.Companion.isIndianMobileNo
import com.nivesh.production.bajajfd.util.Common.Companion.isValidEmail import com.nivesh.production.bajajfd.util.Common.Companion.isValidEmail
import com.nivesh.production.bajajfd.util.Common.Companion.isValidName import com.nivesh.production.bajajfd.util.Common.Companion.isValidName
@ -31,14 +36,28 @@ import com.nivesh.production.bajajfd.util.Common.Companion.removeError
import com.nivesh.production.bajajfd.util.Constants.Companion.token import com.nivesh.production.bajajfd.util.Constants.Companion.token
import com.nivesh.production.bajajfd.util.Resource import com.nivesh.production.bajajfd.util.Resource
import com.nivesh.production.bajajfd.viewModel.StepTwoBajajFDViewModel import com.nivesh.production.bajajfd.viewModel.StepTwoBajajFDViewModel
import java.util.*
class StepTwoBajajFDFragment : Fragment() { class StepTwoBajajFDFragment : Fragment() {
private var _binding: FragmentBajajfdStepTwoBinding? = null private var _binding: FragmentBajajfdStepTwoBinding? = null
private val binding get() = _binding!! private val binding get() = _binding!!
private lateinit var bajajFDInterface: BajajFDInterface private lateinit var bajajFDInterface: BajajFDInterface
private lateinit var rbBank: RadioButton private lateinit var rbBank: RadioButton
private lateinit var rbPaymentMode: RadioButton private lateinit var rbPaymentMode: RadioButton
private var cal = Calendar.getInstance()
private lateinit var listOfTitle: List<GetCodes>
private lateinit var listOfGender: List<GetCodes>
private lateinit var listOfAnnualIncome: List<GetCodes>
private lateinit var listOfRelationShip: List<GetCodes>
private lateinit var listOfMaritalStatus: List<GetCodes>
private lateinit var listOfOccupation: List<GetCodes>
private lateinit var listOfStates: List<DataObject>
private lateinit var listOfCities: List<DataObjectX>
private lateinit var stepTwoBajajFDViewModel: StepTwoBajajFDViewModel private lateinit var stepTwoBajajFDViewModel: StepTwoBajajFDViewModel
companion object { companion object {
@ -62,7 +81,13 @@ class StepTwoBajajFDFragment : Fragment() {
val root = binding.root val root = binding.root
stepTwoBajajFDViewModel = (activity as BajajFdMainActivity).stepTwoBajajFDViewModel stepTwoBajajFDViewModel = (activity as BajajFdMainActivity).stepTwoBajajFDViewModel
listOfTitle = ArrayList()
listOfGender = ArrayList()
listOfAnnualIncome = ArrayList()
listOfRelationShip = ArrayList()
listOfMaritalStatus = ArrayList()
listOfOccupation = ArrayList()
listOfStates = ArrayList()
// Personal Details // Personal Details
binding.edtMobileNumber.filters = arrayOf<InputFilter>(LengthFilter(10)) binding.edtMobileNumber.filters = arrayOf<InputFilter>(LengthFilter(10))
binding.edtPANNumber.filters = arrayOf<InputFilter>(LengthFilter(10)) binding.edtPANNumber.filters = arrayOf<InputFilter>(LengthFilter(10))
@ -81,10 +106,17 @@ class StepTwoBajajFDFragment : Fragment() {
removeError(binding.tlMobileNumber) removeError(binding.tlMobileNumber)
} }
}) })
binding.edtMobileNumber.setText((activity as BajajFdMainActivity).getClientDetailsResponse.ObjectResponse?.clientDetails?.mobile)
// create an OnDateSetListener
binding.edtDOB.setText((activity as BajajFdMainActivity).getClientDetailsResponse.ObjectResponse?.clientDetails?.clientMasterMFD?.CLIENT_DOB)
binding.edtDOB.setOnClickListener { binding.edtDOB.setOnClickListener {
removeError(binding.tlDOB) removeError(binding.tlDOB)
datePicker(binding.edtDOB)
} }
binding.edtPANNumber.setText((activity as BajajFdMainActivity).getClientDetailsResponse.ObjectResponse?.clientDetails?.clientMasterMFD?.CLIENT_PAN)
binding.edtPANNumber.addTextChangedListener(object : TextWatcher { binding.edtPANNumber.addTextChangedListener(object : TextWatcher {
override fun afterTextChanged(s: Editable?) { override fun afterTextChanged(s: Editable?) {
@ -101,18 +133,15 @@ class StepTwoBajajFDFragment : Fragment() {
} }
}) })
val titleAdapter = ArrayAdapter(
activity as BajajFdMainActivity,
R.layout.spinner_dropdown,
resources.getStringArray(
R.array.title
)
)
binding.spTitle.setAdapter(titleAdapter)
binding.spTitle.setOnItemClickListener { _, _, _, _ -> binding.spTitle.setOnItemClickListener { _, _, _, _ ->
removeError(binding.tlTitle) removeError(binding.tlTitle)
} }
val splitStringName =
(activity as BajajFdMainActivity).getClientDetailsResponse.ObjectResponse?.clientDetails?.clientMasterMFD?.CLIENT_APPNAME1?.split(
"\\s".toRegex()
)?.toTypedArray()
binding.edtFirstName.addTextChangedListener(object : TextWatcher { binding.edtFirstName.addTextChangedListener(object : TextWatcher {
override fun afterTextChanged(s: Editable?) { override fun afterTextChanged(s: Editable?) {
@ -125,6 +154,8 @@ class StepTwoBajajFDFragment : Fragment() {
removeError(binding.tlFirstName) removeError(binding.tlFirstName)
} }
}) })
binding.edtFirstName.setText(splitStringName?.get(0).toString())
binding.edtMiddleName.addTextChangedListener(object : TextWatcher { binding.edtMiddleName.addTextChangedListener(object : TextWatcher {
override fun afterTextChanged(s: Editable?) { override fun afterTextChanged(s: Editable?) {
@ -137,6 +168,8 @@ class StepTwoBajajFDFragment : Fragment() {
removeError(binding.tlMiddleName) removeError(binding.tlMiddleName)
} }
}) })
binding.edtMiddleName.setText(splitStringName?.get(1).toString())
binding.edtLastName.addTextChangedListener(object : TextWatcher { binding.edtLastName.addTextChangedListener(object : TextWatcher {
override fun afterTextChanged(s: Editable?) { override fun afterTextChanged(s: Editable?) {
@ -149,15 +182,8 @@ class StepTwoBajajFDFragment : Fragment() {
removeError(binding.tlLastName) removeError(binding.tlLastName)
} }
}) })
binding.edtLastName.setText(splitStringName?.get(2).toString())
val genderAdapter = ArrayAdapter(
activity as BajajFdMainActivity,
R.layout.spinner_dropdown,
resources.getStringArray(
R.array.gender
)
)
binding.spGender.setAdapter(genderAdapter)
binding.spGender.setOnItemClickListener { _, _, _, _ -> binding.spGender.setOnItemClickListener { _, _, _, _ ->
removeError(binding.tlGender) removeError(binding.tlGender)
} }
@ -174,18 +200,12 @@ class StepTwoBajajFDFragment : Fragment() {
removeError(binding.tlEmail) removeError(binding.tlEmail)
} }
}) })
binding.edtOccupation.addTextChangedListener(object : TextWatcher {
binding.edtEmail.setText((activity as BajajFdMainActivity).getClientDetailsResponse.ObjectResponse?.clientDetails?.clientMasterMFD?.CLIENT_EMAIL)
override fun afterTextChanged(s: Editable?) {
}
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
}
binding.spOccupation.setOnItemClickListener { _, _, _, _ ->
removeError(binding.tlOccupation)
}
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
removeError(binding.tlOccupation)
}
})
binding.edtQualification.addTextChangedListener(object : TextWatcher { binding.edtQualification.addTextChangedListener(object : TextWatcher {
override fun afterTextChanged(s: Editable?) { override fun afterTextChanged(s: Editable?) {
@ -199,26 +219,10 @@ class StepTwoBajajFDFragment : Fragment() {
} }
}) })
val maritalAdapter = ArrayAdapter(
activity as BajajFdMainActivity,
R.layout.spinner_dropdown,
resources.getStringArray(
R.array.maritalStatus
)
)
binding.spMarital.setAdapter(maritalAdapter)
binding.spMarital.setOnItemClickListener { _, _, _, _ -> binding.spMarital.setOnItemClickListener { _, _, _, _ ->
removeError(binding.tlMarital) removeError(binding.tlMarital)
} }
val relationShipAdapter = ArrayAdapter(
activity as BajajFdMainActivity,
R.layout.spinner_dropdown,
resources.getStringArray(
R.array.maritalStatus
)
)
binding.spRelation.setAdapter(relationShipAdapter)
binding.spRelation.setOnItemClickListener { _, _, _, _ -> binding.spRelation.setOnItemClickListener { _, _, _, _ ->
removeError(binding.tlRelation) removeError(binding.tlRelation)
} }
@ -235,6 +239,7 @@ class StepTwoBajajFDFragment : Fragment() {
removeError(binding.tlRelationName) removeError(binding.tlRelationName)
} }
}) })
binding.edtAddressLine1.addTextChangedListener(object : TextWatcher { binding.edtAddressLine1.addTextChangedListener(object : TextWatcher {
override fun afterTextChanged(s: Editable?) { override fun afterTextChanged(s: Editable?) {
@ -259,7 +264,7 @@ class StepTwoBajajFDFragment : Fragment() {
removeError(binding.tlAddressLine2) removeError(binding.tlAddressLine2)
} }
}) })
binding.edtState.addTextChangedListener(object : TextWatcher {
binding.edtAddressLine3.addTextChangedListener(object : TextWatcher {
override fun afterTextChanged(s: Editable?) { override fun afterTextChanged(s: Editable?) {
} }
@ -268,21 +273,16 @@ class StepTwoBajajFDFragment : Fragment() {
} }
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) { override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
removeError(binding.tlState)
removeError(binding.tlAddressLine3)
} }
}) })
binding.edtCity.addTextChangedListener(object : TextWatcher {
override fun afterTextChanged(s: Editable?) {
}
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
}
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
removeError(binding.tlCity)
}
})
binding.spState.setOnItemClickListener { _, _, _, _ ->
removeError(binding.tlState)
}
binding.spCity.setOnItemClickListener { _, _, _, _ ->
removeError(binding.tlCity)
}
binding.edtPinCode.addTextChangedListener(object : TextWatcher { binding.edtPinCode.addTextChangedListener(object : TextWatcher {
override fun afterTextChanged(s: Editable?) { override fun afterTextChanged(s: Editable?) {
@ -297,11 +297,9 @@ class StepTwoBajajFDFragment : Fragment() {
}) })
// Nominee Details // Nominee Details
binding.spNomineeTitle.setAdapter(titleAdapter)
binding.spNomineeTitle.setOnItemClickListener { _, _, _, _ -> binding.spNomineeTitle.setOnItemClickListener { _, _, _, _ ->
binding.tlNomineeTitle.error = null binding.tlNomineeTitle.error = null
} }
binding.edtNomineeFirstName.addTextChangedListener(object : TextWatcher { binding.edtNomineeFirstName.addTextChangedListener(object : TextWatcher {
override fun afterTextChanged(s: Editable?) { override fun afterTextChanged(s: Editable?) {
@ -338,12 +336,10 @@ class StepTwoBajajFDFragment : Fragment() {
removeError(binding.tlNomineeLastName) removeError(binding.tlNomineeLastName)
} }
}) })
binding.edtNomineeDOB.setOnClickListener { binding.edtNomineeDOB.setOnClickListener {
removeError(binding.tlNomineeDOB) removeError(binding.tlNomineeDOB)
datePicker(binding.edtNomineeDOB)
} }
binding.spNomineeRelation.setAdapter(relationShipAdapter)
binding.spNomineeRelation.setOnItemClickListener { _, _, _, _ -> binding.spNomineeRelation.setOnItemClickListener { _, _, _, _ ->
removeError(binding.tlNomineeRelation) removeError(binding.tlNomineeRelation)
} }
@ -377,12 +373,9 @@ class StepTwoBajajFDFragment : Fragment() {
removeError(binding.tlGuardianAge) removeError(binding.tlGuardianAge)
} }
}) })
binding.spGuardianRelation.setAdapter(relationShipAdapter)
binding.spGuardianRelation.setOnItemClickListener { _, _, _, _ -> binding.spGuardianRelation.setOnItemClickListener { _, _, _, _ ->
removeError(binding.tlGuardianRelation) removeError(binding.tlGuardianRelation)
} }
binding.edtGuardianAddress.addTextChangedListener(object : TextWatcher { binding.edtGuardianAddress.addTextChangedListener(object : TextWatcher {
override fun afterTextChanged(s: Editable?) { override fun afterTextChanged(s: Editable?) {
@ -477,7 +470,6 @@ class StepTwoBajajFDFragment : Fragment() {
binding.llPersonalDetail.visibility = View.VISIBLE binding.llPersonalDetail.visibility = View.VISIBLE
} }
} }
binding.tvNomineeDetails.setOnClickListener { binding.tvNomineeDetails.setOnClickListener {
if (binding.llNomineeDetail.visibility == View.VISIBLE) { if (binding.llNomineeDetail.visibility == View.VISIBLE) {
binding.llNomineeDetail.visibility = View.GONE binding.llNomineeDetail.visibility = View.GONE
@ -485,7 +477,6 @@ class StepTwoBajajFDFragment : Fragment() {
binding.llNomineeDetail.visibility = View.VISIBLE binding.llNomineeDetail.visibility = View.VISIBLE
} }
} }
binding.tvBankDetails.setOnClickListener { binding.tvBankDetails.setOnClickListener {
if (binding.llBankDetails.visibility == View.VISIBLE) { if (binding.llBankDetails.visibility == View.VISIBLE) {
binding.llBankDetails.visibility = View.GONE binding.llBankDetails.visibility = View.GONE
@ -494,6 +485,7 @@ class StepTwoBajajFDFragment : Fragment() {
} }
} }
titleApi()
binding.btnNext.setOnClickListener { binding.btnNext.setOnClickListener {
if (validation()) { if (validation()) {
// Applicant Details // Applicant Details
@ -514,7 +506,7 @@ class StepTwoBajajFDFragment : Fragment() {
(activity as BajajFdMainActivity).applicantDetails.ApplicantMobile = (activity as BajajFdMainActivity).applicantDetails.ApplicantMobile =
binding.edtMobileNumber.text.toString() binding.edtMobileNumber.text.toString()
(activity as BajajFdMainActivity).applicantDetails.ApplicantOccupation = (activity as BajajFdMainActivity).applicantDetails.ApplicantOccupation =
binding.edtOccupation.text.toString()
binding.spOccupation.text.toString()
(activity as BajajFdMainActivity).applicantDetails.ApplicantQualification = (activity as BajajFdMainActivity).applicantDetails.ApplicantQualification =
binding.edtQualification.text.toString() binding.edtQualification.text.toString()
(activity as BajajFdMainActivity).applicantDetails.ApplicantMaritalStatus = (activity as BajajFdMainActivity).applicantDetails.ApplicantMaritalStatus =
@ -525,11 +517,12 @@ class StepTwoBajajFDFragment : Fragment() {
binding.edtAddressLine1.text.toString() binding.edtAddressLine1.text.toString()
(activity as BajajFdMainActivity).applicantDetails.ApplicantAddress2 = (activity as BajajFdMainActivity).applicantDetails.ApplicantAddress2 =
binding.edtAddressLine2.text.toString() binding.edtAddressLine2.text.toString()
(activity as BajajFdMainActivity).applicantDetails.ApplicantAddress3 = ""
(activity as BajajFdMainActivity).applicantDetails.ApplicantAddress3 =
binding.edtAddressLine3.text.toString()
(activity as BajajFdMainActivity).applicantDetails.ApplicantCity = (activity as BajajFdMainActivity).applicantDetails.ApplicantCity =
binding.edtCity.text.toString()
binding.spCity.text.toString()
(activity as BajajFdMainActivity).applicantDetails.ApplicantState = (activity as BajajFdMainActivity).applicantDetails.ApplicantState =
binding.edtState.text.toString()
binding.spState.text.toString()
(activity as BajajFdMainActivity).applicantDetails.ApplicantCountry = "India" (activity as BajajFdMainActivity).applicantDetails.ApplicantCountry = "India"
(activity as BajajFdMainActivity).applicantDetails.ApplicantPincode = (activity as BajajFdMainActivity).applicantDetails.ApplicantPincode =
binding.edtPinCode.text.toString().toInt() binding.edtPinCode.text.toString().toInt()
@ -601,6 +594,16 @@ class StepTwoBajajFDFragment : Fragment() {
(activity as BajajFdMainActivity).fdBankDetails.PaymentMode = (activity as BajajFdMainActivity).fdBankDetails.PaymentMode =
rbPaymentMode.text.toString() rbPaymentMode.text.toString()
(activity as BajajFdMainActivity).createFDApplicantRequest.ApplicantDetails
(activity as BajajFdMainActivity).createFDApplicantRequest.ApplicantRelationDetails
(activity as BajajFdMainActivity).createFDApplicantRequest.FdBankDetails
(activity as BajajFdMainActivity).createFDApplicantRequest.NomineeDetails
(activity as BajajFdMainActivity).createFDApplicantRequest.NomineeGuardianDetails
Log.e(
"CreateFDRequest",
"-->" + Gson().toJson((activity as BajajFdMainActivity).createFDApplicantRequest)
)
bajajFDInterface.stepTwoApi("stepTwoResponse") bajajFDInterface.stepTwoApi("stepTwoResponse")
} }
} }
@ -608,9 +611,30 @@ class StepTwoBajajFDFragment : Fragment() {
binding.btnBack.setOnClickListener { binding.btnBack.setOnClickListener {
(activity as BajajFdMainActivity).binding.viewPager.currentItem = 0 (activity as BajajFdMainActivity).binding.viewPager.currentItem = 0
} }
return root return root
} }
private fun datePicker(edtDOB: TextInputEditText) {
val year = cal.get(Calendar.YEAR)
val month = cal.get(Calendar.MONTH)
val day = cal.get(Calendar.DAY_OF_MONTH)
val datePickerDialog = DatePickerDialog(
activity as BajajFdMainActivity, { _, year, monthOfYear, dayOfMonth ->
if (monthOfYear.toString().length == 1) {
"0".plus(monthOfYear)
}
edtDOB.setText(getDate(dayOfMonth.toString() + "-" + (monthOfYear + 1) + "-" + year))
}, year, month, day
)
datePickerDialog.datePicker.maxDate = cal.timeInMillis
val c = Calendar.getInstance()
c.add(Calendar.YEAR, -140)
datePickerDialog.datePicker.minDate = c.timeInMillis
datePickerDialog.show()
}
private fun panCheckApi() { private fun panCheckApi() {
if (Common.isNetworkAvailable(activity as BajajFdMainActivity)) { if (Common.isNetworkAvailable(activity as BajajFdMainActivity)) {
val panCheck = PanCheckRequest() val panCheck = PanCheckRequest()
@ -669,6 +693,486 @@ class StepTwoBajajFDFragment : Fragment() {
} }
} }
@SuppressLint("ClickableViewAccessibility")
private fun titleApi() {
if (Common.isNetworkAvailable(activity as BajajFdMainActivity)) {
val getCodeRequest = GetCodeRequest()
getCodeRequest.ProductName = getString(R.string.bajajFD)
getCodeRequest.Category = getString(R.string.salutationCategory)
getCodeRequest.Language = getString(R.string.language)
getCodeRequest.InputValue = ""
stepTwoBajajFDViewModel.titleApi(getCodeRequest, token)
stepTwoBajajFDViewModel.getTitleMutableData.observe(viewLifecycleOwner) { response ->
when (response) {
is Resource.Success -> {
Log.e("response", "-->$response")
val getCodeResponse: GetCodeResponse =
Gson().fromJson(response.data?.toString(), GetCodeResponse::class.java)
getCodeResponse.Response.StatusCode.let { code ->
when (code) {
200 -> {
//set data in spinner
listOfTitle = getCodeResponse.Response.GetCodesList
if (listOfTitle.isNotEmpty()) {
val adapter = ArrayAdapter(
activity as BajajFdMainActivity,
R.layout.spinner_dropdown,
listOfTitle
)
binding.spTitle.setAdapter(adapter)
val titleText=(activity as BajajFdMainActivity).getClientDetailsResponse.ObjectResponse?.clientDetails?.clientMasterMFD?.Client_Title
val newTitleText= "$titleText."
if (titleText.isNullOrEmpty()) {
binding.spTitle.setText(
adapter.getItem(0)?.Value,
false
)
}else{
for (title in listOfTitle) {
if (title.Value ==newTitleText)
{
binding.spTitle.setText(title.Value,false)
break
}
binding.spTitle.setOnTouchListener { v, event ->
when (event?.action) {
MotionEvent.ACTION_DOWN -> {
binding.spTitle.setText(
adapter.getItem(0)?.Value,
false
)
}
}
v?.onTouchEvent(event) ?: true
}
}
}
binding.spNomineeTitle.setAdapter(adapter)
binding.spNomineeTitle.setText(
adapter.getItem(0)?.Value,
false
)
}
genderApi()
relationShipApi()
maritalStatusApi()
occupationApi()
annualIncomeApi()
stateListApi()
}
// 650 -> refreshToken()
else -> {}
}
}
}
is Resource.Error -> {
response.message?.let { message ->
Log.e(" ", "An error occurred:$message")
}
}
is Resource.Loading -> {
}
}
}
}
}
private fun genderApi() {
if (Common.isNetworkAvailable(activity as BajajFdMainActivity)) {
val getCodeRequest = GetCodeRequest()
getCodeRequest.ProductName = getString(R.string.bajajFD)
getCodeRequest.Category = getString(R.string.genderCategory)
getCodeRequest.Language = getString(R.string.language)
getCodeRequest.InputValue = ""
stepTwoBajajFDViewModel.genderApi(getCodeRequest, token)
stepTwoBajajFDViewModel.getGenderMutableData.observe(viewLifecycleOwner) { response ->
when (response) {
is Resource.Success -> {
Log.e("response", "-->$response")
val getCodeResponse: GetCodeResponse =
Gson().fromJson(response.data?.toString(), GetCodeResponse::class.java)
getCodeResponse.Response.StatusCode.let { code ->
when (code) {
200 -> {
listOfGender = getCodeResponse.Response.GetCodesList
if (listOfGender.isNotEmpty()) {
val adapter = ArrayAdapter(
activity as BajajFdMainActivity,
R.layout.spinner_dropdown,
listOfGender
)
binding.spGender.setAdapter(adapter)
binding.spGender.setText(
adapter.getItem(0)?.Value,
false
)
}
}
// 650 -> refreshToken()
else -> {}
}
}
}
is Resource.Error -> {
response.message?.let { message ->
Log.e(" ", "An error occurred:$message")
}
}
is Resource.Loading -> {
}
}
}
}
}
private fun relationShipApi() {
if (Common.isNetworkAvailable(activity as BajajFdMainActivity)) {
val getCodeRequest = GetCodeRequest()
getCodeRequest.ProductName = getString(R.string.bajajFD)
getCodeRequest.Category = getString(R.string.relationshipCategory)
getCodeRequest.Language = getString(R.string.language)
getCodeRequest.InputValue = ""
stepTwoBajajFDViewModel.relationShipApi(getCodeRequest, token)
stepTwoBajajFDViewModel.getRelationShipMutableData.observe(viewLifecycleOwner) { response ->
when (response) {
is Resource.Success -> {
Log.e("response", "-->$response")
val getCodeResponse: GetCodeResponse =
Gson().fromJson(response.data?.toString(), GetCodeResponse::class.java)
getCodeResponse.Response.StatusCode.let { code ->
when (code) {
200 -> {
listOfRelationShip = getCodeResponse.Response.GetCodesList
if (listOfGender.isNotEmpty()) {
val adapter = ArrayAdapter(
activity as BajajFdMainActivity,
R.layout.spinner_dropdown,
listOfRelationShip
)
binding.spRelation.setAdapter(adapter)
binding.spRelation.setText(
adapter.getItem(0)?.Value,
false
)
binding.spNomineeRelation.setAdapter(adapter)
binding.spNomineeRelation.setText(
adapter.getItem(0)?.Value,
false
)
binding.spGuardianRelation.setAdapter(adapter)
binding.spGuardianRelation.setText(
adapter.getItem(0)?.Value,
false
)
}
}
// 650 -> refreshToken()
else -> {}
}
}
}
is Resource.Error -> {
response.message?.let { message ->
Log.e(" ", "An error occurred:$message")
}
}
is Resource.Loading -> {
}
}
}
}
}
private fun maritalStatusApi() {
if (Common.isNetworkAvailable(activity as BajajFdMainActivity)) {
val getCodeRequest = GetCodeRequest()
getCodeRequest.ProductName = getString(R.string.bajajFD)
getCodeRequest.Category = getString(R.string.maritalCategory)
getCodeRequest.Language = getString(R.string.language)
getCodeRequest.InputValue = ""
stepTwoBajajFDViewModel.maritalStatusApi(getCodeRequest, token)
stepTwoBajajFDViewModel.getMaritalStatusMutableData.observe(viewLifecycleOwner) { response ->
when (response) {
is Resource.Success -> {
Log.e("response", "-->$response")
val getCodeResponse: GetCodeResponse =
Gson().fromJson(response.data?.toString(), GetCodeResponse::class.java)
getCodeResponse.Response.StatusCode.let { code ->
when (code) {
200 -> {
listOfMaritalStatus = getCodeResponse.Response.GetCodesList
if (listOfMaritalStatus.isNotEmpty()) {
val adapter = ArrayAdapter(
activity as BajajFdMainActivity,
R.layout.spinner_dropdown,
listOfMaritalStatus
)
binding.spMarital.setAdapter(adapter)
binding.spMarital.setText(
adapter.getItem(0)?.Value,
false
)
}
}
// 650 -> refreshToken()
else -> {}
}
}
}
is Resource.Error -> {
response.message?.let { message ->
Log.e(" ", "An error occurred:$message")
}
}
is Resource.Loading -> {
}
}
}
}
}
private fun occupationApi() {
if (Common.isNetworkAvailable(activity as BajajFdMainActivity)) {
val getCodeRequest = GetCodeRequest()
getCodeRequest.ProductName = getString(R.string.bajajFD)
getCodeRequest.Category = getString(R.string.occupationCategory)
getCodeRequest.Language = getString(R.string.language)
getCodeRequest.InputValue = ""
stepTwoBajajFDViewModel.occupationApi(getCodeRequest, token)
stepTwoBajajFDViewModel.getOccupationMutableData.observe(viewLifecycleOwner) { response ->
when (response) {
is Resource.Success -> {
Log.e("response", "-->$response")
val getCodeResponse: GetCodeResponse =
Gson().fromJson(response.data?.toString(), GetCodeResponse::class.java)
getCodeResponse.Response.StatusCode.let { code ->
when (code) {
200 -> {
listOfOccupation = getCodeResponse.Response.GetCodesList
if (listOfOccupation.isNotEmpty()) {
val adapter = ArrayAdapter(
activity as BajajFdMainActivity,
R.layout.spinner_dropdown,
listOfOccupation
)
binding.spOccupation.setAdapter(adapter)
binding.spOccupation.setText(
adapter.getItem(0)?.Value,
false
)
}
}
// 650 -> refreshToken()
else -> {}
}
}
}
is Resource.Error -> {
response.message?.let { message ->
Log.e(" ", "An error occurred:$message")
}
}
is Resource.Loading -> {
}
}
}
}
}
private fun annualIncomeApi() {
if (Common.isNetworkAvailable(activity as BajajFdMainActivity)) {
val getCodeRequest = GetCodeRequest()
getCodeRequest.ProductName = getString(R.string.bajajFD)
getCodeRequest.Category = getString(R.string.annualIncome)
getCodeRequest.Language = getString(R.string.language)
getCodeRequest.InputValue = ""
stepTwoBajajFDViewModel.annualIncomeApi(getCodeRequest, token)
stepTwoBajajFDViewModel.getAnnualIncomeMutableData.observe(viewLifecycleOwner) { response ->
when (response) {
is Resource.Success -> {
Log.e("response", "-->$response")
val getCodeResponse: GetCodeResponse =
Gson().fromJson(response.data?.toString(), GetCodeResponse::class.java)
getCodeResponse.Response.StatusCode.let { code ->
when (code) {
200 -> {
listOfAnnualIncome = getCodeResponse.Response.GetCodesList
if (listOfAnnualIncome.isNotEmpty()) {
val adapter = ArrayAdapter(
activity as BajajFdMainActivity,
R.layout.spinner_dropdown,
listOfAnnualIncome
)
binding.spIncome.setAdapter(adapter)
binding.spIncome.setText(
adapter.getItem(0)?.Value,
false
)
}
}
// 650 -> refreshToken()
else -> {}
}
}
}
is Resource.Error -> {
response.message?.let { message ->
Log.e(" ", "An error occurred:$message")
}
}
is Resource.Loading -> {
}
}
}
}
}
private fun stateListApi() {
if (Common.isNetworkAvailable(activity as BajajFdMainActivity)) {
stepTwoBajajFDViewModel.stateApi(token)
stepTwoBajajFDViewModel.getStateMasterMutableData.observe(viewLifecycleOwner) { response ->
when (response) {
is Resource.Success -> {
Log.e("response", "-->$response")
val stateListResponse: StateListResponse =
Gson().fromJson(
response.data?.toString(),
StateListResponse::class.java
)
stateListResponse.response.status_code.let { code ->
when (code) {
200 -> {
listOfStates = stateListResponse.DataObject
if (listOfStates.isNotEmpty()) {
val adapter = ArrayAdapter(
activity as BajajFdMainActivity,
R.layout.spinner_dropdown,
listOfStates
)
binding.spState.setAdapter(adapter)
binding.spState.setText(
adapter.getItem(0)?.State_Name,
false
)
cityListApi(adapter.getItem(0)?.State_Id)
}
}
// 650 -> refreshToken()
else -> {}
}
}
}
is Resource.Error -> {
response.message?.let { message ->
Log.e(" ", "An error occurred:$message")
}
}
is Resource.Loading -> {
}
}
}
}
}
private fun cityListApi(stateCode: Int?) {
val cityRequest = CityRequest()
cityRequest.StateCode = stateCode
cityRequest.Type = ""
cityRequest.ClientCode = "8872"
cityRequest.RoleID = 5
cityRequest.APIName = ""
cityRequest.UID = 19060
cityRequest.Subbroker_Code = "1014"
cityRequest.RMCode = ""
cityRequest.HOCode = ""
cityRequest.Source = "Nivesh"
cityRequest.APP_Web = "App"
stepTwoBajajFDViewModel.cityListApi(cityRequest, token)
stepTwoBajajFDViewModel.getCityListMutableData.observe(viewLifecycleOwner) { response ->
when (response) {
is Resource.Success -> {
Log.e("response", "-->$response")
val cityListResponse: CityListResponse =
Gson().fromJson(response.data?.toString(), CityListResponse::class.java)
cityListResponse.response.status_code.let { code ->
when (code) {
200 -> {
listOfCities = cityListResponse.DataObject
if (listOfCities.isNotEmpty()) {
val adapter = ArrayAdapter(
activity as BajajFdMainActivity,
R.layout.spinner_dropdown,
listOfCities
)
binding.spCity.setAdapter(adapter)
binding.spCity.setText(
adapter.getItem(0)?.city_name,
false
)
}
}
// 650 -> refreshToken()
else -> {}
}
}
}
is Resource.Error -> {
response.message?.let { message ->
Log.e(" ", "An error occurred:$message")
}
}
is Resource.Loading -> {
}
}
}
}
// validations // validations
private fun validation(): Boolean { private fun validation(): Boolean {
@ -678,17 +1182,17 @@ class StepTwoBajajFDFragment : Fragment() {
binding.tlMobileNumber, binding.tlMobileNumber,
getString(R.string.emptyMobileNumber) getString(R.string.emptyMobileNumber)
) )
} else if (binding.edtMobileNumber.text?.length != 10) { // EditText
} else if (!isIndianMobileNo(binding.edtMobileNumber.text.toString())) { // EditText
commonErrorMethod( commonErrorMethod(
binding.edtMobileNumber, binding.edtMobileNumber,
binding.tlMobileNumber, binding.tlMobileNumber,
getString(R.string.inValidMobileNumber)
getString(R.string.inValidIndianMobileNumber)
) )
} else if (!isIndianMobileNo(binding.edtMobileNumber.text.toString())) { // EditText
} else if (binding.edtMobileNumber.text?.length != 10) { // EditText
commonErrorMethod( commonErrorMethod(
binding.edtMobileNumber, binding.edtMobileNumber,
binding.tlMobileNumber, binding.tlMobileNumber,
getString(R.string.inValidIndianMobileNumber)
getString(R.string.inValidMobileNumber)
) )
} else if (binding.edtDOB.text.toString().isEmpty()) { // EditText } else if (binding.edtDOB.text.toString().isEmpty()) { // EditText
commonErrorMethod(binding.edtDOB, binding.tlDOB, getString(R.string.emptyDOB)) commonErrorMethod(binding.edtDOB, binding.tlDOB, getString(R.string.emptyDOB))
@ -698,7 +1202,7 @@ class StepTwoBajajFDFragment : Fragment() {
binding.tlPanNumber, binding.tlPanNumber,
getString(R.string.emptyPAN) getString(R.string.emptyPAN)
) )
} else if (isValidPan(binding.edtPANNumber.text.toString())) { // EditText
} else if (!isValidPan(binding.edtPANNumber.text.toString())) { // EditText
commonErrorMethod( commonErrorMethod(
binding.edtPANNumber, binding.edtPANNumber,
binding.tlPanNumber, binding.tlPanNumber,
@ -716,7 +1220,7 @@ class StepTwoBajajFDFragment : Fragment() {
binding.tlFirstName, binding.tlFirstName,
getString(R.string.emptyFirstName) getString(R.string.emptyFirstName)
) )
} else if (isValidName(binding.edtFirstName.text.toString())) { // EditText
} else if (!isValidName(binding.edtFirstName.text.toString())) { // EditText
commonErrorMethod( commonErrorMethod(
binding.edtFirstName, binding.edtFirstName,
binding.tlFirstName, binding.tlFirstName,
@ -728,7 +1232,7 @@ class StepTwoBajajFDFragment : Fragment() {
binding.tlMiddleName, binding.tlMiddleName,
getString(R.string.emptyMiddleName) getString(R.string.emptyMiddleName)
) )
} else if (isValidName(binding.edtMiddleName.text.toString())) { // EditText
} else if (!isValidName(binding.edtMiddleName.text.toString())) { // EditText
commonErrorMethod( commonErrorMethod(
binding.edtMiddleName, binding.edtMiddleName,
binding.tlMiddleName, binding.tlMiddleName,
@ -740,7 +1244,7 @@ class StepTwoBajajFDFragment : Fragment() {
binding.tlLastName, binding.tlLastName,
getString(R.string.emptyLastName) getString(R.string.emptyLastName)
) )
} else if (isValidName(binding.edtLastName.text.toString())) { // EditText
} else if (!isValidName(binding.edtLastName.text.toString())) { // EditText
commonErrorMethod( commonErrorMethod(
binding.edtLastName, binding.edtLastName,
binding.tlLastName, binding.tlLastName,
@ -756,9 +1260,9 @@ class StepTwoBajajFDFragment : Fragment() {
commonErrorMethod(binding.edtEmail, binding.tlEmail, getString(R.string.emptyEmail)) commonErrorMethod(binding.edtEmail, binding.tlEmail, getString(R.string.emptyEmail))
} else if (isValidEmail(binding.edtEmail.text.toString())) { // EditText } else if (isValidEmail(binding.edtEmail.text.toString())) { // EditText
commonErrorMethod(binding.edtEmail, binding.tlEmail, getString(R.string.validEmail)) commonErrorMethod(binding.edtEmail, binding.tlEmail, getString(R.string.validEmail))
} else if (binding.edtOccupation.text.toString().isEmpty()) { // EditText
commonErrorMethod(
binding.edtOccupation,
} else if (binding.spOccupation.text.toString().isEmpty()) { // EditText
commonSpinnerErrorMethod(
binding.spOccupation,
binding.tlOccupation, binding.tlOccupation,
getString(R.string.emptyOccupation) getString(R.string.emptyOccupation)
) )
@ -798,10 +1302,20 @@ class StepTwoBajajFDFragment : Fragment() {
binding.tlAddressLine2, binding.tlAddressLine2,
getString(R.string.emptyAddressLine2) getString(R.string.emptyAddressLine2)
) )
} else if (binding.edtState.text.toString().isEmpty()) { // EditText
commonErrorMethod(binding.edtState, binding.tlState, getString(R.string.emptyState))
} else if (binding.edtCity.text.toString().isEmpty()) { // EditText
commonErrorMethod(binding.edtCity, binding.tlCity, getString(R.string.emptyCity))
} else if (binding.edtAddressLine3.text.toString().isEmpty()) { // EditText
commonErrorMethod(
binding.edtAddressLine3,
binding.tlAddressLine3,
getString(R.string.emptyAddressLine3)
)
} else if (binding.spState.text.toString().isEmpty()) { // EditText
commonSpinnerErrorMethod(
binding.spState,
binding.tlState,
getString(R.string.emptyState)
)
} else if (binding.spCity.text.toString().isEmpty()) { // EditText
commonSpinnerErrorMethod(binding.spCity, binding.tlCity, getString(R.string.emptyCity))
} else if (binding.edtPinCode.text.toString().isEmpty()) { // EditText } else if (binding.edtPinCode.text.toString().isEmpty()) { // EditText
commonErrorMethod( commonErrorMethod(
binding.edtPinCode, binding.edtPinCode,
@ -845,4 +1359,6 @@ class StepTwoBajajFDFragment : Fragment() {
super.onDestroyView() super.onDestroyView()
_binding = null _binding = null
} }
}
}

+ 27
- 10
app/src/main/java/com/nivesh/production/bajajfd/util/Common.kt View File

@ -1,5 +1,6 @@
package com.nivesh.production.bajajfd.util package com.nivesh.production.bajajfd.util
import android.annotation.SuppressLint
import android.app.Activity import android.app.Activity
import android.app.AlertDialog import android.app.AlertDialog
import android.content.Context import android.content.Context
@ -13,8 +14,11 @@ import android.util.Patterns
import com.google.android.material.textfield.MaterialAutoCompleteTextView import com.google.android.material.textfield.MaterialAutoCompleteTextView
import com.google.android.material.textfield.TextInputEditText import com.google.android.material.textfield.TextInputEditText
import com.google.android.material.textfield.TextInputLayout import com.google.android.material.textfield.TextInputLayout
import com.nivesh.production.bajajfd.BajajApplication
import com.nivesh.production.bajajfd.ui.activity.BajajFdMainActivity
import com.nivesh.production.bajajfd.R
import java.text.SimpleDateFormat
import java.time.LocalDate
import java.time.format.DateTimeFormatter
import java.util.*
import java.util.regex.Matcher import java.util.regex.Matcher
import java.util.regex.Pattern import java.util.regex.Pattern
@ -91,14 +95,19 @@ class Common {
fun removeError(textInputLayout: TextInputLayout) { fun removeError(textInputLayout: TextInputLayout) {
if (textInputLayout.error != null) { if (textInputLayout.error != null) {
textInputLayout.error = null textInputLayout.error = null
if(textInputLayout.isErrorEnabled){
textInputLayout.isErrorEnabled = false;
}
} }
} }
fun showDialogValidation(activity: Activity?, message: CharSequence?) { fun showDialogValidation(activity: Activity?, message: CharSequence?) {
val builder = AlertDialog.Builder(activity) val builder = AlertDialog.Builder(activity)
builder.setMessage(message) builder.setMessage(message)
builder.setPositiveButton("OK") { dialogInterface, _ ->
dialogInterface.dismiss()
if (activity != null) {
builder.setPositiveButton(activity.getString(R.string.ok)) { dialogInterface, _ ->
dialogInterface.dismiss()
}
} }
builder.show() builder.show()
} }
@ -106,11 +115,13 @@ class Common {
fun showDialogWithTwoButtons(activity: Activity?, message: CharSequence?) { fun showDialogWithTwoButtons(activity: Activity?, message: CharSequence?) {
val builder = AlertDialog.Builder(activity) val builder = AlertDialog.Builder(activity)
builder.setMessage(message) builder.setMessage(message)
builder.setPositiveButton("OK") { dialogInterface, _ ->
dialogInterface.dismiss()
}
builder.setNegativeButton("Cancel") { dialogInterface, _ ->
dialogInterface.dismiss()
if (activity != null) {
builder.setPositiveButton(activity.getString(R.string.ok)) { dialogInterface, _ ->
dialogInterface.dismiss()
}
builder.setNegativeButton(activity.getString(R.string.cancel)) { dialogInterface, _ ->
dialogInterface.dismiss()
}
} }
builder.show() builder.show()
} }
@ -139,7 +150,7 @@ class Common {
strMessage: String strMessage: String
): Boolean { ): Boolean {
inputText.requestFocus() inputText.requestFocus()
inputError.error = strMessage
inputError.error = strMessage
return false return false
} }
@ -153,5 +164,11 @@ class Common {
return false return false
} }
fun getDate(string :String): String {
val input = SimpleDateFormat("dd-MM-yyyy", Locale.US)
val mDate : Date? = input.parse(string)
val simpleDateFormat = SimpleDateFormat("dd MMM, yyyy", Locale.US)
return simpleDateFormat.format(mDate as Date)
}
} }
} }

+ 18
- 0
app/src/main/java/com/nivesh/production/bajajfd/viewModel/BajajFDViewModel.kt View File

@ -4,7 +4,9 @@ import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.google.gson.JsonObject import com.google.gson.JsonObject
import com.nivesh.production.bajajfd.model.FDStepsCountRequest
import com.nivesh.production.bajajfd.model.GetCodeRequest import com.nivesh.production.bajajfd.model.GetCodeRequest
import com.nivesh.production.bajajfd.model.getClientDetailsRequest
import com.nivesh.production.bajajfd.repositories.MainRepository import com.nivesh.production.bajajfd.repositories.MainRepository
import com.nivesh.production.bajajfd.util.Resource import com.nivesh.production.bajajfd.util.Resource
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
@ -20,6 +22,22 @@ class BajajFDViewModel(private val mainRepository: MainRepository) : ViewModel()
getRatesMutableData.postValue(handleRatesResponse(response)) getRatesMutableData.postValue(handleRatesResponse(response))
} }
val getStepsCountMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData()
fun getStepsCount(requestBody: FDStepsCountRequest, token : String) = viewModelScope.launch {
getStepsCountMutableData.postValue(Resource.Loading())
val response = mainRepository.getStepsCountResponse(requestBody, token)
getStepsCountMutableData.postValue(handleRatesResponse(response))
}
val getClientDetailsMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData()
fun getClientDetails(getClientDetailsRequest: getClientDetailsRequest, token : String) = viewModelScope.launch {
getClientDetailsMutableData.postValue(Resource.Loading())
val response = mainRepository.getClientDetailsResponse(getClientDetailsRequest, token)
getClientDetailsMutableData.postValue(handleRatesResponse(response))
}
private fun handleRatesResponse(response: retrofit2.Response<JsonObject>): Resource<JsonObject> { private fun handleRatesResponse(response: retrofit2.Response<JsonObject>): Resource<JsonObject> {
if (response.isSuccessful) { if (response.isSuccessful) {
response.body()?.let { resultResponse -> response.body()?.let { resultResponse ->


+ 25
- 2
app/src/main/java/com/nivesh/production/bajajfd/viewModel/StepOneBajajFDViewModel.kt View File

@ -4,6 +4,7 @@ import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.google.gson.JsonObject import com.google.gson.JsonObject
import com.nivesh.production.bajajfd.model.GetCodeRequest
import com.nivesh.production.bajajfd.model.GetMaturityAmountRequest import com.nivesh.production.bajajfd.model.GetMaturityAmountRequest
import com.nivesh.production.bajajfd.model.GetRatesRequest import com.nivesh.production.bajajfd.model.GetRatesRequest
import com.nivesh.production.bajajfd.repositories.MainRepository import com.nivesh.production.bajajfd.repositories.MainRepository
@ -13,21 +14,43 @@ import kotlinx.coroutines.launch
class StepOneBajajFDViewModel(private val mainRepository: MainRepository) : ViewModel() { class StepOneBajajFDViewModel(private val mainRepository: MainRepository) : ViewModel() {
// TODO: Implement the ViewModel // TODO: Implement the ViewModel
val getRatesMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData()
val getMaturityAmountMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData()
val getCodeMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData()
fun getCode(requestBody: GetCodeRequest, token : String) = viewModelScope.launch {
getCodeMutableData.postValue(Resource.Loading())
val response = mainRepository.getCodesResponse(requestBody, token)
getCodeMutableData.postValue(handleRatesResponse(response))
}
val getRatesMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData()
fun getRates(getRatesRequest: GetRatesRequest, token: String) = viewModelScope.launch { fun getRates(getRatesRequest: GetRatesRequest, token: String) = viewModelScope.launch {
getRatesMutableData.postValue(Resource.Loading()) getRatesMutableData.postValue(Resource.Loading())
val response = mainRepository.getRatesResponse(getRatesRequest, token) val response = mainRepository.getRatesResponse(getRatesRequest, token)
getRatesMutableData.postValue(handleRatesResponse(response)) getRatesMutableData.postValue(handleRatesResponse(response))
} }
val getMaturityAmountMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData()
fun getMaturityAmount(requestBody: GetMaturityAmountRequest) = viewModelScope.launch { fun getMaturityAmount(requestBody: GetMaturityAmountRequest) = viewModelScope.launch {
getMaturityAmountMutableData.postValue(Resource.Loading()) getMaturityAmountMutableData.postValue(Resource.Loading())
val response = mainRepository.createCalculateFDMaturityAmount(requestBody, token) val response = mainRepository.createCalculateFDMaturityAmount(requestBody, token)
getMaturityAmountMutableData.postValue(handleRatesResponse(response)) getMaturityAmountMutableData.postValue(handleRatesResponse(response))
} }
val getMinAmountMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData()
fun getMinAmount(requestBody: GetCodeRequest, token : String) = viewModelScope.launch {
getMinAmountMutableData.postValue(Resource.Loading())
val response = mainRepository.getCodesResponse(requestBody, token)
getMinAmountMutableData.postValue(handleRatesResponse(response))
}
val getMaxAmountMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData()
fun getMaxAmount(requestBody: GetCodeRequest, token : String) = viewModelScope.launch {
getMaxAmountMutableData.postValue(Resource.Loading())
val response = mainRepository.getCodesResponse(requestBody, token)
getMaxAmountMutableData.postValue(handleRatesResponse(response))
}
private fun handleRatesResponse(response: retrofit2.Response<JsonObject>): Resource<JsonObject> { private fun handleRatesResponse(response: retrofit2.Response<JsonObject>): Resource<JsonObject> {
if (response.isSuccessful) { if (response.isSuccessful) {
response.body()?.let { resultResponse -> response.body()?.let { resultResponse ->


+ 59
- 0
app/src/main/java/com/nivesh/production/bajajfd/viewModel/StepTwoBajajFDViewModel.kt View File

@ -4,6 +4,8 @@ import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.google.gson.JsonObject import com.google.gson.JsonObject
import com.nivesh.production.bajajfd.model.CityRequest
import com.nivesh.production.bajajfd.model.GetCodeRequest
import com.nivesh.production.bajajfd.model.GetRatesRequest import com.nivesh.production.bajajfd.model.GetRatesRequest
import com.nivesh.production.bajajfd.model.PanCheckRequest import com.nivesh.production.bajajfd.model.PanCheckRequest
import com.nivesh.production.bajajfd.repositories.MainRepository import com.nivesh.production.bajajfd.repositories.MainRepository
@ -45,4 +47,61 @@ class StepTwoBajajFDViewModel(private val mainRepository: MainRepository) : View
getPanCheckMutableData.postValue(handleRatesResponse(response)) getPanCheckMutableData.postValue(handleRatesResponse(response))
} }
val getTitleMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData()
fun titleApi(getCodeRequest: GetCodeRequest, token: String) = viewModelScope.launch {
getTitleMutableData.postValue(Resource.Loading())
val response = mainRepository.titleCheck(getCodeRequest, token)
getTitleMutableData.postValue(handleRatesResponse(response))
}
val getGenderMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData()
fun genderApi(getCodeRequest: GetCodeRequest, token: String) = viewModelScope.launch {
getGenderMutableData.postValue(Resource.Loading())
val response = mainRepository.genderCheck(getCodeRequest, token)
getGenderMutableData.postValue(handleRatesResponse(response))
}
val getAnnualIncomeMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData()
fun annualIncomeApi(getCodeRequest: GetCodeRequest, token: String) = viewModelScope.launch {
getAnnualIncomeMutableData.postValue(Resource.Loading())
val response = mainRepository.annualIncomeCheck(getCodeRequest, token)
getAnnualIncomeMutableData.postValue(handleRatesResponse(response))
}
val getRelationShipMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData()
fun relationShipApi(getCodeRequest: GetCodeRequest, token: String) = viewModelScope.launch {
getRelationShipMutableData.postValue(Resource.Loading())
val response = mainRepository.relationShipCheck(getCodeRequest, token)
getRelationShipMutableData.postValue(handleRatesResponse(response))
}
val getMaritalStatusMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData()
fun maritalStatusApi(getCodeRequest: GetCodeRequest, token: String) = viewModelScope.launch {
getMaritalStatusMutableData.postValue(Resource.Loading())
val response = mainRepository.maritalStatusCheck(getCodeRequest, token)
getMaritalStatusMutableData.postValue(handleRatesResponse(response))
}
val getOccupationMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData()
fun occupationApi(getCodeRequest: GetCodeRequest, token: String) = viewModelScope.launch {
getOccupationMutableData.postValue(Resource.Loading())
val response = mainRepository.occupationCheck(getCodeRequest, token)
getOccupationMutableData.postValue(handleRatesResponse(response))
}
val getStateMasterMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData()
fun stateApi(token: String) = viewModelScope.launch {
getStateMasterMutableData.postValue(Resource.Loading())
val response = mainRepository.stateCheck( token)
getStateMasterMutableData.postValue(handleRatesResponse(response))
}
val getCityListMutableData: MutableLiveData<Resource<JsonObject>> = MutableLiveData()
fun cityListApi(cityRequest: CityRequest, token: String) = viewModelScope.launch {
getCityListMutableData.postValue(Resource.Loading())
val response = mainRepository.cityCheck(cityRequest, token)
getCityListMutableData.postValue(handleRatesResponse(response))
}
} }

+ 12
- 16
app/src/main/res/layout/fragment_bajajfd_step_five.xml View File

@ -12,7 +12,8 @@
android:id="@+id/linearLayoutTwo" android:id="@+id/linearLayoutTwo"
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_70"
android:layout_marginBottom="@dimen/margin_80"
android:padding="@dimen/margin_5"
android:background="@color/NiveshColorAppBg" android:background="@color/NiveshColorAppBg"
android:fillViewport="true" android:fillViewport="true"
android:orientation="vertical" android:orientation="vertical"
@ -26,7 +27,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
android:padding="@dimen/margin_10"
app:cardElevation="@dimen/margin_1" app:cardElevation="@dimen/margin_1"
app:cardUseCompatPadding="true" app:cardUseCompatPadding="true"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -35,24 +35,22 @@
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/margin_10">
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/topLayout" android:id="@+id/topLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/margin_70"
android:layout_marginStart="@dimen/margin_5"
android:layout_marginBottom="@dimen/margin_12"
android:layout_height="wrap_content"
android:background="@color/white" android:background="@color/white"
android:padding="@dimen/margin_5"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<ImageView <ImageView
android:id="@+id/logo" android:id="@+id/logo"
android:layout_width="@dimen/margin_150" android:layout_width="@dimen/margin_150"
android:layout_height="18dp"
android:layout_height="@dimen/margin_18"
android:layout_marginTop="@dimen/margin_15"
android:layout_marginStart="@dimen/margin_15"
android:contentDescription="@string/contentDescription" android:contentDescription="@string/contentDescription"
android:src="@drawable/bajaj_logo" android:src="@drawable/bajaj_logo"
app:layout_constraintBottom_toTopOf="@+id/tvFdRating" app:layout_constraintBottom_toTopOf="@+id/tvFdRating"
@ -66,21 +64,19 @@
style="@style/regularStyle" style="@style/regularStyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="@dimen/margin_15"
android:paddingEnd="@dimen/margin_1"
android:text="@string/schemeRating" android:text="@string/schemeRating"
android:textColor="@color/greyColor2" android:textColor="@color/greyColor2"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/logo"
app:layout_constraintVertical_bias="0.0" />
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/logo" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
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_15"
android:layout_marginTop="@dimen/margin_120"
android:background="@color/greyColor4" android:background="@color/greyColor4"
android:paddingBottom="@dimen/margin_10" android:paddingBottom="@dimen/margin_10"
app:layout_constraintTop_toBottomOf="@+id/topLayout"> app:layout_constraintTop_toBottomOf="@+id/topLayout">


+ 31
- 33
app/src/main/res/layout/fragment_bajajfd_step_four.xml View File

@ -12,9 +12,10 @@
android:id="@+id/scrollView" android:id="@+id/scrollView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginBottom="70dp"
android:layout_marginBottom="@dimen/margin_100"
android:background="@color/NiveshColorAppBg" android:background="@color/NiveshColorAppBg"
android:fillViewport="true" android:fillViewport="true"
android:padding="@dimen/margin_5"
app:layout_constraintBottom_toTopOf="@+id/btnNext" app:layout_constraintBottom_toTopOf="@+id/btnNext"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -25,7 +26,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
android:padding="@dimen/margin_10"
app:cardElevation="1dp" app:cardElevation="1dp"
app:cardUseCompatPadding="true" app:cardUseCompatPadding="true"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -41,12 +41,11 @@
android:id="@+id/logo" android:id="@+id/logo"
android:layout_width="@dimen/margin_150" android:layout_width="@dimen/margin_150"
android:layout_height="@dimen/margin_18" android:layout_height="@dimen/margin_18"
android:layout_marginStart="@dimen/margin_15"
android:layout_marginTop="@dimen/margin_15" android:layout_marginTop="@dimen/margin_15"
android:contentDescription="@string/contentDescription" android:contentDescription="@string/contentDescription"
android:src="@drawable/bajaj_logo" android:src="@drawable/bajaj_logo"
app:layout_constraintHorizontal_bias="0.065"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
@ -54,9 +53,8 @@
style="@style/regularStyle" style="@style/regularStyle"
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_5"
android:paddingStart="@dimen/margin_15" android:paddingStart="@dimen/margin_15"
android:paddingEnd="@dimen/margin_10"
android:paddingEnd="@dimen/margin_1"
android:text="@string/schemeRating" android:text="@string/schemeRating"
android:textColor="@color/greyColor2" android:textColor="@color/greyColor2"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
@ -283,22 +281,21 @@
<CheckBox <CheckBox
android:id="@+id/checkBox" android:id="@+id/checkBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_8"
android:layout_marginTop="@dimen/margin_20"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginTop="@dimen/margin_10"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/swCitizen" /> app:layout_constraintTop_toBottomOf="@+id/swCitizen" />
<TextView <TextView
android:id="@+id/tvTermsAndCondition" android:id="@+id/tvTermsAndCondition"
android:layout_width="322dp"
android:layout_height="74dp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_15" android:layout_marginTop="@dimen/margin_15"
android:layout_marginEnd="@dimen/margin_10"
android:layout_marginEnd="@dimen/margin_15"
android:text="@string/termsCondition" android:text="@string/termsCondition"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="@dimen/text_size_10"
android:textSize="@dimen/text_size_12"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/checkBox" app:layout_constraintStart_toEndOf="@+id/checkBox"
app:layout_constraintTop_toBottomOf="@+id/swCitizen" /> app:layout_constraintTop_toBottomOf="@+id/swCitizen" />
@ -309,12 +306,24 @@
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
<TextView
android:id="@+id/tvOnceClick"
style="@style/regularStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="@dimen/margin_15"
android:paddingEnd="@dimen/margin_15"
android:text="@string/onceYouClick"
app:layout_constraintBottom_toTopOf="@+id/btnBack"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/scrollView" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/btnBack" android:id="@+id/btnBack"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginTop="@dimen/margin_15"
android:layout_marginTop="@dimen/margin_5"
android:layout_marginBottom="@dimen/margin_15" android:layout_marginBottom="@dimen/margin_15"
android:backgroundTint="@color/blue" android:backgroundTint="@color/blue"
android:text="@string/back" android:text="@string/back"
@ -322,35 +331,24 @@
android:textSize="@dimen/text_size_14" android:textSize="@dimen/text_size_14"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/btnNext" app:layout_constraintEnd_toStartOf="@+id/btnNext"
app:layout_constraintStart_toStartOf="parent"/>
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvOnceClick" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/btnNext" android:id="@+id/btnNext"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginBottom="@dimen/margin_15"
android:layout_marginTop="@dimen/margin_10" android:layout_marginTop="@dimen/margin_10"
android:layout_marginBottom="@dimen/margin_15"
android:backgroundTint="@color/colorPrimary" android:backgroundTint="@color/colorPrimary"
android:text="@string/viewOrder" android:text="@string/viewOrder"
android:textSize="@dimen/text_size_14"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="@dimen/text_size_14"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/btnBack" />
app:layout_constraintStart_toEndOf="@+id/btnBack"
app:layout_constraintTop_toBottomOf="@+id/tvOnceClick" />
<TextView
android:id="@+id/tvOnceClick"
style="@style/regularStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/onceYouClick"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@+id/btnBack"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintVertical_bias="0.0" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

+ 232
- 312
app/src/main/res/layout/fragment_bajajfd_step_one.xml View File

@ -5,365 +5,288 @@
android:id="@+id/constraintLayout" android:id="@+id/constraintLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/greyColor4"
android:layout_gravity="center_vertical"
android:background="@color/NiveshColorAppBg"
tool:context=".ui.fragment.StepTwoBajajFDFragment"> tool:context=".ui.fragment.StepTwoBajajFDFragment">
<ScrollView
<androidx.core.widget.NestedScrollView
android:id="@+id/scrollView" android:id="@+id/scrollView"
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_70"
android:layout_marginBottom="@dimen/margin_80"
android:background="@color/NiveshColorAppBg"
android:fillViewport="true" android:fillViewport="true"
android:padding="@dimen/margin_10"
android:padding="@dimen/margin_5"
android:visibility="visible"
app:layout_constraintBottom_toTopOf="@+id/btnNext" app:layout_constraintBottom_toTopOf="@+id/btnNext"
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">
<androidx.constraintlayout.widget.ConstraintLayout
<com.google.android.material.card.MaterialCardView
android:id="@+id/cardViewOne"
style="@style/CustomCardViewStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical">
android:foreground="?android:attr/selectableItemBackground"
app:cardElevation="@dimen/margin_1"
app:cardUseCompatPadding="true">
<com.google.android.material.card.MaterialCardView
android:id="@+id/cardViewOne"
style="@style/CustomCardViewTopStyle"
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:cardPreventCornerOverlap="false"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
android:orientation="vertical"
android:paddingTop="@dimen/margin_10">
<ImageView
android:id="@+id/logo"
android:layout_width="@dimen/margin_150"
android:layout_height="@dimen/margin_18"
android:layout_marginStart="@dimen/margin_20"
android:layout_marginTop="@dimen/margin_5"
android:contentDescription="@string/contentDescription"
android:src="@drawable/bajaj_logo" />
<TextView
android:id="@+id/tvFdRating"
style="@style/regularStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_20"
android:text="@string/schemeRating"
android:textColor="@color/greyColor2" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="vertical"
android:padding="@dimen/margin_10">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayoutTwo"
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tlDepositAmount"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="@dimen/margin_10">
<ImageView
android:id="@+id/logo"
android:layout_width="@dimen/margin_150"
android:layout_height="@dimen/margin_18"
android:layout_marginStart="@dimen/margin_10"
android:layout_marginTop="@dimen/margin_5"
android:contentDescription="@string/contentDescription"
android:src="@drawable/bajaj_logo"
app:layout_constraintBottom_toBottomOf="@+id/tvFdRating"
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.02" />
android:layout_margin="@dimen/margin_5"
android:hint="@string/investmentAmount">
<TextView
android:id="@+id/tvFdRating"
style="@style/regularStyle"
android:layout_width="wrap_content"
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/edtAmount"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_10"
android:text="@string/schemeRating"
android:textColor="@color/greyColor2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/logo"
app:layout_constraintVertical_bias="0.0" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tlDepositAmount"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
android:layout_width="0dp"
android:layout_height="@dimen/margin_53"
android:layout_margin="@dimen/margin_10"
android:hint="@string/investmentAmount"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvFdRating">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/edtAmount"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableStart="@drawable/svg_rs"
android:inputType="number"
android:maxLength="12"
android:textColorHint="@color/greyColor2"
android:textSize="@dimen/text_size_14" />
</com.google.android.material.textfield.TextInputLayout>
android:drawableStart="@drawable/svg_rs"
android:inputType="number"
android:maxLength="12"
android:textColorHint="@color/greyColor2"
android:textSize="@dimen/text_size_14" />
<TextView
android:id="@+id/txtMinAmount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_15"
android:layout_marginTop="@dimen/margin_1"
android:text="@string/minAmount"
android:textSize="@dimen/text_size_12"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tlDepositAmount" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tlInterestPayout"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:layout_width="match_parent"
android:layout_height="@dimen/margin_48"
android:layout_margin="@dimen/margin_10"
app:hintEnabled="false"
app:layout_constraintTop_toBottomOf="@+id/txtMinAmount">
<com.google.android.material.textfield.MaterialAutoCompleteTextView
android:id="@+id/spInterestPayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/rounded_corner_with_line"
android:hint="@string/selectInterestPayout"
android:inputType="none"
android:labelFor="@+id/spInterestPayout"
android:textColorHint="@color/greyColor2"
android:textSize="@dimen/text_size_14"
tool:ignore="DuplicateSpeakableTextCheck,LabelFor,TextContrastCheck" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tlInterestTenure"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:layout_width="match_parent"
android:layout_height="@dimen/margin_48"
android:layout_margin="@dimen/margin_10"
app:hintEnabled="false"
app:layout_constraintTop_toBottomOf="@+id/tlInterestPayout">
<com.google.android.material.textfield.MaterialAutoCompleteTextView
android:id="@+id/spTenure"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/rounded_corner_with_line"
android:hint="@string/selectInterestTenure"
android:inputType="none"
android:labelFor="@+id/spInterestTenure"
android:textColorHint="@color/greyColor2"
android:textSize="@dimen/text_size_14"
tool:ignore="DuplicateSpeakableTextCheck,LabelFor,TextContrastCheck" />
</com.google.android.material.textfield.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
<TextView
android:id="@+id/minMax"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_12"
android:layout_marginTop="@dimen/margin_2"
android:text="@string/minMaxValidation"
android:textColor="@color/greyColor2"
android:textSize="@dimen/text_size_12"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tlInterestTenure" />
<TextView
android:id="@+id/txtMinAmount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_10"
android:textSize="@dimen/text_size_12" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tlInterestPayout"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_5"
app:hintEnabled="false">
<!-- OR Layout -->
<TextView
android:id="@+id/ORLayout"
android:layout_width="wrap_content"
<com.google.android.material.textfield.MaterialAutoCompleteTextView
android:id="@+id/spInterestPayout"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_10"
android:text="@string/OR"
android:textColor="@color/black"
android:background="@drawable/rounded_corner_with_line"
android:hint="@string/selectInterestPayout"
android:inputType="none"
android:padding="@dimen/margin_10"
android:labelFor="@+id/spInterestPayout"
android:textColorHint="@color/greyColor2"
android:textSize="@dimen/text_size_14" android:textSize="@dimen/text_size_14"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/minMax" />
tool:ignore="DuplicateSpeakableTextCheck,LabelFor,TextContrastCheck" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tlInterestTenure"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_5"
app:hintEnabled="false"
app:layout_constraintTop_toBottomOf="@+id/tlInterestPayout">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvTenure"
<com.google.android.material.textfield.MaterialAutoCompleteTextView
android:id="@+id/spTenure"
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_10"
android:layout_marginEnd="@dimen/margin_10"
android:nestedScrollingEnabled="false"
app:layout_constraintTop_toBottomOf="@+id/ORLayout" />
<TextView
android:id="@+id/tvSwitchLabel"
style="@style/regularStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_10"
android:layout_marginTop="@dimen/margin_15"
android:text="@string/upto0.25"
android:textColor="@color/black"
app:layout_constraintBottom_toBottomOf="@+id/swSeniorCitizen"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/rvTenure"
app:layout_constraintVertical_bias="0.018" />
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/swSeniorCitizen"
style="@style/regularStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_5"
android:layout_marginEnd="@dimen/margin_10"
android:text="@string/upto0.25next"
android:textColor="@color/black"
android:textSize="@dimen/text_size_12"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toEndOf="@+id/tvSwitchLabel"
app:layout_constraintTop_toBottomOf="@+id/rvTenure"
app:layout_constraintVertical_bias="0.018" />
</androidx.constraintlayout.widget.ConstraintLayout>
android:padding="@dimen/margin_10"
android:background="@drawable/rounded_corner_with_line"
android:hint="@string/selectInterestTenure"
android:inputType="none"
android:labelFor="@+id/spInterestTenure"
android:textColorHint="@color/greyColor2"
android:textSize="@dimen/text_size_14"
tool:ignore="DuplicateSpeakableTextCheck,LabelFor,TextContrastCheck" />
</com.google.android.material.textfield.TextInputLayout>
<TextView <TextView
android:id="@+id/tvMaturityInstruction"
android:id="@+id/minMax"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_10"
android:layout_marginTop="@dimen/margin_1"
android:text="@string/minMaxValidation"
android:textColor="@color/greyColor2"
android:textSize="@dimen/text_size_12"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tlInterestTenure" />
<!-- OR Layout -->
<TextView
android:id="@+id/ORLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/margin_10"
android:text="@string/OR"
android:textColor="@color/black"
android:textSize="@dimen/text_size_14"
android:visibility="gone" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvTenure"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_10"
android:layout_marginTop="@dimen/margin_15"
android:layout_marginEnd="@dimen/margin_10"
android:nestedScrollingEnabled="false"
android:orientation="horizontal" />
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/swSeniorCitizen"
style="@style/regularStyle" style="@style/regularStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/greyColor3"
android:paddingStart="@dimen/margin_20"
android:paddingTop="@dimen/margin_3"
android:paddingEnd="@dimen/margin_1"
android:paddingBottom="@dimen/margin_3"
android:text="@string/maturityInstructions"
android:layout_marginStart="@dimen/margin_10"
android:layout_marginEnd="@dimen/margin_10"
android:text="@string/upto0.25next"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="@dimen/text_size_12" /> android:textSize="@dimen/text_size_12" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayoutThree"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingStart="@dimen/margin_15"
android:paddingEnd="@dimen/margin_20">
<RadioGroup
android:id="@+id/radioGroup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent">
<RadioButton
android:id="@+id/rbAutoCredit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:buttonTint="@color/black"
android:checked="true"
android:text="@string/additionalDetailOne"
android:textSize="@dimen/text_size_12" />
<RadioButton
android:id="@+id/rbAutoRenew"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:buttonTint="@color/black"
android:text="@string/additionalDetailTwo"
android:textSize="@dimen/text_size_12" />
<RadioButton
android:id="@+id/rbAutoBoth"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:buttonTint="@color/black"
android:text="@string/additionalDetailThree"
android:textSize="@dimen/text_size_12" />
</RadioGroup>
</LinearLayout>
<TextView
android:id="@+id/tvTaxDeducted"
style="@style/semiBoldStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_10"
android:text="@string/taxDeductedAtSourceTds"
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/radioGroup"
app:layout_constraintVertical_bias="0.0" />
<TextView
android:id="@+id/tvUploadFormLabel"
style="@style/regularStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/margin_10"
android:padding="@dimen/margin_5"
android:text="@string/TDSForm"
android:textColor="@color/black"
android:textSize="@dimen/text_size_12"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvTaxDeducted"
app:layout_constraintVertical_bias="0.0" />
<RadioButton
android:id="@+id/rbDeductTax"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:buttonTint="@color/black"
android:checked="true"
android:orientation="horizontal"
android:text="@string/deductTds"
android:textSize="@dimen/text_size_12"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvUploadFormLabel" />
<TextView
android:id="@+id/tvMaturityInstruction"
style="@style/regularStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/greyColor3"
android:paddingStart="@dimen/margin_15"
android:paddingTop="@dimen/margin_3"
android:paddingEnd="@dimen/margin_1"
android:paddingBottom="@dimen/margin_3"
android:text="@string/maturityInstructions"
android:textColor="@color/black"
android:textSize="@dimen/text_size_12" />
<RadioGroup
android:id="@+id/radioGroup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="@dimen/margin_15"
android:paddingEnd="@dimen/margin_10">
<TextView
android:id="@+id/tvSubmitLabel"
style="@style/regularStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/margin_5"
android:text="@string/nonDeductTDS"
android:textColor="@color/black"
android:textSize="@dimen/text_size_12"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/rbDeductTax"
app:layout_constraintVertical_bias="0.0" />
<RadioButton
android:id="@+id/rbAutoCredit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:buttonTint="@color/black"
android:checked="true"
android:text="@string/additionalDetailOne"
android:textSize="@dimen/text_size_12" />
</androidx.constraintlayout.widget.ConstraintLayout>
<RadioButton
android:id="@+id/rbAutoRenew"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:buttonTint="@color/black"
android:text="@string/additionalDetailTwo"
android:textSize="@dimen/text_size_12" />
</LinearLayout>
<RadioButton
android:id="@+id/rbAutoBoth"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:buttonTint="@color/black"
android:text="@string/additionalDetailThree"
android:textSize="@dimen/text_size_12" />
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
android:id="@+id/cardViewTwo"
style="@style/CustomCardViewBottomStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bajaj_logo"
android:foreground="?android:attr/selectableItemBackground"
android:padding="@dimen/margin_10"
app:cardBackgroundColor="@color/greyColor4"
app:cardPreventCornerOverlap="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cardViewOne"
app:layout_constraintVertical_bias="0.0">
</RadioGroup>
<TextView
android:id="@+id/tvTaxDeducted"
style="@style/semiBoldStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_20"
android:layout_marginTop="@dimen/margin_10"
android:layout_marginEnd="@dimen/margin_15"
android:text="@string/taxDeductedAtSourceTds"
android:textColor="@color/black" />
<TextView
android:id="@+id/tvUploadFormLabel"
style="@style/regularStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_15"
android:layout_marginEnd="@dimen/margin_15"
android:drawablePadding="@dimen/margin_10"
android:padding="@dimen/margin_5"
android:text="@string/TDSForm"
android:textColor="@color/black"
android:textSize="@dimen/text_size_12" />
<RadioButton
android:id="@+id/rbDeductTax"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_15"
android:layout_marginEnd="@dimen/margin_15"
android:buttonTint="@color/black"
android:checked="true"
android:orientation="horizontal"
android:text="@string/deductTds"
android:textSize="@dimen/text_size_12" />
<TextView
android:id="@+id/tvSubmitLabel"
style="@style/regularStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_15"
android:layout_marginEnd="@dimen/margin_15"
android:padding="@dimen/margin_5"
android:text="@string/nonDeductTDS"
android:textColor="@color/black"
android:textSize="@dimen/text_size_12" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center"
android:layout_marginTop="@dimen/margin_25"
android:background="@color/greyColor4"
android:orientation="vertical" android:orientation="vertical"
android:padding="@dimen/margin_20">
android:padding="@dimen/margin_15">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -446,16 +369,12 @@
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
</ScrollView>
</androidx.core.widget.NestedScrollView>
<Button <Button
android:id="@+id/btnNext" android:id="@+id/btnNext"
@ -463,12 +382,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginTop="@dimen/margin_10" android:layout_marginTop="@dimen/margin_10"
android:layout_marginBottom="@dimen/margin_15"
android:backgroundTint="@color/colorPrimary" android:backgroundTint="@color/colorPrimary"
android:text="@string/next" android:text="@string/next"
android:textColor="#FFFFFF" android:textColor="#FFFFFF"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/scrollView"
tool:ignore="TextContrastCheck" /> tool:ignore="TextContrastCheck" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

+ 16
- 19
app/src/main/res/layout/fragment_bajajfd_step_three.xml View File

@ -12,7 +12,8 @@
android:id="@+id/scrollView" android:id="@+id/scrollView"
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_70"
android:layout_marginBottom="@dimen/margin_80"
android:padding="@dimen/margin_5"
android:background="@color/NiveshColorAppBg" android:background="@color/NiveshColorAppBg"
android:fillViewport="true" android:fillViewport="true"
android:visibility="visible" android:visibility="visible"
@ -26,7 +27,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
android:padding="@dimen/margin_10"
app:cardElevation="@dimen/margin_1" app:cardElevation="@dimen/margin_1"
app:cardUseCompatPadding="true" app:cardUseCompatPadding="true"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -36,28 +36,23 @@
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/childConstraint" android:id="@+id/childConstraint"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/margin_30">
android:layout_height="match_parent">
<ImageView <ImageView
android:layout_marginStart="@dimen/margin_20"
android:id="@+id/logo" android:id="@+id/logo"
android:layout_width="@dimen/margin_150" android:layout_width="@dimen/margin_150"
android:layout_height="@dimen/margin_22"
android:layout_marginTop="@dimen/margin_10"
android:layout_height="@dimen/margin_18"
android:layout_marginTop="@dimen/margin_15"
android:layout_marginStart="@dimen/margin_15"
android:contentDescription="@string/contentDescription"
android:src="@drawable/bajaj_logo" android:src="@drawable/bajaj_logo"
app:layout_constraintBottom_toTopOf="@+id/tvFDRating"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:contentDescription="@string/contentDescription"/>
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:id="@+id/tvFDRating" android:id="@+id/tvFDRating"
style="@style/regularStyle" style="@style/regularStyle"
android:paddingStart="@dimen/margin_20"
android:paddingEnd="@dimen/margin_1"
android:layout_marginStart="@dimen/margin_15"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/schemeRating" android:text="@string/schemeRating"
@ -71,13 +66,15 @@
<TextView <TextView
android:id="@+id/tvUploadKYCDocument" android:id="@+id/tvUploadKYCDocument"
style="@style/semiBoldStyle" style="@style/semiBoldStyle"
android:layout_gravity="center"
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_7"
android:paddingStart="@dimen/margin_20"
android:layout_marginTop="@dimen/margin_15"
android:paddingStart="@dimen/margin_15"
android:paddingEnd="@dimen/margin_20" android:paddingEnd="@dimen/margin_20"
android:background="@color/greyColor3" android:background="@color/greyColor3"
android:text="@string/uploadKycDocuments" android:text="@string/uploadKycDocuments"
android:textSize="@dimen/text_size_14"
android:textColor="@color/black" android:textColor="@color/black"
app:drawableEndCompat="@drawable/svg_down_arrow" app:drawableEndCompat="@drawable/svg_down_arrow"
app:layout_constraintTop_toBottomOf="@+id/tvFDRating" app:layout_constraintTop_toBottomOf="@+id/tvFDRating"
@ -91,8 +88,8 @@
android:layout_height="@dimen/margin_48" android:layout_height="@dimen/margin_48"
android:layout_marginTop="@dimen/margin_15" android:layout_marginTop="@dimen/margin_15"
android:layout_marginBottom="@dimen/margin_5" android:layout_marginBottom="@dimen/margin_5"
android:layout_marginStart="@dimen/margin_20"
android:layout_marginEnd="@dimen/margin_20"
android:layout_marginStart="@dimen/margin_15"
android:layout_marginEnd="@dimen/margin_15"
app:hintEnabled="false" app:hintEnabled="false"
app:layout_constraintTop_toBottomOf="@+id/tvUploadKYCDocument" app:layout_constraintTop_toBottomOf="@+id/tvUploadKYCDocument"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"


+ 141
- 41
app/src/main/res/layout/fragment_bajajfd_step_two.xml View File

@ -13,7 +13,8 @@
android:id="@+id/scrollView" android:id="@+id/scrollView"
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_70"
android:layout_marginBottom="@dimen/margin_80"
android:padding="@dimen/margin_5"
android:background="@color/NiveshColorAppBg" android:background="@color/NiveshColorAppBg"
android:fillViewport="true" android:fillViewport="true"
android:visibility="visible" android:visibility="visible"
@ -39,12 +40,14 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:padding="@dimen/margin_15">
android:padding="@dimen/margin_10">
<ImageView <ImageView
android:id="@+id/logo" android:id="@+id/logo"
android:layout_width="@dimen/margin_150" android:layout_width="@dimen/margin_150"
android:layout_height="@dimen/margin_18" android:layout_height="@dimen/margin_18"
android:layout_marginStart="@dimen/margin_10"
android:layout_marginTop="@dimen/margin_5"
android:contentDescription="@string/contentDescription" android:contentDescription="@string/contentDescription"
android:src="@drawable/bajaj_logo" android:src="@drawable/bajaj_logo"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
@ -59,7 +62,7 @@
style="@style/regularStyle" style="@style/regularStyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/margin_1"
android:layout_marginStart="@dimen/margin_10"
android:text="@string/schemeRating" android:text="@string/schemeRating"
android:textColor="@color/greyColor2" android:textColor="@color/greyColor2"
android:textSize="@dimen/text_size_12" /> android:textSize="@dimen/text_size_12" />
@ -69,7 +72,8 @@
style="@style/regularStyle" style="@style/regularStyle"
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_15"
android:layout_marginTop="@dimen/margin_10"
android:layout_marginStart="@dimen/margin_10"
android:layout_marginBottom="@dimen/margin_1" android:layout_marginBottom="@dimen/margin_1"
android:text="@string/mandatoryField" android:text="@string/mandatoryField"
android:textColor="@color/greyColor2" android:textColor="@color/greyColor2"
@ -87,6 +91,7 @@
android:paddingStart="@dimen/margin_18" android:paddingStart="@dimen/margin_18"
android:paddingEnd="@dimen/margin_15" android:paddingEnd="@dimen/margin_15"
android:text="@string/personalDetails" android:text="@string/personalDetails"
android:textSize="@dimen/text_size_14"
android:textColor="@color/black" android:textColor="@color/black"
app:drawableEndCompat="@drawable/svg_down_arrow" /> app:drawableEndCompat="@drawable/svg_down_arrow" />
@ -109,6 +114,8 @@
android:id="@+id/edtMobileNumber" android:id="@+id/edtMobileNumber"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/margin_15"
android:paddingBottom="@dimen/margin_15"
android:inputType="phone" android:inputType="phone"
android:maxEms="10" android:maxEms="10"
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />
@ -127,8 +134,11 @@
android:id="@+id/edtDOB" android:id="@+id/edtDOB"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/margin_15"
android:paddingBottom="@dimen/margin_15"
android:drawableEnd="@drawable/svg_cal" android:drawableEnd="@drawable/svg_cal"
android:inputType="date"
android:inputType="none"
android:focusable="false"
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
@ -145,6 +155,9 @@
android:id="@+id/edtPANNumber" android:id="@+id/edtPANNumber"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/margin_15"
android:paddingBottom="@dimen/margin_15"
android:inputType="textCapCharacters"
android:maxEms="10" android:maxEms="10"
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />
@ -200,6 +213,8 @@
android:id="@+id/edtFirstName" android:id="@+id/edtFirstName"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/margin_15"
android:paddingBottom="@dimen/margin_15"
android:inputType="text" android:inputType="text"
android:maxEms="40" android:maxEms="40"
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />
@ -219,6 +234,8 @@
android:id="@+id/edtMiddleName" android:id="@+id/edtMiddleName"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/margin_15"
android:paddingBottom="@dimen/margin_15"
android:inputType="text" android:inputType="text"
android:maxEms="40" android:maxEms="40"
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />
@ -239,24 +256,14 @@
android:id="@+id/edtLastName" android:id="@+id/edtLastName"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/margin_15"
android:paddingBottom="@dimen/margin_15"
android:inputType="text" android:inputType="text"
android:maxEms="40" android:maxEms="40"
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<!-- <Spinner-->
<!-- android:id="@+id/spGender"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_margin="@dimen/margin_5"-->
<!-- android:background="@drawable/rounded_corner_with_line"-->
<!-- android:minHeight="@dimen/margin_48"-->
<!-- android:paddingStart="@dimen/margin_10"-->
<!-- android:textSize="@dimen/text_size_14"-->
<!-- android:paddingEnd="0dp"-->
<!-- android:entries="@array/gender" />-->
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/tlGender" android:id="@+id/tlGender"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
@ -296,6 +303,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:inputType="textEmailAddress" android:inputType="textEmailAddress"
android:paddingTop="@dimen/margin_15"
android:paddingBottom="@dimen/margin_15"
android:maxEms="50" android:maxEms="50"
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />
@ -303,19 +312,43 @@
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/tlOccupation" android:id="@+id/tlOccupation"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_5"
android:hint="@string/enterOccupation">
app:hintEnabled="false"
android:layout_margin="@dimen/margin_5">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/edtOccupation"
<com.google.android.material.textfield.MaterialAutoCompleteTextView
android:id="@+id/spOccupation"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:inputType="text"
android:maxEms="60"
android:textSize="@dimen/text_size_14" />
android:background="@drawable/rounded_corner_with_line"
android:hint="@string/enterOccupation"
android:inputType="none"
android:labelFor="@+id/spInterestPayout"
android:textColorHint="#757575"
android:textSize="@dimen/text_size_14" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tlIncome"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:hintEnabled="false"
android:layout_margin="@dimen/margin_5">
<com.google.android.material.textfield.MaterialAutoCompleteTextView
android:id="@+id/spIncome"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/rounded_corner_with_line"
android:hint="@string/selectIncome"
android:inputType="none"
android:labelFor="@+id/spInterestPayout"
android:textColorHint="#757575"
android:textSize="@dimen/text_size_14" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
@ -331,6 +364,8 @@
android:id="@+id/edtQualification" android:id="@+id/edtQualification"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/margin_15"
android:paddingBottom="@dimen/margin_15"
android:inputType="text" android:inputType="text"
android:maxEms="60" android:maxEms="60"
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />
@ -404,6 +439,8 @@
android:id="@+id/edtRelationName" android:id="@+id/edtRelationName"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/margin_15"
android:paddingBottom="@dimen/margin_15"
android:inputType="text" android:inputType="text"
android:maxEms="100" android:maxEms="100"
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />
@ -422,6 +459,8 @@
android:id="@+id/edtAddressLine1" android:id="@+id/edtAddressLine1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/margin_15"
android:paddingBottom="@dimen/margin_15"
android:inputType="text" android:inputType="text"
android:maxEms="100" android:maxEms="100"
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />
@ -440,6 +479,8 @@
android:id="@+id/edtAddressLine2" android:id="@+id/edtAddressLine2"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/margin_15"
android:paddingBottom="@dimen/margin_15"
android:inputType="text" android:inputType="text"
android:maxEms="100" android:maxEms="100"
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />
@ -447,37 +488,64 @@
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/tlState"
android:id="@+id/tlAddressLine3"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_5" android:layout_margin="@dimen/margin_5"
android:hint="@string/state">
android:hint="@string/enterAddress2">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/edtState"
android:id="@+id/edtAddressLine3"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/margin_15"
android:paddingBottom="@dimen/margin_15"
android:inputType="text" android:inputType="text"
android:maxEms="100" android:maxEms="100"
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/tlCity"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
android:id="@+id/tlState"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_5" android:layout_margin="@dimen/margin_5"
android:hint="@string/city">
app:hintEnabled="false">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/edtCity"
<com.google.android.material.textfield.MaterialAutoCompleteTextView
android:id="@+id/spState"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:inputType="text"
android:maxEms="100"
android:background="@drawable/rounded_corner_with_line"
android:hint="@string/selectState"
android:inputType="none"
android:labelFor="@+id/tlState"
android:textColorHint="#757575"
android:textSize="@dimen/text_size_14"/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tlCity"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:hintEnabled="false"
android:layout_margin="@dimen/margin_5">
<com.google.android.material.textfield.MaterialAutoCompleteTextView
android:id="@+id/spCity"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/rounded_corner_with_line"
android:hint="@string/selectCity"
android:inputType="none"
android:labelFor="@+id/tlCity"
android:textColorHint="#757575"
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
@ -495,7 +563,9 @@
android:id="@+id/edtPinCode" android:id="@+id/edtPinCode"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:inputType="text"
android:paddingTop="@dimen/margin_15"
android:paddingBottom="@dimen/margin_15"
android:inputType="number"
android:textSize="@dimen/text_size_14" android:textSize="@dimen/text_size_14"
android:maxEms="6" /> android:maxEms="6" />
@ -508,9 +578,10 @@
style="@style/semiBoldStyle" style="@style/semiBoldStyle"
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_5"
android:background="@color/greyColor3" android:background="@color/greyColor3"
android:paddingStart="@dimen/margin_18" android:paddingStart="@dimen/margin_18"
android:paddingEnd="@dimen/margin_10"
android:paddingEnd="@dimen/margin_15"
android:text="@string/nomineeDetailsOptional" android:text="@string/nomineeDetailsOptional"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="@dimen/text_size_14" android:textSize="@dimen/text_size_14"
@ -564,6 +635,8 @@
android:id="@+id/edtNomineeFirstName" android:id="@+id/edtNomineeFirstName"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/margin_15"
android:paddingBottom="@dimen/margin_15"
android:inputType="text" android:inputType="text"
android:maxEms="100" android:maxEms="100"
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />
@ -582,6 +655,8 @@
android:id="@+id/edtNomineeMiddleName" android:id="@+id/edtNomineeMiddleName"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/margin_15"
android:paddingBottom="@dimen/margin_15"
android:inputType="text" android:inputType="text"
android:maxEms="100" android:maxEms="100"
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />
@ -600,6 +675,8 @@
android:id="@+id/edtNomineeLastName" android:id="@+id/edtNomineeLastName"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/margin_15"
android:paddingBottom="@dimen/margin_15"
android:inputType="text" android:inputType="text"
android:maxEms="100" android:maxEms="100"
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />
@ -619,7 +696,10 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:drawableEnd="@drawable/svg_cal" android:drawableEnd="@drawable/svg_cal"
android:inputType="date"
android:paddingTop="@dimen/margin_15"
android:paddingBottom="@dimen/margin_15"
android:inputType="none"
android:focusable="false"
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
@ -671,6 +751,8 @@
android:id="@+id/edtGuardianName" android:id="@+id/edtGuardianName"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/margin_15"
android:paddingBottom="@dimen/margin_15"
android:inputType="text" android:inputType="text"
android:maxEms="60" android:maxEms="60"
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />
@ -689,6 +771,8 @@
android:id="@+id/edtGuardianAge" android:id="@+id/edtGuardianAge"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/margin_15"
android:paddingBottom="@dimen/margin_15"
android:inputType="text" android:inputType="text"
android:maxEms="60" android:maxEms="60"
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />
@ -734,6 +818,8 @@
android:id="@+id/edtGuardianAddress" android:id="@+id/edtGuardianAddress"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/margin_15"
android:paddingBottom="@dimen/margin_15"
android:inputType="text" android:inputType="text"
android:maxEms="60" android:maxEms="60"
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />
@ -752,7 +838,9 @@
android:id="@+id/edtGuardianPinCode" android:id="@+id/edtGuardianPinCode"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:inputType="text"
android:paddingTop="@dimen/margin_15"
android:paddingBottom="@dimen/margin_15"
android:inputType="number"
android:maxEms="60" android:maxEms="60"
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />
@ -765,8 +853,10 @@
style="@style/semiBoldStyle" style="@style/semiBoldStyle"
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_5"
android:background="@color/greyColor3" android:background="@color/greyColor3"
android:padding="@dimen/margin_3"
android:paddingStart="@dimen/margin_18"
android:paddingEnd="@dimen/margin_15"
android:text="@string/bankDetails" android:text="@string/bankDetails"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="@dimen/text_size_14" android:textSize="@dimen/text_size_14"
@ -878,6 +968,8 @@
android:id="@+id/edtIFSC" android:id="@+id/edtIFSC"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/margin_15"
android:paddingBottom="@dimen/margin_15"
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
@ -894,6 +986,8 @@
android:id="@+id/edtAccountNumber" android:id="@+id/edtAccountNumber"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/margin_15"
android:paddingBottom="@dimen/margin_15"
android:textSize="@dimen/text_size_14"/> android:textSize="@dimen/text_size_14"/>
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
@ -910,6 +1004,8 @@
android:id="@+id/edtBankName" android:id="@+id/edtBankName"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/margin_15"
android:paddingBottom="@dimen/margin_15"
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
@ -926,6 +1022,8 @@
android:id="@+id/edtBankBranch" android:id="@+id/edtBankBranch"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/margin_15"
android:paddingBottom="@dimen/margin_15"
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
@ -937,6 +1035,9 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingStart="@dimen/margin_18"
android:paddingEnd="@dimen/margin_15"
android:layout_marginTop="@dimen/margin_5"
android:background="@color/greyColor3"> android:background="@color/greyColor3">
<TextView <TextView
@ -945,7 +1046,6 @@
android:layout_weight="0.4" android:layout_weight="0.4"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="@dimen/margin_3"
android:text="@string/paymentMode" android:text="@string/paymentMode"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />


+ 6
- 4
app/src/main/res/layout/row_dropdown.xml View File

@ -2,20 +2,22 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingEnd="@dimen/margin_1" android:paddingEnd="@dimen/margin_1"
android:paddingStart="0dp">
android:paddingStart="0dp"
android:orientation="vertical">
<LinearLayout <LinearLayout
android:id="@+id/rlParent" android:id="@+id/rlParent"
android:layout_gravity="start"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
android:id="@+id/txtYear" android:id="@+id/txtYear"
android:layout_width="@dimen/margin_49"
android:layout_height="@dimen/margin_30"
android:padding="@dimen/margin_10"
android:layout_width="@dimen/margin_55"
android:layout_height="@dimen/margin_35"
android:gravity="center" android:gravity="center"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="@dimen/text_size_12" /> android:textSize="@dimen/text_size_12" />


+ 4
- 1
app/src/main/res/layout/spinner_dropdown.xml View File

@ -2,7 +2,10 @@
<TextView xmlns:android="http://schemas.android.com/apk/res/android" <TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="@dimen/margin_8"
android:paddingStart="@dimen/margin_15"
android:paddingEnd="@dimen/margin_8"
android:paddingTop="@dimen/margin_8"
android:paddingBottom="@dimen/margin_8"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="@dimen/text_size_14" android:textSize="@dimen/text_size_14"
android:id="@+id/tvText" android:id="@+id/tvText"


+ 24
- 5
app/src/main/res/values-hi-rIN/strings.xml View File

@ -18,7 +18,7 @@
<string name="selectInterestPayout">Select Interest Payout</string> <string name="selectInterestPayout">Select Interest Payout</string>
<string name="selectInterestTenure">Select Investment Tenure</string> <string name="selectInterestTenure">Select Investment Tenure</string>
<string name="upto0.25">Up to 0.25% p.a for </string> <string name="upto0.25">Up to 0.25% p.a for </string>
<string name="upto0.25next">Senior Citizens, 60+</string>
<string name="upto0.25next">Up to 0.25% p.a for Senior Citizens, 60+</string>
<string name="maturityInstructions">Maturity Instructions:</string> <string name="maturityInstructions">Maturity Instructions:</string>
<string name="additionalDetailOne">Automatically credit to my bank account</string> <string name="additionalDetailOne">Automatically credit to my bank account</string>
<string name="additionalDetailTwo">Automatically renew principal amount</string> <string name="additionalDetailTwo">Automatically renew principal amount</string>
@ -32,7 +32,7 @@
<string name="cumulativeText">Cumulative</string> <string name="cumulativeText">Cumulative</string>
<string name="regularInterestPayment">Regular Interest Payment:</string> <string name="regularInterestPayment">Regular Interest Payment:</string>
<string name="maturityAmount">Maturity Amount:</string> <string name="maturityAmount">Maturity Amount:</string>
<string name="minAmount">min amount : Rs 5,000</string>
<string name="minAmount">min amount : Rs </string>
<string name="OR">OR, enter tenure in months</string> <string name="OR">OR, enter tenure in months</string>
<string name="OneYear">1 Year</string> <string name="OneYear">1 Year</string>
<string name="TwoYears">2 Years</string> <string name="TwoYears">2 Years</string>
@ -67,13 +67,15 @@
<string name="enterLastName">Enter Last Name</string> <string name="enterLastName">Enter Last Name</string>
<string name="selectGender">Select Gender</string> <string name="selectGender">Select Gender</string>
<string name="enterEmailAddress">Enter Email Address</string> <string name="enterEmailAddress">Enter Email Address</string>
<string name="enterOccupation">Enter Occupation</string>
<string name="enterOccupation">Select Occupation</string>
<string name="enterQualification">Enter Qualification</string> <string name="enterQualification">Enter Qualification</string>
<string name="selectMaritalStatus">Select Marital Status</string> <string name="selectMaritalStatus">Select Marital Status</string>
<string name="selectRelation">Select Relationship</string> <string name="selectRelation">Select Relationship</string>
<string name="relationName">Relation Name</string> <string name="relationName">Relation Name</string>
<string name="enterAddress1">Enter Address 1</string>
<string name="enterAddress2">Enter Address 2</string>
<string name="enterAddress1">Enter Address Line 1</string>
<string name="enterAddress2">Enter Address Line 2</string>
<string name="enterAddress3">Enter Address Line 3</string>
<string name="state">State</string> <string name="state">State</string>
<string name="city">City</string> <string name="city">City</string>
<string name="pinCode">PinCode</string> <string name="pinCode">PinCode</string>
@ -140,6 +142,7 @@
<string name="validEmail">Please enter valid email address</string> <string name="validEmail">Please enter valid email address</string>
<string name="emptyAddressLine1">Please enter address 1</string> <string name="emptyAddressLine1">Please enter address 1</string>
<string name="emptyAddressLine2">Please enter address 2</string> <string name="emptyAddressLine2">Please enter address 2</string>
<string name="emptyAddressLine3">Please enter address 3</string>
<string name="emptyArea">Please enter area</string> <string name="emptyArea">Please enter area</string>
<string name="emptyCity">Please select city</string> <string name="emptyCity">Please select city</string>
@ -179,6 +182,7 @@
<string name="politicallyExposedPerson">Are you a politically exposed person</string> <string name="politicallyExposedPerson">Are you a politically exposed person</string>
<string name="outsideOfIndia">I am not a citizen, national or tax resident of any country outside of India</string> <string name="outsideOfIndia">I am not a citizen, national or tax resident of any country outside of India</string>
<string name="termsCondition">I undertake to inform company any change in status of my nationality or tax residence. I am making investment from my Indian resident Individual Savings bank account. I/ We confirm that 1/we have read and understood the detailed terms and conditions annexed to this Application including the interest rate and other charges. I have gone through the financials and other statements/particulars representations furnished/made by the company and after careful consideration I am making the deposit with the company at my own risk and volition. I have read and agree to the <font color='#5077FF'>Terms &amp; conditions</font></string> <string name="termsCondition">I undertake to inform company any change in status of my nationality or tax residence. I am making investment from my Indian resident Individual Savings bank account. I/ We confirm that 1/we have read and understood the detailed terms and conditions annexed to this Application including the interest rate and other charges. I have gone through the financials and other statements/particulars representations furnished/made by the company and after careful consideration I am making the deposit with the company at my own risk and volition. I have read and agree to the <font color='#5077FF'>Terms &amp; conditions</font></string>
<string name="validTermsConditions">Please accept terms &amp; conditions.</string>
<!-- Step Five --> <!-- Step Five -->
@ -205,4 +209,19 @@
<string name="nonSeniorCitizen">Non Senior Citizen</string> <string name="nonSeniorCitizen">Non Senior Citizen</string>
<string name="add_new_account">Add New Account</string> <string name="add_new_account">Add New Account</string>
<string name="minAmountCategory">MINAmount</string>
<string name="MaxAmountCategory">MAXAmount</string>
<string name="ok">OK</string>
<string name="cancel">Cancel</string>
<string name="salutationCategory">Salutation</string>
<string name="genderCategory">Gender</string>
<string name="maritalCategory">MaritalStatus</string>
<string name="occupationCategory">Occupation</string>
<string name="relationshipCategory">NomineeRelationship</string>
<string name="selectIncome">Select Income</string>
<string name="selectState">Select State</string>
<string name="selectCity">Select City</string>
<string name="annualIncome">AnnualIncome</string>
</resources> </resources>

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

@ -64,8 +64,12 @@
<dimen name="margin_54">54dp</dimen> <dimen name="margin_54">54dp</dimen>
<dimen name="margin_55">55dp</dimen> <dimen name="margin_55">55dp</dimen>
<dimen name="margin_60">60dp</dimen> <dimen name="margin_60">60dp</dimen>
<dimen name="margin_70">72dp</dimen>
<dimen name="margin_70">70dp</dimen>
<dimen name="margin_80">80dp</dimen> <dimen name="margin_80">80dp</dimen>
<dimen name="margin_85">85dp</dimen>
<dimen name="margin_90">90dp</dimen>
<dimen name="margin_95">95dp</dimen>
<dimen name="margin_100">100dp</dimen>
<dimen name="margin_120">120dp</dimen> <dimen name="margin_120">120dp</dimen>
<dimen name="margin_150">150dp</dimen> <dimen name="margin_150">150dp</dimen>
<dimen name="margin_290">290dp</dimen> <dimen name="margin_290">290dp</dimen>


+ 64
- 43
app/src/main/res/values/strings.xml View File

@ -17,7 +17,7 @@
<string name="selectInterestPayout">Select Interest Payout</string> <string name="selectInterestPayout">Select Interest Payout</string>
<string name="selectInterestTenure">Select Investment Tenure</string> <string name="selectInterestTenure">Select Investment Tenure</string>
<string name="upto0.25">Up to 0.25% p.a for </string> <string name="upto0.25">Up to 0.25% p.a for </string>
<string name="upto0.25next">Senior Citizens, 60+</string>
<string name="upto0.25next">Up to 0.25% p.a for Senior Citizens, 60+</string>
<string name="maturityInstructions">Maturity Instructions:</string> <string name="maturityInstructions">Maturity Instructions:</string>
<string name="additionalDetailOne">Automatically credit to my bank account</string> <string name="additionalDetailOne">Automatically credit to my bank account</string>
<string name="additionalDetailTwo">Automatically renew principal amount</string> <string name="additionalDetailTwo">Automatically renew principal amount</string>
@ -31,7 +31,7 @@
<string name="cumulativeText">Cumulative</string> <string name="cumulativeText">Cumulative</string>
<string name="regularInterestPayment">Regular Interest Payment:</string> <string name="regularInterestPayment">Regular Interest Payment:</string>
<string name="maturityAmount">Maturity Amount:</string> <string name="maturityAmount">Maturity Amount:</string>
<string name="minAmount">min amount : Rs 5,000</string>
<string name="minAmount">min amount : Rs </string>
<string name="OR">OR, enter tenure in months</string> <string name="OR">OR, enter tenure in months</string>
<string name="OneYear">1 Year</string> <string name="OneYear">1 Year</string>
<string name="TwoYears">2 Years</string> <string name="TwoYears">2 Years</string>
@ -67,13 +67,15 @@
<string name="enterLastName">Enter Last Name</string> <string name="enterLastName">Enter Last Name</string>
<string name="selectGender">Select Gender</string> <string name="selectGender">Select Gender</string>
<string name="enterEmailAddress">Enter Email Address</string> <string name="enterEmailAddress">Enter Email Address</string>
<string name="enterOccupation">Enter Occupation</string>
<string name="enterOccupation">Select Occupation</string>
<string name="enterQualification">Enter Qualification</string> <string name="enterQualification">Enter Qualification</string>
<string name="selectMaritalStatus">Select Marital Status</string> <string name="selectMaritalStatus">Select Marital Status</string>
<string name="selectRelation">Select Relationship</string> <string name="selectRelation">Select Relationship</string>
<string name="relationName">Relation Name</string> <string name="relationName">Relation Name</string>
<string name="enterAddress1">Enter Address 1</string>
<string name="enterAddress2">Enter Address 2</string>
<string name="enterAddress1">Enter Address Line 1</string>
<string name="enterAddress2">Enter Address Line 2</string>
<string name="enterAddress3">Enter Address Line 3</string>
<string name="state">State</string> <string name="state">State</string>
<string name="city">City</string> <string name="city">City</string>
<string name="pinCode">PinCode</string> <string name="pinCode">PinCode</string>
@ -145,6 +147,7 @@
<string name="emptyAddressLine1">Please enter address 1</string> <string name="emptyAddressLine1">Please enter address 1</string>
<string name="emptyAddressLine2">Please enter address 2</string> <string name="emptyAddressLine2">Please enter address 2</string>
<string name="emptyAddressLine3">Please enter address 3</string>
<string name="emptyArea">Please enter area</string> <string name="emptyArea">Please enter area</string>
<string name="emptyCity">Please select city</string> <string name="emptyCity">Please select city</string>
@ -187,6 +190,8 @@
<string name="outsideOfIndia">I am not a citizen, national or tax resident of any country outside of India</string> <string name="outsideOfIndia">I am not a citizen, national or tax resident of any country outside of India</string>
<string name="termsCondition">I undertake to inform company any change in status of my nationality or tax residence. I am making investment from my Indian resident Individual Savings bank account. I/ We confirm that 1/we have read and understood the detailed terms and conditions annexed to this Application including the interest rate and other charges. I have gone through the financials and other statements/particulars representations furnished/made by the company and after careful consideration I am making the deposit with the company at my own risk and volition. I have read and agree to the <font color='#5077FF'>Terms &amp; conditions</font></string> <string name="termsCondition">I undertake to inform company any change in status of my nationality or tax residence. I am making investment from my Indian resident Individual Savings bank account. I/ We confirm that 1/we have read and understood the detailed terms and conditions annexed to this Application including the interest rate and other charges. I have gone through the financials and other statements/particulars representations furnished/made by the company and after careful consideration I am making the deposit with the company at my own risk and volition. I have read and agree to the <font color='#5077FF'>Terms &amp; conditions</font></string>
<string name="validTermsConditions">Please accept terms &amp; conditions.</string>
<!-- Step Five --> <!-- Step Five -->
<string name="viewOrder">View Order</string> <string name="viewOrder">View Order</string>
@ -213,21 +218,36 @@
<string name="add_new_account">Add New Account</string> <string name="add_new_account">Add New Account</string>
<string-array name="interestPayoutList">
<item>On Maturity</item>
<item>Monthly</item>
<item>Quarterly</item>
<item>Half Yearly</item>
<item>Yearly</item>
</string-array>
<string-array name="tenure">
<item>On Maturity</item>
<item>Monthly</item>
<item>Quarterly</item>
<item>Half Yearly</item>
<item>Yearly</item>
</string-array>
<string name="minAmountCategory">MINAmount</string>
<string name="MaxAmountCategory">MAXAmount</string>
<string name="ok">OK</string>
<string name="cancel">Cancel</string>
<string name="salutationCategory">Salutation</string>
<string name="genderCategory">Gender</string>
<string name="maritalCategory">MaritalStatus</string>
<string name="occupationCategory">Occupation</string>
<string name="relationshipCategory">NomineeRelationship</string>
<string name="selectIncome">Select Income</string>
<string name="selectState">Select State</string>
<string name="selectCity">Select City</string>
<string name="annualIncome">AnnualIncome</string>
<!-- <string-array name="interestPayoutList">-->
<!-- <item>On Maturity</item>-->
<!-- <item>Monthly</item>-->
<!-- <item>Quarterly</item>-->
<!-- <item>Half Yearly</item>-->
<!-- <item>Yearly</item>-->
<!-- </string-array>-->
<!-- <string-array name="tenure">-->
<!-- <item>On Maturity</item>-->
<!-- <item>Monthly</item>-->
<!-- <item>Quarterly</item>-->
<!-- <item>Half Yearly</item>-->
<!-- <item>Yearly</item>-->
<!-- </string-array>-->
<array name="addressType"> <array name="addressType">
<item>Aadhaar Card</item> <item>Aadhaar Card</item>
@ -236,29 +256,30 @@
<item>Driving Licence</item> <item>Driving Licence</item>
</array> </array>
<array name="title">
<item>Mr</item>
<item>Mrs</item>
</array>
<array name="gender">
<item>Male</item>
<item>Female</item>
</array>
<array name="maritalStatus">
<item>Marital Status</item>
<item>Married</item>
<item>Unmarried</item>
</array>
<array name="interestPayoutLists">
<item>Interest Payout</item>
<item>On Maturity</item>
<item>Monthly</item>
<item>Quarterly</item>
<item>Half Yearly</item>
<item>Yearly</item>
</array>
<!-- <array name="title">-->
<!-- <item>Mr</item>-->
<!-- <item>Mrs</item>-->
<!-- </array>-->
<!-- <array name="gender">-->
<!-- <item>Male</item>-->
<!-- <item>Female</item>-->
<!-- </array>-->
<!-- <array name="maritalStatus">-->
<!-- <item>Marital Status</item>-->
<!-- <item>Married</item>-->
<!-- <item>Unmarried</item>-->
<!-- </array>-->
<!-- <array name="interestPayoutLists">-->
<!-- <item>Interest Payout</item>-->
<!-- <item>On Maturity</item>-->
<!-- <item>Monthly</item>-->
<!-- <item>Quarterly</item>-->
<!-- <item>Half Yearly</item>-->
<!-- <item>Yearly</item>-->
<!-- </array>-->
</resources> </resources>

Loading…
Cancel
Save

Powered by TurnKey Linux.