HL part payment flicker fix (#7612)
This commit is contained in:
@@ -57,9 +57,11 @@ import com.naviapp.payment.activities.NaviPaymentActivity
|
||||
import com.naviapp.payment.fragments.PaymentType
|
||||
import com.naviapp.payment.models.Amount
|
||||
import com.naviapp.utils.Constants.LOAN_TYPE
|
||||
import com.naviapp.utils.Constants.TYPE_HOME_LOAN
|
||||
import com.naviapp.utils.Constants.TYPE_PERSONAL_LOAN
|
||||
import com.naviapp.utils.LOAN_ACCOUNT_NUMBER
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
@AndroidEntryPoint
|
||||
@@ -76,9 +78,11 @@ class LoanRepaymentOptionsFragment :
|
||||
private var footerBinding: ViewDataBinding? = null
|
||||
private var inputBinding: ViewDataBinding? = null
|
||||
private var infoWithTimerV2WidgetBinding: ViewDataBinding? = null
|
||||
private var loanTypeFromArgument = ""
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
loanTypeFromArgument = arguments?.getString(LOAN_TYPE) ?: ""
|
||||
initError(loanRepaymentTypeVM, actionErrorV2Enabled = true)
|
||||
loanRepaymentTypeVM.fetchData(arguments)
|
||||
}
|
||||
@@ -232,12 +236,26 @@ class LoanRepaymentOptionsFragment :
|
||||
|
||||
handleActionButtonVisibility()
|
||||
}
|
||||
hideLoader()
|
||||
if (loanTypeFromArgument == TYPE_HOME_LOAN) {
|
||||
visibleContainerAndHideLoader()
|
||||
}
|
||||
else {
|
||||
binding.llContainerParent.visibility = View.VISIBLE
|
||||
hideLoader()
|
||||
}
|
||||
}
|
||||
else -> Unit
|
||||
}
|
||||
}
|
||||
|
||||
private fun visibleContainerAndHideLoader() {
|
||||
lifecycleScope.launch {
|
||||
delay(100)
|
||||
binding.llContainerParent.visibility = View.VISIBLE
|
||||
hideLoader()
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateContainer(
|
||||
naviWidget: NaviWidget,
|
||||
layoutBinding: ViewDataBinding?
|
||||
|
||||
@@ -27,8 +27,10 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/headerContainer">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llContainerParent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
|
||||
Reference in New Issue
Block a user