From ac21ebecaa87c356aa9107750c10b269b05499e9 Mon Sep 17 00:00:00 2001 From: Hemant Khadase Date: Fri, 16 Dec 2022 13:17:58 +0530 Subject: [PATCH] changes in Classes and Models --- app/src/main/AndroidManifest.xml | 1 + .../api/{RetrofitInstance.kt => ApiClient.kt} | 14 +- .../bajajfd/interface/ApiInterface.kt | 30 + .../ui/activity/BajajFdMainActivity.kt | 10 +- ...Fragment.kt => StepFiveBajajFDFragment.kt} | 27 +- ...Fragment.kt => StepFourBajajFDFragment.kt} | 19 +- ...tFragment.kt => StepOneBajajFDFragment.kt} | 16 +- ...ragment.kt => StepThreeBajajFDFragment.kt} | 19 +- ...eFragment.kt => StepTwoBajajFDFragment.kt} | 26 +- .../bajajfd/viewModel/StepFiveViewModel.kt | 18 + .../bajajfd/viewModel/StepOneViewModel.kt | 21 +- .../bajajfd/viewModel/StepStartViewModel.kt | 7 - .../bajajfd/viewModel/StepTwoViewModel.kt | 7 + .../res/layout/fragment_bajajfd_step_five.xml | 200 ++++ .../res/layout/fragment_bajajfd_step_four.xml | 422 +++++--- .../res/layout/fragment_bajajfd_step_one.xml | 2 +- .../layout/fragment_bajajfd_step_three.xml | 414 +++----- .../res/layout/fragment_bajajfd_step_two.xml | 925 ++++++++++++++---- app/src/main/res/layout/fragment_step_one.xml | 830 ---------------- 19 files changed, 1518 insertions(+), 1490 deletions(-) rename app/src/main/java/com/nivesh/production/bajajfd/api/{RetrofitInstance.kt => ApiClient.kt} (71%) rename app/src/main/java/com/nivesh/production/bajajfd/ui/fragment/{StepTwoFragment.kt => StepFiveBajajFDFragment.kt} (60%) rename app/src/main/java/com/nivesh/production/bajajfd/ui/fragment/{StepFourFragment.kt => StepFourBajajFDFragment.kt} (82%) rename app/src/main/java/com/nivesh/production/bajajfd/ui/fragment/{StepStartFragment.kt => StepOneBajajFDFragment.kt} (74%) rename app/src/main/java/com/nivesh/production/bajajfd/ui/fragment/{StepThreeFragment.kt => StepThreeBajajFDFragment.kt} (82%) rename app/src/main/java/com/nivesh/production/bajajfd/ui/fragment/{StepOneFragment.kt => StepTwoBajajFDFragment.kt} (60%) create mode 100644 app/src/main/java/com/nivesh/production/bajajfd/viewModel/StepFiveViewModel.kt delete mode 100644 app/src/main/java/com/nivesh/production/bajajfd/viewModel/StepStartViewModel.kt create mode 100644 app/src/main/res/layout/fragment_bajajfd_step_five.xml delete mode 100644 app/src/main/res/layout/fragment_step_one.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 9a65401..1a75794 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,6 +2,7 @@ + () + val text: LiveData = Transformations.map(_index) { + "Step : $it" + } + + fun setIndex(index: Int) { + _index.value = index + } +} \ No newline at end of file diff --git a/app/src/main/java/com/nivesh/production/bajajfd/viewModel/StepOneViewModel.kt b/app/src/main/java/com/nivesh/production/bajajfd/viewModel/StepOneViewModel.kt index 5ea6043..63e7664 100644 --- a/app/src/main/java/com/nivesh/production/bajajfd/viewModel/StepOneViewModel.kt +++ b/app/src/main/java/com/nivesh/production/bajajfd/viewModel/StepOneViewModel.kt @@ -1,26 +1,7 @@ package com.nivesh.production.bajajfd.viewModel -import android.view.View -import android.widget.LinearLayout -import android.widget.TextView -import androidx.lifecycle.LiveData -import androidx.lifecycle.MutableLiveData -import androidx.lifecycle.Transformations import androidx.lifecycle.ViewModel class StepOneViewModel : ViewModel() { - - private val _index = MutableLiveData() - val text: LiveData = Transformations.map(_index) { - "Step : $it" - } - - fun setIndex(index: Int) { - _index.value = index - } - - fun setUpVisibility(ll: LinearLayout) { - if(ll.visibility== View.VISIBLE) ll.visibility = View.GONE - else ll.visibility = View.VISIBLE - } + // TODO: Implement the ViewModel } \ No newline at end of file diff --git a/app/src/main/java/com/nivesh/production/bajajfd/viewModel/StepStartViewModel.kt b/app/src/main/java/com/nivesh/production/bajajfd/viewModel/StepStartViewModel.kt deleted file mode 100644 index 03fd0ed..0000000 --- a/app/src/main/java/com/nivesh/production/bajajfd/viewModel/StepStartViewModel.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.nivesh.production.bajajfd.viewModel - -import androidx.lifecycle.ViewModel - -class StepStartViewModel : ViewModel() { - // TODO: Implement the ViewModel -} \ No newline at end of file diff --git a/app/src/main/java/com/nivesh/production/bajajfd/viewModel/StepTwoViewModel.kt b/app/src/main/java/com/nivesh/production/bajajfd/viewModel/StepTwoViewModel.kt index aada84f..198610e 100644 --- a/app/src/main/java/com/nivesh/production/bajajfd/viewModel/StepTwoViewModel.kt +++ b/app/src/main/java/com/nivesh/production/bajajfd/viewModel/StepTwoViewModel.kt @@ -1,5 +1,7 @@ package com.nivesh.production.bajajfd.viewModel +import android.view.View +import android.widget.LinearLayout import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import androidx.lifecycle.Transformations @@ -15,4 +17,9 @@ class StepTwoViewModel : ViewModel() { fun setIndex(index: Int) { _index.value = index } + + fun setUpVisibility(ll: LinearLayout) { + if(ll.visibility== View.VISIBLE) ll.visibility = View.GONE + else ll.visibility = View.VISIBLE + } } \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_bajajfd_step_five.xml b/app/src/main/res/layout/fragment_bajajfd_step_five.xml new file mode 100644 index 0000000..c21dee4 --- /dev/null +++ b/app/src/main/res/layout/fragment_bajajfd_step_five.xml @@ -0,0 +1,200 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_bajajfd_step_four.xml b/app/src/main/res/layout/fragment_bajajfd_step_four.xml index f982d54..1b45c80 100644 --- a/app/src/main/res/layout/fragment_bajajfd_step_four.xml +++ b/app/src/main/res/layout/fragment_bajajfd_step_four.xml @@ -5,165 +5,358 @@ android:id="@+id/constraintLayout" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_margin="@dimen/margin_10" - android:background="@color/color_EFEFEF" - tools:context="com.nivesh.production.bajajfd.ui.fragment.StepFourFragment"> + android:background="@color/Nivesh_color_AppBg" + tools:context="com.nivesh.production.bajajfd.ui.fragment.StepFourBajajFDFragment"> - + app:layout_constraintTop_toBottomOf="@id/btnNext"> + android:foreground="?android:attr/selectableItemBackground" + android:padding="@dimen/margin_10" + app:cardElevation="1dp" + app:cardUseCompatPadding="true" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> + android:layout_height="match_parent" + android:paddingBottom="@dimen/margin_10"> + + + + + app:layout_constraintTop_toBottomOf="@+id/tvFDRating" /> - - - - - + - + + + + app:layout_constraintTop_toBottomOf="@+id/lblTenure" + app:layout_constraintVertical_bias="0.0" /> + + + app:layout_constraintTop_toBottomOf="@+id/lblInterestPayout" + app:layout_constraintVertical_bias="0.0" /> + + + + + + + + + + + app:layout_constraintTop_toBottomOf="@+id/swRelativeDirector" /> + + + + + + + + - - - + - + app:layout_constraintVertical_bias="0.812" /> + app:layout_constraintStart_toEndOf="@+id/btnBack" + app:layout_constraintTop_toBottomOf="@+id/scrollView" + app:layout_constraintVertical_bias="0.812" /> - + 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" /> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_bajajfd_step_one.xml b/app/src/main/res/layout/fragment_bajajfd_step_one.xml index 720e0f9..d94df7e 100644 --- a/app/src/main/res/layout/fragment_bajajfd_step_one.xml +++ b/app/src/main/res/layout/fragment_bajajfd_step_one.xml @@ -6,7 +6,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/color_EFEFEF" - tool:context="com.nivesh.production.bajajfd.ui.fragment.StepOneFragment"> + tool:context="com.nivesh.production.bajajfd.ui.fragment.StepTwoBajajFDFragment"> + tools:context="com.nivesh.production.bajajfd.ui.fragment.StepFourBajajFDFragment"> + android:padding="@dimen/margin_10" + android:paddingBottom="@dimen/margin_30"> + app:drawableEndCompat="@drawable/svg_down_arrow" + app:layout_constraintTop_toBottomOf="@+id/tvFDRating" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toRightOf="parent" /> + android:paddingStart="20dp" + android:paddingEnd="20dp" + android:layout_marginTop="12dp" + android:text="@string/address_proof_type" + android:textColor="@color/text_default" + android:textSize="@dimen/text_size_12" + app:layout_constraintTop_toBottomOf="@+id/tvUploadKYCDocument" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toRightOf="parent" /> - + + android:text="@string/aadhaar_front" + android:textColor="@color/text_default" + android:textSize="@dimen/text_size_12" + app:layout_constraintBottom_toBottomOf="@+id/btnAadhaarFrontUpload" + app:layout_constraintStart_toStartOf="@+id/spAddressType" + app:layout_constraintTop_toTopOf="@+id/btnAadhaarFrontUpload" + app:layout_constraintVertical_bias="0.562" /> - + android:layout_centerVertical="true" + android:text="@string/aadhaar_back" + android:textColor="@color/text_default" + android:textSize="@dimen/text_size_12" + app:layout_constraintBottom_toBottomOf="@+id/btnAadhaarBackUpload" + app:layout_constraintStart_toStartOf="@+id/tvAadhaarFront" + app:layout_constraintTop_toTopOf="@+id/btnAadhaarBackUpload" /> - - - + android:layout_height="48dp" + android:layout_alignParentEnd="true" + android:layout_marginTop="6dp" + android:layout_marginBottom="8dp" + android:backgroundTint="@color/color_EFEFEF" + android:paddingLeft="@dimen/margin_30" + android:paddingRight="@dimen/margin_30" + android:text="Upload File" + android:textAllCaps="false" + android:textColor="@color/black" + app:layout_constraintBottom_toTopOf="@+id/btnPANUpload" + app:layout_constraintEnd_toEndOf="@+id/btnAadhaarFrontUpload" + app:layout_constraintHorizontal_bias="1.0" + app:layout_constraintStart_toEndOf="@+id/tvAadhaarBack" + app:layout_constraintTop_toBottomOf="@+id/btnAadhaarFrontUpload" /> - - - - - - - - + app:layout_constraintStart_toStartOf="@+id/tvAadhaarBack" + app:layout_constraintTop_toTopOf="@+id/btnPANUpload" + app:layout_constraintVertical_bias="0.468" /> - - - + android:backgroundTint="@color/color_EFEFEF" + android:paddingLeft="@dimen/margin_30" + android:paddingRight="@dimen/margin_30" + android:text="Upload File" + android:textAllCaps="false" + android:textColor="@color/black" + app:layout_constraintBottom_toTopOf="@+id/btnPhotoUpload" + app:layout_constraintEnd_toEndOf="@+id/btnAadhaarBackUpload" + app:layout_constraintHorizontal_bias="1.0" + app:layout_constraintStart_toEndOf="@+id/tvPAN" + app:layout_constraintTop_toBottomOf="@+id/btnAadhaarBackUpload" /> - - - + android:layout_centerVertical="true" + android:text="@string/photo_upload" + android:textColor="@color/text_default" + android:textSize="@dimen/text_size_12" + app:layout_constraintBottom_toBottomOf="@+id/btnPhotoUpload" + app:layout_constraintStart_toStartOf="@+id/tvPAN" + app:layout_constraintTop_toTopOf="@+id/btnPhotoUpload" /> - + app:layout_constraintEnd_toEndOf="@+id/btnPANUpload" + app:layout_constraintHorizontal_bias="1.0" + app:layout_constraintStart_toEndOf="@+id/tvPhotoUpload" + app:layout_constraintTop_toBottomOf="@+id/btnPANUpload" /> @@ -349,15 +254,15 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:layout_marginTop="10dp" - android:layout_marginBottom="10dp" + android:layout_marginTop="20dp" + android:layout_marginBottom="15dp" android:backgroundTint="@color/blue" android:text="@string/back" android:textColor="@color/white" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@+id/btnNext" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintVertical_bias="0.812" /> + app:layout_constraintTop_toBottomOf="@+id/scrollView"/> - - + app:layout_constraintTop_toBottomOf="@+id/scrollView" /> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_bajajfd_step_two.xml b/app/src/main/res/layout/fragment_bajajfd_step_two.xml index 1f60a42..0b6e85b 100644 --- a/app/src/main/res/layout/fragment_bajajfd_step_two.xml +++ b/app/src/main/res/layout/fragment_bajajfd_step_two.xml @@ -5,8 +5,9 @@ android:id="@+id/constraintLayout" android:layout_width="match_parent" android:layout_height="match_parent" + android:layout_gravity="center_vertical" android:background="@color/Nivesh_color_AppBg" - tools:context="com.nivesh.production.bajajfd.ui.fragment.StepThreeFragment"> + tools:context=".ui.fragment.StepThreeBajajFDFragment"> + app:cardUseCompatPadding="true"> - - - + android:layout_height="wrap_content" + android:orientation="vertical"> - + android:orientation="vertical" + android:padding="10dp"> + + + + + + + + + app:layout_constraintTop_toBottomOf="@+id/tvFdRating" + app:drawableEndCompat="@drawable/svg_down_arrow" /> - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + android:layout_height="wrap_content" + android:background="@color/grey_bg"> - + + + + + + - -