diff --git a/app/src/main/kotlin/org/mifos/mobile/cn/ui/adapter/DepositAccountListAdapter.kt b/app/src/main/kotlin/org/mifos/mobile/cn/ui/adapter/DepositAccountListAdapter.kt index 6c0cd811..8f869a3d 100644 --- a/app/src/main/kotlin/org/mifos/mobile/cn/ui/adapter/DepositAccountListAdapter.kt +++ b/app/src/main/kotlin/org/mifos/mobile/cn/ui/adapter/DepositAccountListAdapter.kt @@ -41,9 +41,9 @@ constructor(@ApplicationContext val context: Context) : holder.tvCustomerAccountIdentifier!!.text = customerDepositAccount.accountIdentifier holder.tvDepositProduct!!.text = customerDepositAccount.productIdentifier - holder.tvAccountBalance!!.text = customerDepositAccount.balance.toString() + holder.tvAccountBalance!!.text = "$ " + customerDepositAccount.balance.toString() - StatusUtils.setDepositAccountStatus(customerDepositAccount.state!!,holder.ivStatusIndicator!!, + StatusUtils.setDepositAccountStatus(customerDepositAccount.state!!, holder.ivStatusIndicator!!, context) } @@ -55,18 +55,21 @@ constructor(@ApplicationContext val context: Context) : this.customerDepositAccounts = customerDepositAccounts notifyDataSetChanged() } + fun setOnItemClickListener(itemClickListener: OnItemClickListener) { onItemClickListener = itemClickListener } - inner class ViewHolder(view: View?) : RecyclerView.ViewHolder(view!!), View.OnClickListener{ + inner class ViewHolder(view: View?) : RecyclerView.ViewHolder(view!!), View.OnClickListener { override fun onClick(v: View?) { if (v != null) { - onItemClickListener.onItemClick(v,adapterPosition) + onItemClickListener.onItemClick(v, adapterPosition) } } - private val llDepositAccount= view?.ll_deposit_accounts + + private val llDepositAccount = view?.ll_deposit_accounts + init { llDepositAccount?.setOnClickListener(this) } diff --git a/app/src/main/kotlin/org/mifos/mobile/cn/ui/adapter/LoanAccountListAdapter.kt b/app/src/main/kotlin/org/mifos/mobile/cn/ui/adapter/LoanAccountListAdapter.kt index 8d5f0ff7..bdd3bbd6 100644 --- a/app/src/main/kotlin/org/mifos/mobile/cn/ui/adapter/LoanAccountListAdapter.kt +++ b/app/src/main/kotlin/org/mifos/mobile/cn/ui/adapter/LoanAccountListAdapter.kt @@ -22,8 +22,8 @@ import org.mifos.mobile.cn.ui.base.OnItemClickListener class LoanAccountListAdapter @Inject constructor(@ApplicationContext var context: Context) : RecyclerView.Adapter() { - private var customerLoanAccounts:List - private lateinit var onItemClickListener: OnItemClickListener + private var customerLoanAccounts: List + private lateinit var onItemClickListener: OnItemClickListener init { customerLoanAccounts = ArrayList() @@ -53,7 +53,7 @@ constructor(@ApplicationContext var context: Context) : RecyclerView.Adapter