Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add currency symbols #126

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand All @@ -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)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import org.mifos.mobile.cn.ui.base.OnItemClickListener

class LoanAccountListAdapter @Inject
constructor(@ApplicationContext var context: Context) : RecyclerView.Adapter<LoanAccountListAdapter.ViewHolder>() {
private var customerLoanAccounts:List<LoanAccount>
private lateinit var onItemClickListener: OnItemClickListener
private var customerLoanAccounts: List<LoanAccount>
private lateinit var onItemClickListener: OnItemClickListener

init {
customerLoanAccounts = ArrayList()
Expand Down Expand Up @@ -53,7 +53,7 @@ constructor(@ApplicationContext var context: Context) : RecyclerView.Adapter<Loa
StatusUtils.setLoanAccountStatus(loanAccount.currentState!!,
holder.ivStatusIndicator!!, context)

holder.tvAccountBalance!!.text =
holder.tvAccountBalance!!.text = "$ " +
loanAccount.getLoanParameters().maximumBalance.toString()
}

Expand All @@ -71,13 +71,15 @@ constructor(@ApplicationContext var context: Context) : RecyclerView.Adapter<Loa
}


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)
}
}

val llLoanAccount = view?.ll_loan_accounts

init {
llLoanAccount?.setOnClickListener(this)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ class RecentTransactionsAdapter @Inject constructor(@ApplicationContext val cont

holder.tvTransactionDate.text = transactionDate

holder.tvAmount.text = transaction.amount.toString()
holder.tvBalance.text = transaction.balance.toString()
holder.tvAmount.text = "$" + transaction.amount.toString()
holder.tvBalance.text = "$" + transaction.balance.toString()
holder.tvMessage.text = transaction.message
}

Expand Down