Browse Source

home flow changes banner added

new_design
Mohan Shiwakoti 1 year ago
parent
commit
b890504d61
  1. 5
      .idea/assetWizardSettings.xml
  2. 1
      app/build.gradle
  3. 19
      app/src/main/java/com/remit/jmecustomer/features/beneficiaryDetail/BeneficiaryDetailActivity.kt
  4. 65
      app/src/main/java/com/remit/jmecustomer/features/homeV3/adpaters/BannerViewAdapter.kt
  5. 19
      app/src/main/java/com/remit/jmecustomer/features/homeV3/adpaters/SendTypeAdapter.kt
  6. 3
      app/src/main/java/com/remit/jmecustomer/features/homeV3/models/BannerModel.kt
  7. 19
      app/src/main/java/com/remit/jmecustomer/features/homeV3/view/HomeActivityV3.kt
  8. 598
      app/src/main/java/com/remit/jmecustomer/features/homeV3/view/HomeFragmentV3.kt
  9. 11
      app/src/main/java/com/remit/jmecustomer/features/myTransfers/adapters/MyBeneficiariesAdapter.kt
  10. 40
      app/src/main/java/com/remit/jmecustomer/features/myTransfers/view/MyTransfersFragment.kt
  11. 110
      app/src/main/java/com/remit/jmecustomer/features/userprofile/view/ProfileFragment.kt
  12. 13
      app/src/main/res/drawable/banner_round_bg.xml
  13. 12
      app/src/main/res/drawable/blue_dot.xml
  14. 8
      app/src/main/res/drawable/circle_bullet.xml
  15. 40
      app/src/main/res/drawable/fingerprint_24px.xml
  16. 10
      app/src/main/res/drawable/grey_border_dark_indicator.xml
  17. 24
      app/src/main/res/drawable/ic_language.xml
  18. BIN
      app/src/main/res/drawable/ico_profile.png
  19. 17
      app/src/main/res/drawable/phonelink_lock_24px.xml
  20. 25
      app/src/main/res/drawable/round_help_24px.xml
  21. 23
      app/src/main/res/drawable/round_perm_phone_msg_24px.xml
  22. 14
      app/src/main/res/drawable/round_person_24px.xml
  23. 27
      app/src/main/res/layout/banner_item.xml
  24. 35
      app/src/main/res/layout/banner_view_layout.xml
  25. 36
      app/src/main/res/layout/fragment_home_new.xml
  26. 632
      app/src/main/res/layout/fragment_profile.xml
  27. 1
      app/src/main/res/layout/row_fragment_beneficiaries.xml
  28. 3
      app/src/main/res/values/colors.xml
  29. 1
      app/src/main/res/values/strings.xml
  30. 10
      app/src/main/res/values/styles.xml

5
.idea/assetWizardSettings.xml

@ -317,8 +317,9 @@
</option>
<option name="values">
<map>
<entry key="outputName" value="baseline_file_copy_24" />
<entry key="sourceFile" value="$USER_HOME$/Downloads/arrow_right_alt-24px (2).svg" />
<entry key="assetSourceType" value="FILE" />
<entry key="outputName" value="round_person_24px" />
<entry key="sourceFile" value="$USER_HOME$/Downloads/round-person-24px (2).svg" />
</map>
</option>
</PersistentState>

1
app/build.gradle

@ -233,6 +233,7 @@ dependencies {
implementation 'io.trustdock.sdk:verification-sandbox-full:2.7.2'
implementation 'com.google.android.flexbox:flexbox:3.0.0'
implementation 'me.relex:circleindicator:2.1.4'

19
app/src/main/java/com/remit/jmecustomer/features/beneficiaryDetail/BeneficiaryDetailActivity.kt

@ -8,6 +8,9 @@ import com.remit.jmecustomer.databinding.ActivityBeneficiaryDetailBinding
import com.remit.jmecustomer.features.beneficiaryDetail.adapters.SendMethodAdapter
import com.remit.jmecustomer.features.recipientlisting.view.recipientaddedit.RecipientAddEditActivity
import com.remit.jmecustomer.features.recipientmanagement.model.recipientlistingV3.ReceiverInfoV3Model
import com.remit.jmecustomer.features.recipientmanagement.view.recipientaddeditV3.RecipientAddEditV3Activity
import com.remit.jmecustomer.features.sendmoney.model.SendMoneyRequiredDataV3
import com.remit.jmecustomer.features.sendmoney.view.SendMoneyV2Activity
class BeneficiaryDetailActivity : BaseActivity() {
@ -44,9 +47,19 @@ class BeneficiaryDetailActivity : BaseActivity() {
}
binding.agreeButton.setOnClickListener {
val intent = Intent()
setResult(RESULT_OK, intent)
finish()
val intent = Intent(
this@BeneficiaryDetailActivity,
SendMoneyV2Activity::class.java
)
val sendMoneyRequiredDataV3 = SendMoneyRequiredDataV3(receiverInfoModel)
intent.putExtra(
RecipientAddEditV3Activity.RECIPIENT_INFO_BUNDLE_KEY_v3,
sendMoneyRequiredDataV3
)
startActivityForResult(
intent,
RecipientAddEditV3Activity.RECIPIENT_ACTION_EDIT_REQUEST_CODE_v3
)
}
}

65
app/src/main/java/com/remit/jmecustomer/features/homeV3/adpaters/BannerViewAdapter.kt

@ -0,0 +1,65 @@
package com.remit.jmecustomer.features.homeV3.adpaters
import android.content.Context
import android.util.DisplayMetrics
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide
import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.bumptech.glide.load.resource.bitmap.CenterCrop
import com.bumptech.glide.load.resource.bitmap.RoundedCorners
import com.bumptech.glide.request.RequestOptions
import com.remit.jmecustomer.databinding.BannerItemBinding
import com.remit.jmecustomer.features.homeV3.models.BannerModel
class BannerViewAdapter(
data: List<BannerModel>,
) :
RecyclerView.Adapter<BannerViewAdapter.BannerItemViewHolder>() {
var data: List<BannerModel>
var mContext: Context? = null
init {
this.data = data
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BannerItemViewHolder {
val binding = BannerItemBinding.inflate(
LayoutInflater.from(parent.context),
parent,
false
)
mContext = parent.context
return BannerItemViewHolder(binding)
}
override fun onBindViewHolder(holder: BannerItemViewHolder, position: Int) {
val imageURl: String = data[position].bannerIcon
Glide.with(mContext!!)
.load(imageURl).diskCacheStrategy(DiskCacheStrategy.ALL)
.transform(CenterCrop(), RoundedCorners(dpToPx(8, mContext!!)))
.into(holder.bindings.offerItemImgView)
}
override fun getItemCount(): Int {
return data.size
}
private fun dpToPx(dp: Int, context: Context): Int {
val displayMetrics = context.resources.displayMetrics
return Math.round(
dp * (displayMetrics.xdpi /
DisplayMetrics.DENSITY_DEFAULT)
)
}
class BannerItemViewHolder(private val binding: BannerItemBinding) :
RecyclerView.ViewHolder(binding.root) {
val bindings: BannerItemBinding = binding
fun bind(item: String) {
}
}
}

19
app/src/main/java/com/remit/jmecustomer/features/homeV3/adpaters/SendTypeAdapter.kt

@ -4,15 +4,22 @@ import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.remit.jmecustomer.databinding.RowSendTypeBinding
import com.remit.jmecustomer.features.exrate.model.PaymentModeMapper
import com.remit.jmecustomer.features.exrate.model.datav2.PaymentMode
class SendTypeAdapter(private val items: List<String>) :
class SendTypeAdapter(private var items: MutableList<PaymentMode>) :
RecyclerView.Adapter<SendTypeAdapter.ViewHolder>() {
class ViewHolder(private val binding: RowSendTypeBinding) :
RecyclerView.ViewHolder(binding.root) {
fun bind(item: String) {
binding.ivText.text = item
fun bind(item: PaymentMode) {
binding.ivIcon.setImageResource(
PaymentModeMapper.getPaymentModeImageFromId(
item.id
)
)
binding.ivText.text = item.description
}
}
@ -31,4 +38,10 @@ class SendTypeAdapter(private val items: List<String>) :
}
override fun getItemCount(): Int = items.size
fun setData(serviceAvailable: MutableList<PaymentMode>) {
if (serviceAvailable != null && serviceAvailable.size > 0) this.items =
serviceAvailable else this.items.clear()
notifyDataSetChanged()
}
}

3
app/src/main/java/com/remit/jmecustomer/features/homeV3/models/BannerModel.kt

@ -0,0 +1,3 @@
package com.remit.jmecustomer.features.homeV3.models
class BannerModel(var bannerIcon : String)

19
app/src/main/java/com/remit/jmecustomer/features/homeV3/view/HomeActivityV3.kt

@ -65,15 +65,16 @@ import com.remit.jmecustomer.features.transactionhistory.presenter.TransactionHi
import com.remit.jmecustomer.features.transactionhistory.presenter.TransactionHistoryV2PresenterInterface
import com.remit.jmecustomer.features.transactionhistory.view.RemitTransactionHistoryActivity
import com.remit.jmecustomer.features.trustdock.view.TrustDockActivity
import com.remit.jmecustomer.features.userprofile.view.ProfileFragment
import com.remit.jmecustomer.features.walletstatement.view.WalletStatementV2Activity
import com.remit.jmecustomer.features.withdraw.view.WithdrawActivity
class HomeActivityV3 : BaseActivity(), HomeParentViewContractV2,
HomeV2PresenterInterface.HomeV2ContractInterface, SendMoneyActionListener,
SendMoneyV2ContractInterface ,
SendMoneyV2ContractInterface,
TransactionHistoryV2PresenterInterface.TransactionHistoryV2ContractInterface {
lateinit var binding: ActivityHomeV3Binding
lateinit var binding: ActivityHomeV3Binding
private var pagerAdapter: HomePagerAdapter? = null
private val currentFragment: Fragment? = null
private val manager: FragmentManager? = null
@ -90,7 +91,7 @@ class HomeActivityV3 : BaseActivity(), HomeParentViewContractV2,
private var presenter: SendMoneyV2PresenterInterface? = null
private var sendMoneyRequiredData: SendMoneyRequiredDataV3? = null
private var presenterTransaction: TransactionHistoryV2Presenter? = null
lateinit var homeFragmentV3 : HomeFragmentV3
lateinit var homeFragmentV3: HomeFragmentV3
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityHomeV3Binding.inflate(layoutInflater)
@ -112,7 +113,7 @@ class HomeActivityV3 : BaseActivity(), HomeParentViewContractV2,
SendMoneyV2ViewModel::class.java
)
homeFragmentV3 = HomeFragmentV3()
val fragments = listOf(homeFragmentV3, MyTransfersFragment())
val fragments = listOf(homeFragmentV3, MyTransfersFragment(), ProfileFragment())
pagerAdapter = HomePagerAdapter(supportFragmentManager, fragments)
binding.vpDashboard.adapter = pagerAdapter
@ -146,6 +147,7 @@ class HomeActivityV3 : BaseActivity(), HomeParentViewContractV2,
2 -> {
resetTabs()
tab.setIcon(R.drawable.ic_transfers_selected)
binding.vpDashboard.currentItem = 2
}
}
}
@ -720,13 +722,4 @@ class HomeActivityV3 : BaseActivity(), HomeParentViewContractV2,
true
} else false
}
fun setSendData(sendMoneyRequiredDataV3: SendMoneyRequiredDataV3){
val factory = SendMoneyViewModelFactory(this, sendMoneyRequiredDataV3)
presenter = ViewModelProviders.of(this, factory).get(
SendMoneyV2ViewModel::class.java
)
homeFragmentV3.performDefaultAction(factory)
}
}

598
app/src/main/java/com/remit/jmecustomer/features/homeV3/view/HomeFragmentV3.kt

@ -1,56 +1,48 @@
package com.remit.jmecustomer.features.homeV3.view
import android.app.Activity
import android.content.Context
import android.graphics.Rect
import android.os.Bundle
import android.os.Handler
import android.text.Editable
import android.text.TextWatcher
import android.view.KeyEvent
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.*
import android.view.GestureDetector.SimpleOnGestureListener
import android.view.animation.AccelerateDecelerateInterpolator
import android.view.animation.Interpolator
import android.view.inputmethod.EditorInfo
import android.widget.Button
import android.widget.EditText
import android.widget.ImageView
import android.widget.RelativeLayout
import android.widget.Spinner
import android.widget.TextView
import android.widget.TextView.OnEditorActionListener
import androidx.cardview.widget.CardView
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.view.GestureDetectorCompat
import androidx.core.view.ViewCompat
import androidx.core.widget.NestedScrollView
import androidx.lifecycle.ViewModelProvider
import androidx.recyclerview.widget.LinearLayoutManager
import butterknife.BindView
import butterknife.ButterKnife
import androidx.recyclerview.widget.PagerSnapHelper
import com.google.android.material.textfield.TextInputEditText
import com.google.android.material.textfield.TextInputLayout
import com.remit.jmecustomer.R
import com.remit.jmecustomer.base.BaseFragment
import com.remit.jmecustomer.common.customwidgets.CurrencyFormatterTextWatcher
import com.remit.jmecustomer.common.customwidgets.CustomAlertDialog
import com.remit.jmecustomer.common.customwidgets.JmeTextView
import com.remit.jmecustomer.common.customwidgets.exchangecountrylistingdialog.CountryFlagMapper
import com.remit.jmecustomer.common.customwidgets.exchangecountrylistingdialog.ExchangeRateCurrencyListingDialog
import com.remit.jmecustomer.databinding.FragmentHomeNewBinding
import com.remit.jmecustomer.features.exrate.model.datav2.ExchangeCalculationModel
import com.remit.jmecustomer.features.exrate.adapter.PaymentModeRvAdapter
import com.remit.jmecustomer.features.exrate.gateway.ExchangeRateGateway
import com.remit.jmecustomer.features.exrate.model.datav2.CountryPaymentService
import com.remit.jmecustomer.features.exrate.model.datav2.PaymentMode
import com.remit.jmecustomer.features.exrate.presenter.ExchangeRatePresenter
import com.remit.jmecustomer.features.exrate.presenter.ExchangeRatePresenterInterface
import com.remit.jmecustomer.features.exrate.presenter.ExchangeRatePresenterInterface.ExchangeRateContractInterfacee
import com.remit.jmecustomer.features.homeV3.adpaters.BannerViewAdapter
import com.remit.jmecustomer.features.homeV3.adpaters.SendTypeAdapter
import com.remit.jmecustomer.features.sendmoney.SendMoneyViewModelFactory
import com.remit.jmecustomer.features.sendmoney.model.RewardsPointDTO
import com.remit.jmecustomer.features.homeV3.models.BannerModel
import com.remit.jmecustomer.features.sendmoney.model.amountdetail.AmountDetailRelatedDataModel
import com.remit.jmecustomer.features.sendmoney.model.amountdetail.RecipientCurrencyModel
import com.remit.jmecustomer.features.sendmoney.presenter.SendMoneyV2ViewModel
import com.remit.jmecustomer.features.sendmoney.view.SendMoneyActionListener
import com.remit.jmecustomer.features.sendmoney.view.amountdetail.AmountDetailExRateCountryListingDialog
import com.remit.jmecustomer.features.sendmoney.view.amountdetail.AmountDetailExRateCountryListingDialog.ExRateCurrencySelectionListener
import com.remit.jmecustomer.utils.Utils
import java.util.*
class HomeFragmentV3 : BaseFragment(), View.OnClickListener,
ExRateCurrencySelectionListener, OnEditorActionListener {
OnEditorActionListener, ExchangeRateContractInterfacee,
PaymentModeRvAdapter.OnPaymentModeSelectionListener {
private var scrollPosition: Int = 0
private var _binding: FragmentHomeNewBinding? = null
private val binding get() = _binding!!
var iv_rewardsPoint: TextInputLayout? = null
@ -66,14 +58,11 @@ class HomeFragmentV3 : BaseFragment(), View.OnClickListener,
private var selectedSendAmount: String? = null
private var selectedsendingCurrency: String? = null
private var sendAmountTextWatcher: SendAmountTextWatcher? = null
private var recepientAmountTextWatcher: RecipientAmountTextWatcher? = null
private var sendCurrencyFormatterTextWatcher: CurrencyFormatterTextWatcher? = null
private var recepientCurrencyFormatterTextWatcher: CurrencyFormatterTextWatcher? = null
private var rewardsPointTextWatcher: RewardsPointTextWatcher? = null
private var selectedExRateId: String? = null
private var selectedExRateWithoutTrunc: String? = null
private var selectedTransferAmount: String? = null
private var viewmodel: SendMoneyV2ViewModel? = null
private var sendMoneyEditText: TextInputEditText? = null
private var recieveMoneyEditText: TextInputEditText? = null
private var continueBtn: RelativeLayout? = null
@ -83,6 +72,16 @@ class HomeFragmentV3 : BaseFragment(), View.OnClickListener,
private var recepientFlagImageView: ImageView? = null
private var recepientCurrencyTextView: TextView? = null
private var btnText: TextView? = null
lateinit var presenter: ExchangeRatePresenterInterface
private var countryListingDialog: ExchangeRateCurrencyListingDialog? = null
private var sendMoneyTextWatcher: SendAmountTextWatcher? = null
private var receiveMoneyTextWatcher: ReceiveAmountTextWatcher? = null
private var gestureDetector: GestureDetectorCompat? = null
private var myViewGestureDetector: AmountChangeAndFocusOutDetector? = null
private val paymentModeRvAdapter: PaymentModeRvAdapter? = null
private var sendTypeAdapter: SendTypeAdapter? = null
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
@ -91,7 +90,8 @@ class HomeFragmentV3 : BaseFragment(), View.OnClickListener,
_binding = FragmentHomeNewBinding.inflate(inflater, container, false)
setUpData()
init()
performDefaultAction(null)
setBannerData()
performDefaultAction()
return binding.root
}
@ -99,15 +99,21 @@ class HomeFragmentV3 : BaseFragment(), View.OnClickListener,
super.onViewCreated(view, savedInstanceState)
}
private fun performDefaultAction() {
showProgressBar(true, getString(R.string.processing_request_text))
presenter.getExrateRelatedData()
}
private fun setUpData() {
var list = listOf<String>("Cash Pickup", "Bank Deposit", "Mobile Wallet")
val list: MutableList<PaymentMode> = ArrayList()
val layoutManager = LinearLayoutManager(activity, LinearLayoutManager.HORIZONTAL, false)
binding.rvSendType.layoutManager = layoutManager
var adapter = SendTypeAdapter(list)
binding.rvSendType.adapter = adapter
sendTypeAdapter = SendTypeAdapter(list)
binding.rvSendType.adapter = sendTypeAdapter
}
private fun init() {
presenter = ExchangeRatePresenter(this, ExchangeRateGateway())
sendMoneyEditText = binding.sendAmountEdTxt
recieveMoneyEditText = binding.receiveAmountEdTxt
transferFeeTxtView = binding.tvTransfer1
@ -117,417 +123,273 @@ class HomeFragmentV3 : BaseFragment(), View.OnClickListener,
recepientCurrencyTextView = binding.tvCurrency2
countrySelectionSpinner = binding.ivCurrency2;
btnText = binding.btnText
viewmodel = ViewModelProvider(requireActivity())[SendMoneyV2ViewModel::class.java]
sendAmountTextWatcher = SendAmountTextWatcher()
recepientAmountTextWatcher = RecipientAmountTextWatcher()
interpolator = AccelerateDecelerateInterpolator()
setupRecyclerView()
registerTextWatchers(true)
viewmodel!!.fetchRewardsLiveData()
viewmodel!!.subscribeToRewardsPoint().observe(
viewLifecycleOwner
) { rewardsPointDTO: RewardsPointDTO ->
updateRewardDetails(
rewardsPointDTO
)
}
}
override fun onStart() {
super.onStart()
continueBtn!!.setOnClickListener(this)
recieveMoneyEditText!!.setOnEditorActionListener(this)
sendMoneyEditText!!.setOnEditorActionListener(this)
countrySelectionSpinner!!.setOnClickListener(this)
// recepientCurrencyTextView!!.setOnClickListener(this)
// countrySelectionSpinnerArrow!!.setOnClickListener(this)
// ed_rewardsPoint!!.setOnClickListener(this)
// ed_rewardsPoint!!.setOnEditorActionListener(this)
}
override fun onStop() {
super.onStop()
continueBtn!!.setOnClickListener(null)
recieveMoneyEditText!!.setOnEditorActionListener(null)
sendMoneyEditText!!.setOnEditorActionListener(null)
countrySelectionSpinner!!.setOnClickListener(null)
// recepientCurrencyTextView!!.setOnClickListener(null)
// countrySelectionSpinnerArrow!!.setOnClickListener(null)
// ed_rewardsPoint!!.setOnClickListener(null)
// ed_rewardsPoint!!.setOnEditorActionListener(null)
}
override fun onAttach(context: Context) {
super.onAttach(context)
(context as SendMoneyActionListener).updateCurrentIndexFrom(R.layout.fragment_amount_detail_send_money_v2)
}
override fun onAttach(activity: Activity) {
super.onAttach(activity)
(activity as SendMoneyActionListener).updateCurrentIndexFrom(R.layout.fragment_amount_detail_send_money_v2)
}
override fun onDetach() {
super.onDetach()
(activity as SendMoneyActionListener?)!!.updateCurrentScreenByLayoutId(R.layout.fragment_amount_detail_send_money_v2)
sendMoneyTextWatcher = SendAmountTextWatcher(sendMoneyEditText)
receiveMoneyTextWatcher = ReceiveAmountTextWatcher(recieveMoneyEditText)
myViewGestureDetector = AmountChangeAndFocusOutDetector()
gestureDetector = GestureDetectorCompat(requireContext(), myViewGestureDetector)
}
override fun onDestroy() {
registerTextWatchers(false)
super.onDestroy()
override fun onClick(v: View) {
when (v.id) {
R.id.agreeButton -> {
(requireActivity() as HomeActivityV3).binding.vpDashboard.currentItem = 1
}
R.id.countrySelectionSpinner, R.id.recepientCurrencyTextView, R.id.iv_currency_2 -> showCountryListinDialog()
R.id.exRateCalculateButton -> presenter.calcExrate()
}
}
private fun setupRecyclerView() {}
private fun showCurrencyListingDialog() {
hideKeyBoard()
if (amountDetailRelatedData!!.availableCurrencyData == null || amountDetailRelatedData!!.availableCurrencyData.isEmpty()) return
if (exRateCountryListingDialog == null) exRateCountryListingDialog =
AmountDetailExRateCountryListingDialog()
exRateCountryListingDialog!!.setListener(this)
exRateCountryListingDialog!!.setCountryPaymentData(amountDetailRelatedData!!.availableCurrencyData)
if (!exRateCountryListingDialog!!.isAdded) exRateCountryListingDialog!!.show(
activity!!.supportFragmentManager,
private fun showCountryListinDialog() {
if (countryListingDialog == null) countryListingDialog = ExchangeRateCurrencyListingDialog()
countryListingDialog?.setCountryPaymentData(presenter.getAvailableCountryRelatedCurrency())
countryListingDialog?.setListener(ExchangeRateCurrencyListingDialog.CountrySelectionListener { countryPaymentService ->
presenter.setCountryRelatedCurrencyData(countryPaymentService)
countryListingDialog?.dismiss()
})
if (!countryListingDialog!!.isAdded) countryListingDialog?.show(
requireActivity().supportFragmentManager,
"GenericTextListingDialog"
)
}
fun performDefaultAction(sendMoneyViewModelFactory: SendMoneyViewModelFactory?) {
if(sendMoneyViewModelFactory != null) {
viewmodel =
ViewModelProvider(this, sendMoneyViewModelFactory)[SendMoneyV2ViewModel::class.java]
}
shouldCaulatedByRecipient = false
showFootNote(viewmodel!!.footNote)
viewmodel!!.subscribeToAmountRelatedData().observe(
viewLifecycleOwner
) { data: AmountDetailRelatedDataModel? ->
amountDetailRelatedData = data
if (amountDetailRelatedData == null || amountDetailRelatedData!!.defaultSelectedCurrency == null) {
showSelectedCurrency("", getString(R.string.na_text))
Handler().postDelayed({
showPopUpMessage(
getString(R.string.no_payout_currency_defined_error),
CustomAlertDialog.AlertType.ALERT,
null
)
}, 350)
continueBtn!!.setOnClickListener(null)
} else {
showSelectedCurrency(
amountDetailRelatedData!!.defaultSelectedCurrency.countryCode,
amountDetailRelatedData!!.defaultSelectedCurrency.currencyCode
)
updateButtonToCalculate(true)
}
}
viewmodel!!.subscribeToExRateData().observe(
viewLifecycleOwner
) { data: ExchangeCalculationModel ->
selectedTransferFeeAmount = data.scCharge
selectedExRate = data.exRateDisplay
selectedExRateWithoutTrunc = data.exRate
selectedRecipientAmount = data.getpAmt()
selectedSendAmount = data.collAmt
selectedsendingCurrency = data.collCurr
selectedExRateId = data.exrateId
selectedTransferAmount = data.getsAmt()
val transferDisplay =
" -" + Utils.formatCurrency(
selectedTransferFeeAmount
) + " " + selectedsendingCurrency + "\n (" + getString(R.string.transfer_fee_included_text) + ")"
val exRateDisplay =
""" $selectedExRate
(${getString(R.string.current_exchange_rate_text)})"""
showTransferfeeAndExRate(true, transferDisplay, exRateDisplay, "")
showSendAndRecieveAmount(selectedSendAmount, selectedRecipientAmount)
updateButtonToCalculate(false)
showFootNote(viewmodel!!.footNote)
private fun startSendAmountListener(action: Boolean) {
if (action) {
binding.sendAmountEdTxt.addTextChangedListener(sendMoneyTextWatcher)
} else {
binding.sendAmountEdTxt.removeTextChangedListener(sendMoneyTextWatcher)
}
}
override fun onClick(v: View) {
when (v.id) {
R.id.agreeButton -> if (shouldCalculateExRate) {
forex
} else {
if (validateAll()) {
hideKeyBoard()
sendMoneyEditText!!.clearFocus()
recieveMoneyEditText!!.clearFocus()
viewmodel!!.setSendingAmount(
sendMoneyEditText!!.text.toString(),
amountDetailRelatedData!!.defaultSelectedCurrency.currencyCode,
selectedExRateWithoutTrunc,
selectedRecipientAmount,
selectedTransferFeeAmount,
shouldCaulatedByRecipient,
selectedExRateId,
selectedTransferAmount
)
// ((SendMoneyActionListener) getActivity()).showTransactionReviewPage();
(activity as SendMoneyActionListener?)!!.showCCDIPage()
}
}
R.id.countrySelectionSpinner, R.id.recepientCurrencyTextView, R.id.countrySelectionSpinnerArrow -> if (!amountDetailRelatedData!!.availableCurrencyData.isEmpty()) showCurrencyListingDialog()
private fun startReceiveAmountListener(action: Boolean) {
if (action) {
binding.receiveAmountEdTxt.addTextChangedListener(receiveMoneyTextWatcher)
} else {
binding.receiveAmountEdTxt.removeTextChangedListener(receiveMoneyTextWatcher)
}
}
private val forex: Unit
private get() {
if (shouldCaulatedByRecipient && !validateAmountIsNotEmpty(recieveMoneyEditText!!.text.toString())) {
showToastMessage(getString(R.string.sending_amount_error))
return
}
if (!shouldCaulatedByRecipient && !validateAmountIsNotEmpty(sendMoneyEditText!!.text.toString())) {
showToastMessage(getString(R.string.receiving_amount_error))
return
}
if (amountDetailRelatedData != null) {
viewmodel!!.getForex(
recieveMoneyEditText!!.text.toString(),
sendMoneyEditText!!.text.toString(),
shouldCaulatedByRecipient,
amountDetailRelatedData!!.defaultSelectedCurrency.currencyCode,
binding.edRewardsPoint!!.text.toString()
);
} else {
(requireActivity() as HomeActivityV3).binding.vpDashboard.currentItem = 2
}
}
override fun showPayoutAmount(pAmount: String?) {
startReceiveAmountListener(false)
binding.receiveAmountEdTxt.setText(pAmount)
startReceiveAmountListener(true)
}
private fun showSelectedCurrency(
selectedCountryCode: String?,
selectedCountryCurrency: String?
override fun showCollectionAmount(pAmount: String?) {
startSendAmountListener(false)
binding.sendAmountEdTxt.setText(pAmount)
startSendAmountListener(true)
}
override fun showSelectedPayoutMode(
serviceAvailable: MutableList<PaymentMode>,
selectedIndex: Int
) {
var flagResId = -1
if (selectedCountryCode != null) flagResId =
CountryFlagMapper.getFlagFromCountryCode(selectedCountryCode)
if (flagResId != -1) recepientFlagImageView!!.setBackgroundResource(flagResId) else recepientFlagImageView!!.setBackgroundResource(
0
sendTypeAdapter?.setData(serviceAvailable)
// sendTypeAdapter.setSelectedItem(selectedIndex)
}
override fun showSelectedPayoutCurrency(selectedPayoutCountryCurrency: CountryPaymentService) {
recepientCurrencyTextView!!.text = selectedPayoutCountryCurrency.currency
recepientFlagImageView!!.setImageResource(
CountryFlagMapper.getFlagFromCountryCode(
selectedPayoutCountryCurrency.countryCode
)
)
if (selectedCountryCurrency != null) recepientCurrencyTextView!!.text =
selectedCountryCurrency
}
private fun showTransferfeeAndExRate(
action: Boolean,
transferDisplay: String,
exRateDisplay: String,
discountValue: String
override fun showTransferChargeAndExrate(
chargeAmount: String?,
exRate: String?,
formattedExRate: String?,
playAnimation: Boolean
) {
if (action) {
if (exchangeRateTxtView!!.visibility == View.VISIBLE) exchangeRateTxtView!!.visibility =
View.INVISIBLE
exchangeRateTxtView!!.text = exRateDisplay
if (playAnimation) {
exchangeRateTxtView!!.visibility = View.INVISIBLE
exchangeRateTxtView!!.text = exRate
exchangeRateTxtView!!.translationY = exchangeRateTxtView!!.height.toFloat()
exchangeRateTxtView!!.visibility = View.VISIBLE
ViewCompat.animate(exchangeRateTxtView!!).translationY(0f).setDuration(550)
.setInterpolator(
interpolator
).start()
if (transferFeeTxtView!!.visibility == View.VISIBLE) transferFeeTxtView!!.visibility =
View.INVISIBLE
transferFeeTxtView!!.text = transferDisplay
transferFeeTxtView!!.visibility = View.INVISIBLE
transferFeeTxtView!!.text = chargeAmount
transferFeeTxtView!!.translationY = transferFeeTxtView!!.height.toFloat()
transferFeeTxtView!!.visibility = View.VISIBLE
ViewCompat.animate(transferFeeTxtView!!).translationY(0f).setDuration(550)
.setInterpolator(
interpolator
).start()
// jmeExratePC.setVisibility(View.INVISIBLE)
// jmeExratePC.setAlpha(0f)
// jmeExratePC.setText(formattedExRate)
// jmeExratePC.setVisibility(View.INVISIBLE)
// jmeExratePC.animate().alpha(1f).setDuration(500).withLayer().start()
} else {
if (exchangeRateTxtView!!.visibility == View.VISIBLE) exchangeRateTxtView!!.visibility =
View.INVISIBLE
if (transferFeeTxtView!!.visibility == View.VISIBLE) transferFeeTxtView!!.visibility =
View.INVISIBLE
transferFeeTxtView!!.text = chargeAmount
exchangeRateTxtView!!.text = exRate
// jmeExratePC.setText(formattedExRate)
}
}
private fun showSendAndRecieveAmount(sendAmount: String?, recieveAmount: String?) {
updateSendAmount(sendAmount)
updateRecievingAmount(recieveAmount)
override fun showExrateView(task: Runnable?) {
showProgressBar(false, getString(R.string.processing_request_text))
presenter.onExRateViewLoadedSuccessfully()
}
private fun validateAmountIsNotEmpty(amount: String?): Boolean {
return amount != null && amount.length > 0
override fun showFootNote(footNote: String) {
// if (footNote.isEmpty()) {
// idExFootNoteContainer.setVisibility(View.INVISIBLE)
// } else {
// exRateFootNoteText.setText(footNote)
// idExFootNoteContainer.setVisibility(View.VISIBLE)
// }
}
override fun onCurrencySelected(selectedCurrency: RecipientCurrencyModel) {
if (amountDetailRelatedData != null && amountDetailRelatedData!!.defaultSelectedCurrency != null && amountDetailRelatedData!!.defaultSelectedCurrency.countryName != null && amountDetailRelatedData!!.defaultSelectedCurrency.currencyCode != null && amountDetailRelatedData!!.defaultSelectedCurrency.countryName.length > 0 && amountDetailRelatedData!!.defaultSelectedCurrency.currencyCode.length > 0) {
if (!amountDetailRelatedData!!.defaultSelectedCurrency.currencyCode.equals(
selectedCurrency.currencyCode,
ignoreCase = true
) && !amountDetailRelatedData!!.defaultSelectedCurrency.countryName.equals(
selectedCurrency.countryCode,
ignoreCase = true
)
) {
updateRecievingAmount("")
updateButtonToCalculate(true)
shouldCaulatedByRecipient = false
} else forex
}
amountDetailRelatedData!!.defaultSelectedCurrency = selectedCurrency
if (exRateCountryListingDialog != null) exRateCountryListingDialog!!.dismiss()
exRateCountryListingDialog = null
showSelectedCurrency(
amountDetailRelatedData!!.defaultSelectedCurrency.countryCode,
amountDetailRelatedData!!.defaultSelectedCurrency.currencyCode
)
override fun onPaymentModeSelected(selectedData: PaymentMode?) {
presenter.setPaymentMode(selectedData)
}
override fun onStart() {
super.onStart()
// exRateCalculateButton.setOnClickListener(this)
// iv_back.setOnClickListener(this)
binding.receiveAmountEdTxt.setOnEditorActionListener(this)
binding.sendAmountEdTxt.setOnEditorActionListener(this)
countrySelectionSpinner!!.setOnClickListener(this)
recepientCurrencyTextView!!.setOnClickListener(this)
recepientFlagImageView?.setOnClickListener(this)
binding.agreeButton.setOnClickListener(this)
}
override fun onEditorAction(v: TextView, actionId: Int, event: KeyEvent?): Boolean {
when (v.id) {
R.id.sendAmountEdTxt, R.id.receiveAmountEdTxt -> {
R.id.sendAmountEdTxt -> {
if (actionId == EditorInfo.IME_ACTION_DONE) {
hideKeyBoard()
forex
presenter.setCalcByPayoutAmount(false)
presenter.calcExrate()
return true
}
return true
}
R.id.ed_rewardsPoint -> {
if (actionId == EditorInfo.IME_ACTION_DONE) {
hideKeyBoard()
forex
presenter.setCalcByPayoutAmount(true)
presenter.calcExrate()
return true
}
}
R.id.receiveAmountEdTxt -> if (actionId == EditorInfo.IME_ACTION_DONE) {
presenter.setCalcByPayoutAmount(true)
presenter.calcExrate()
return true
}
}
return false
}
private fun validateAll(): Boolean {
return validateAmountIsNotEmpty(sendMoneyEditText!!.text.toString()) && validateAmountIsNotEmpty(
recieveMoneyEditText!!.text.toString()
)
}
private fun updateButtonToCalculate(action: Boolean) {
shouldCalculateExRate = action
if (action) btnText?.text =
getString(R.string.calculate_text) else btnText?.text =
getString(R.string.continue_text)
}
private fun updateSendAmount(amount: String?) {
registerAvailableTextWatchersForEditText(sendMoneyEditText, false)
sendMoneyEditText!!.setText(Utils.formatCurrency(amount))
registerAvailableTextWatchersForEditText(sendMoneyEditText, true)
}
private fun updateRecievingAmount(amount: String?) {
registerAvailableTextWatchersForEditText(recieveMoneyEditText, false)
recieveMoneyEditText!!.setText(Utils.formatCurrency(amount))
registerAvailableTextWatchersForEditText(recieveMoneyEditText, true)
}
private fun registerTextWatchers(action: Boolean) {
if (action) {
if (sendAmountTextWatcher == null) sendAmountTextWatcher = SendAmountTextWatcher()
if (recepientAmountTextWatcher == null) recepientAmountTextWatcher =
RecipientAmountTextWatcher()
if (recepientCurrencyFormatterTextWatcher == null) recepientCurrencyFormatterTextWatcher =
CurrencyFormatterTextWatcher(recieveMoneyEditText)
if (sendCurrencyFormatterTextWatcher == null) sendCurrencyFormatterTextWatcher =
CurrencyFormatterTextWatcher(sendMoneyEditText)
if (rewardsPointTextWatcher == null) rewardsPointTextWatcher = RewardsPointTextWatcher()
sendMoneyEditText!!.addTextChangedListener(sendAmountTextWatcher)
recieveMoneyEditText!!.addTextChangedListener(recepientAmountTextWatcher)
sendMoneyEditText!!.addTextChangedListener(sendCurrencyFormatterTextWatcher)
recieveMoneyEditText!!.addTextChangedListener(recepientCurrencyFormatterTextWatcher)
binding.edRewardsPoint!!.addTextChangedListener(rewardsPointTextWatcher)
} else {
sendMoneyEditText!!.removeTextChangedListener(sendAmountTextWatcher)
recieveMoneyEditText!!.removeTextChangedListener(recepientAmountTextWatcher)
sendMoneyEditText!!.removeTextChangedListener(sendCurrencyFormatterTextWatcher)
recieveMoneyEditText!!.removeTextChangedListener(recepientCurrencyFormatterTextWatcher)
binding.edRewardsPoint!!.removeTextChangedListener(rewardsPointTextWatcher)
inner class AmountChangeAndFocusOutDetector : SimpleOnGestureListener() {
override fun onSingleTapUp(e: MotionEvent): Boolean {
if (e.action == MotionEvent.ACTION_UP) {
if (hasValidOutsideAmountWidgetTouch(e.x, e.y)) {
presenter.calcExrate()
return true
}
}
return super.onSingleTapUp(e)
}
}
private fun registerAvailableTextWatchersForEditText(editText: EditText?, action: Boolean) {
when (editText!!.id) {
R.id.sendAmountEdTxt -> if (action) sendMoneyEditText!!.addTextChangedListener(
sendAmountTextWatcher
) else sendMoneyEditText!!.removeTextChangedListener(sendAmountTextWatcher)
R.id.receiveAmountEdTxt -> if (action) recieveMoneyEditText!!.addTextChangedListener(
recepientAmountTextWatcher
) else recieveMoneyEditText!!.removeTextChangedListener(recepientAmountTextWatcher)
private fun hasValidOutsideAmountWidgetTouch(x: Float, y: Float): Boolean {
val posX = x.toInt()
val posY = y.toInt()
val sendMoneyLeftAndTopCoordinates = IntArray(2)
val receiveMoneyLeftAndTopCoordinates = IntArray(2)
// sendMoneyViewContainer.getLocationOnScreen(sendMoneyLeftAndTopCoordinates);
val sendMoneyBoundRect = Rect(
sendMoneyLeftAndTopCoordinates[0], sendMoneyLeftAndTopCoordinates[1],
sendMoneyLeftAndTopCoordinates[0] + binding.sendAmountEdTxt.getMeasuredWidth(),
sendMoneyLeftAndTopCoordinates[1] + binding.sendAmountEdTxt.getMeasuredHeight()
)
val receiveMoneyBoundRect = Rect(
receiveMoneyLeftAndTopCoordinates[0], receiveMoneyLeftAndTopCoordinates[1],
receiveMoneyLeftAndTopCoordinates[0] + binding.receiveAmountEdTxt.getMeasuredWidth(),
receiveMoneyLeftAndTopCoordinates[1] + binding.receiveAmountEdTxt.getMeasuredHeight()
)
return ((binding.receiveAmountEdTxt.hasFocus() || binding.sendAmountEdTxt.hasFocus())
&& !sendMoneyBoundRect.contains(posX, posY)
&& !receiveMoneyBoundRect.contains(posX, posY)
)
}
}
private inner class SendAmountTextWatcher : TextWatcher {
inner class SendAmountTextWatcher(editText: EditText?) :
CurrencyFormatterTextWatcher(editText) {
override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {}
override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {}
override fun afterTextChanged(s: Editable) {
shouldCaulatedByRecipient = false
updateRecievingAmount("")
updateButtonToCalculate(true)
showTransferfeeAndExRate(false, "", "", "")
super.afterTextChanged(s)
presenter.setCalcByPayoutAmount(false)
presenter.setCAmount(s.toString())
}
}
private inner class RecipientAmountTextWatcher : TextWatcher {
inner class ReceiveAmountTextWatcher(editText: EditText?) :
CurrencyFormatterTextWatcher(editText) {
override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {}
override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {}
override fun afterTextChanged(s: Editable) {
shouldCaulatedByRecipient = true
updateSendAmount("")
updateButtonToCalculate(true)
showTransferfeeAndExRate(false, "", "", "")
super.afterTextChanged(s)
presenter.setCalcByPayoutAmount(true)
presenter.setPAmount(s.toString())
}
}
private inner class RewardsPointTextWatcher : TextWatcher {
override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {}
override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {
val strEnteredVal = binding.edRewardsPoint!!.text.toString()
if (!strEnteredVal.isEmpty()) {
val num = strEnteredVal.toInt()
if (num > rewardPoint!!.toInt()) {
iv_rewardsPoint!!.error = "You cannot use more than $rewardPoint"
continueBtn!!.isEnabled = false
} else {
iv_rewardsPoint!!.error = null
continueBtn!!.isEnabled = true
}
}
}
fun setBannerData() {
val data: MutableList<BannerModel> = ArrayList()
var url = arrayOf(
"https://cdn.imepay.com.np:9001/Handler/AdminImageHandler.ashx?img=GF84cX%2fW3XJc0WxXb93%2fjgTfdYUWuYswsB5R6endZc84sA%2bJ9cUB06Km7M9P1ULW," +
"https://cdn.imepay.com.np:9001/Handler/AdminImageHandler.ashx?img=GF84cX%2fW3XJc0WxXb93%2fjgTfdYUWuYswsB5R6endZc84sA%2bJ9cUB06Km7M9P1ULW," +
"https://cdn.imepay.com.np:9001/Handler/AdminImageHandler.ashx?img=GF84cX%2fW3XJc0WxXb93%2fjgTfdYUWuYswsB5R6endZc84sA%2bJ9cUB06Km7M9P1ULW"
)
override fun afterTextChanged(s: Editable) {
shouldCaulatedByRecipient = false
updateRecievingAmount("")
updateButtonToCalculate(true)
showTransferfeeAndExRate(false, "", "", "")
for (i in url) {
val bannerModel = BannerModel(i)
data.add(bannerModel)
}
}
val bannerViewAdapter = BannerViewAdapter(data)
class CouponDetailViewDTO(var couponName: String, var appliedAmount: String) {
override fun toString(): String {
return "CouponDetailViewDTO{" +
"couponName='" + couponName + '\'' +
", appliedAmount='" + appliedAmount + '\'' +
'}'
val lm = LinearLayoutManager(
binding.bannerView.getContext(),
LinearLayoutManager.HORIZONTAL,
false
)
binding.bannerView.layoutManager = lm
binding.bannerView.adapter = bannerViewAdapter
binding.bannerView.setOnFlingListener(null)
val snapHelper = PagerSnapHelper()
snapHelper.attachToRecyclerView(binding.bannerView)
if (data.size > 1) {
// bannerView.addItemDecoration(new LinePagerIndicatorDecoration());
binding.indicator.attachToRecyclerView(binding.bannerView, snapHelper)
}
}
fun showFootNote(footNote: String?) {
// if (footNote == null || footNote.isEmpty()) {
// idSendMoneyFootNoteContainer!!.visibility = View.INVISIBLE
// } else {
// sendMoneyNoteText!!.text = footNote
// idSendMoneyFootNoteContainer!!.visibility = View.VISIBLE
// }
}
fun updateRewardDetails(rewardsPointDTO: RewardsPointDTO) {
if (rewardsPointDTO.showRewardPoint.equals("y", ignoreCase = true)) {
binding.rewardsPointsContainer!!.visibility = View.VISIBLE
//pointsAvailableText.setText("You have " + rewardsPointDTO.getPoint() + " reward points available");
binding.pointsAvailableText!!.text = rewardsPointDTO.rewardMessage
rewardPoint = rewardsPointDTO.point
}
val timer = Timer()
timer.scheduleAtFixedRate(object : TimerTask() {
override fun run() {
if (scrollPosition >= data.size) scrollPosition = 0
binding.bannerView.post(Runnable { // scrollPosition = lm.findFirstVisibleItemPosition();
++scrollPosition
if (scrollPosition > data.size - 1) {
scrollPosition = 0
binding.bannerView.scrollToPosition(scrollPosition)
} else {
binding.bannerView.smoothScrollToPosition(scrollPosition)
}
})
}
}, 500, 3500)
}
}

11
app/src/main/java/com/remit/jmecustomer/features/myTransfers/adapters/MyBeneficiariesAdapter.kt

@ -40,13 +40,12 @@ class MyBeneficiariesAdapter(private var data: MutableList<ReceiverInfoV3Model>
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
val item = data[position]
holder.bindings.rvInitials.setOnClickListener {
val activity : HomeActivityV3 = mContext as HomeActivityV3
var intent = Intent(mContext, BeneficiaryDetailActivity::class.java)
intent.putExtra("receiverInfoModel", item)
activity.startActivityForResult(intent , 101)
activity.setSendData(SendMoneyRequiredDataV3(item))
}
holder.bindings.constMain.setOnClickListener{
listener?.onRecipientSelected(item)
}
holder.itemView.setOnClickListener{
holder.bindings.rvInitials.setOnClickListener{
listener?.onRecipientSelected(item)
}
holder.bindings.tvName.text = item.fullName

40
app/src/main/java/com/remit/jmecustomer/features/myTransfers/view/MyTransfersFragment.kt

@ -19,6 +19,7 @@ import com.remit.jmecustomer.common.customwidgets.common.GenericEditTextPromptDi
import com.remit.jmecustomer.common.customwidgets.common.GenericPromptDialog
import com.remit.jmecustomer.common.customwidgets.common.GenericPromptDialog.GenericDialogPromptListener
import com.remit.jmecustomer.databinding.FragmentMyTransfersBinding
import com.remit.jmecustomer.features.beneficiaryDetail.BeneficiaryDetailActivity
import com.remit.jmecustomer.features.homeV3.view.HomeActivityV3
import com.remit.jmecustomer.features.inboundreceipt.view.InboundRemitReceiptActivity
import com.remit.jmecustomer.features.myTransfers.adapters.RecentTransactionsAdapter
@ -47,7 +48,7 @@ class MyTransfersFragment : BaseFragment(),
private var adapter: MyBeneficiariesAdapter? = null
private var recentAdapter: RecentTransactionsAdapter? = null
var presenter: RecipientListingV3PresenterInterface? = null
var presenter: RecipientListingV3PresenterInterface? = null
private var searchEditTextTextWatcher: SearchEditTextTextWatcher? = null
private var _binding: FragmentMyTransfersBinding? = null
@ -80,7 +81,7 @@ class MyTransfersFragment : BaseFragment(),
val layoutManager = LinearLayoutManager(activity, LinearLayoutManager.HORIZONTAL, false)
binding.recipientListRv.layoutManager = layoutManager
var data: ArrayList<ReceiverInfoV3Model> = ArrayList()
adapter = MyBeneficiariesAdapter(data , this)
adapter = MyBeneficiariesAdapter(data, this)
binding.recipientListRv.adapter = adapter
val layoutManagerVertical = LinearLayoutManager(activity)
@ -95,8 +96,6 @@ class MyTransfersFragment : BaseFragment(),
override fun onStart() {
super.onStart()
binding.edtSearchTransfers!!.addTextChangedListener(searchEditTextTextWatcher)
binding.addRecipientView.setOnClickListener(this)
}
override fun onStop() {
@ -113,6 +112,9 @@ class MyTransfersFragment : BaseFragment(),
presenterTransaction = ViewModelProvider(requireActivity()).get(
TransactionHistoryV2Presenter::class.java
)
binding.edtSearchTransfers!!.addTextChangedListener(searchEditTextTextWatcher)
binding.addRecipientView.setOnClickListener(this)
}
private fun performDefaultAction(savedInstance: Bundle?) {
@ -128,7 +130,7 @@ class MyTransfersFragment : BaseFragment(),
}
override fun showAllRecipientToUser(
override fun showAllRecipientToUser(
recipientInfoModelList: MutableList<ReceiverInfoV3Model>,
changeLayoutBehavior: Boolean
) {
@ -151,7 +153,7 @@ class MyTransfersFragment : BaseFragment(),
override fun onEmailCodeNegativeButtonPressed() {}
override fun onEmailCodePositiveBtnPressed(emailCode: String?) {
override fun onEmailCodePositiveBtnPressed(emailCode: String?) {
presenter?.verifyEmailCode(emailCode)
}
@ -179,7 +181,7 @@ class MyTransfersFragment : BaseFragment(),
)
}
override fun redirectToSendMoney(sendMoneyRequiredDataV3: SendMoneyRequiredDataV3?) {
override fun redirectToSendMoney(sendMoneyRequiredDataV3: SendMoneyRequiredDataV3?) {
// val intent = Intent(requireContext(), SendMoneyV2Activity::class.java)
// intent.putExtra(
// RecipientAddEditV3Activity.RECIPIENT_INFO_BUNDLE_KEY_v3,
@ -189,10 +191,9 @@ class MyTransfersFragment : BaseFragment(),
// intent,
// RecipientAddEditV3Activity.RECIPIENT_ACTION_EDIT_REQUEST_CODE_v3
// )
(requireActivity() as HomeActivityV3).binding.vpDashboard.currentItem = 0
}
override fun proceedToEditRecipient(recipientInfoModel: ReceiverInfoV3Model) {
override fun proceedToEditRecipient(recipientInfoModel: ReceiverInfoV3Model) {
val intent = Intent(requireContext(), RecipientAddEditV3Activity::class.java)
intent.putExtra(RecipientAddEditV3Activity.RECIPIENT_INFO_BUNDLE_KEY_v3, recipientInfoModel)
startActivityForResult(
@ -230,15 +231,18 @@ class MyTransfersFragment : BaseFragment(),
)
}
override fun onRecipientSelected(recipientInfoModel: ReceiverInfoV3Model) {
if (recipientInfoModel.hasVerifiedOTP) {
presenter!!.saveSelectedRecipientInfomation(recipientInfoModel)
} else {
proceedToShowTermsConditions(recipientInfoModel)
}
override fun onRecipientSelected(recipientInfoModel: ReceiverInfoV3Model) {
// if (recipientInfoModel.hasVerifiedOTP) {
// presenter!!.saveSelectedRecipientInfomation(recipientInfoModel)
// } else {
// proceedToShowTermsConditions(recipientInfoModel)
// }
val intent = Intent(requireActivity(), BeneficiaryDetailActivity::class.java)
intent.putExtra("receiverInfoModel", recipientInfoModel)
startActivity(intent)
}
override fun proceedToDeleteRecipient(receiverInfoV3Model: ReceiverInfoV3Model) {
override fun proceedToDeleteRecipient(receiverInfoV3Model: ReceiverInfoV3Model) {
showBeneficiaryDeleteConfirmDialog(receiverInfoV3Model)
}
@ -262,9 +266,9 @@ class MyTransfersFragment : BaseFragment(),
}
internal class SearchEditTextTextWatcher : TextWatcherAdapter() {
inner class SearchEditTextTextWatcher : TextWatcherAdapter() {
override fun onTextUpdated(text: String) {
// this.presenter.searchForReciever(text)
presenter?.searchForReciever(text)
}
}

110
app/src/main/java/com/remit/jmecustomer/features/userprofile/view/ProfileFragment.kt

@ -0,0 +1,110 @@
package com.remit.jmecustomer.features.userprofile.view
import android.content.Intent
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.remit.jmecustomer.R
import com.remit.jmecustomer.base.BaseFragment
import com.remit.jmecustomer.common.customwidgets.common.GenericPromptDialog
import com.remit.jmecustomer.common.customwidgets.common.GenericPromptDialog.GenericDialogPromptListener
import com.remit.jmecustomer.databinding.FragmentProfileBinding
import com.remit.jmecustomer.features.aboutscreen.view.AboutJMERemit
import com.remit.jmecustomer.features.customersupport.view.CustomerSupportFragment
import com.remit.jmecustomer.features.depositinfo.view.DepositInfo
import com.remit.jmecustomer.features.homeV3.view.HomeActivityV3
import com.remit.jmecustomer.features.homeV3.view.HomeFragmentV3
import com.remit.jmecustomer.features.loyaltypoints.view.LoyaltyPointsActivity
import com.remit.jmecustomer.features.mynotifications.view.MyNotificationActivity
import com.remit.jmecustomer.features.settings.view.SettingsView
import com.remit.jmecustomer.features.walletstatement.view.WalletStatementV2Activity
class ProfileFragment : BaseFragment(), View.OnClickListener {
private var _binding: FragmentProfileBinding? = null
private val binding get() = _binding!!
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
_binding = FragmentProfileBinding.inflate(inflater, container, false)
init()
return binding.root
}
fun init() {
binding.llPaymentLayout.setOnClickListener(this)
binding.llAboutUsLayout.setOnClickListener(this)
binding.llFaqLayout.setOnClickListener(this)
binding.rlLogout.setOnClickListener(this)
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
}
override fun onClick(view: View) {
when (view.id) {
R.id.ll_faq_layout -> {
val newFragment = CustomerSupportFragment.newInstance()
newFragment.show(requireActivity().supportFragmentManager, "dialog")
}
R.id.ll_about_us_layout -> startActivity(
Intent(
requireActivity(),
AboutJMERemit::class.java
)
)
R.id.view_setting -> startActivity(Intent(requireActivity(), SettingsView::class.java))
R.id.rl_logout -> {
showLogoutConfirmationDialog()
}
R.id.view_account_statement -> startActivity(
Intent(
requireActivity(),
WalletStatementV2Activity::class.java
)
)
R.id.iv_notification -> startActivity(
Intent(
requireActivity(),
MyNotificationActivity::class.java
)
)
R.id.ll_payment_layout -> startActivity(
Intent(
requireActivity(),
DepositInfo::class.java
)
)
R.id.view_loyalty_points -> startActivity(
Intent(
requireActivity(),
LoyaltyPointsActivity::class.java
)
)
}
}
private fun showLogoutConfirmationDialog() {
val genericPromptDialog = GenericPromptDialog()
genericPromptDialog.setTitleMessage(getString(R.string.logout_text))
genericPromptDialog.setBodyMessage(getString(R.string.logout_confirmation_text))
genericPromptDialog.setIconsRes(-1)
genericPromptDialog.setCancellable(true)
genericPromptDialog.setPositiveBtnString(getString(R.string.yes_text))
genericPromptDialog.setNegativeBtnString(getString(R.string.no_text))
genericPromptDialog.setListener(object : GenericDialogPromptListener {
override fun onNegativeBtnPressed() {}
override fun onPositiveBtnPressed() {
(requireActivity() as HomeActivityV3).performLogout()
}
})
if (!genericPromptDialog.isAdded) genericPromptDialog.show(
requireActivity().supportFragmentManager,
"PROMPTSENDMONEY"
)
}
}

13
app/src/main/res/drawable/banner_round_bg.xml

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<stroke android:width="1dp" android:color="#F4F4F4" />
<corners android:radius="@dimen/_6sdp" />
</shape>
</item>
</selector>

12
app/src/main/res/drawable/blue_dot.xml

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:dither="true"
android:shape="oval"
android:useLevel="true">
<size
android:width="10dp"
android:height="10dp" />
<solid android:color="@color/light_blue" />
</shape>

8
app/src/main/res/drawable/circle_bullet.xml

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
<solid android:color="@color/colorPrimary"/>
</shape>
</item>
</selector>

40
app/src/main/res/drawable/fingerprint_24px.xml

@ -0,0 +1,40 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M12,21a1,1 0,0 1,-1 -1V17a1,1 0,0 1,2 0v3A1,1 0,0 1,12 21Z"
android:fillColor="#2e89ff"/>
<path
android:pathData="M12,15a1,1 0,0 1,-1 -1V12a1,1 0,0 1,2 0v2A1,1 0,0 1,12 15Z"
android:strokeAlpha="0.35"
android:fillColor="#2e89ff"
android:fillAlpha="0.35"/>
<path
android:pathData="M8,21a1,1 0,0 1,-1 -1V14a1,1 0,0 1,2 0v6A1,1 0,0 1,8 21Z"
android:strokeAlpha="0.35"
android:fillColor="#2e89ff"
android:fillAlpha="0.35"/>
<path
android:pathData="M16,15a1,1 0,0 1,-1 -1V12a3,3 0,0 0,-5.812 -1.047,1 1,0 0,1 -1.875,-0.7A5,5 0,0 1,17 12v2A1,1 0,0 1,16 15Z"
android:fillColor="#2e89ff"/>
<path
android:pathData="M16,21a1,1 0,0 1,-1 -1V17a1,1 0,0 1,2 0v3A1,1 0,0 1,16 21Z"
android:strokeAlpha="0.35"
android:fillColor="#2e89ff"
android:fillAlpha="0.35"/>
<path
android:pathData="M4,20a1,1 0,0 1,-1 -1V16a1,1 0,0 1,2 0v3A1,1 0,0 1,4 20Z"
android:strokeAlpha="0.35"
android:fillColor="#2e89ff"
android:fillAlpha="0.35"/>
<path
android:pathData="M4,14a1,1 0,0 1,-1 -1V12a9.01,9.01 0,0 1,9 -9,8.9 8.9,0 0,1 4.039,0.955 1,1 0,1 1,-0.9 1.787A6.926,6.926 0,0 0,12 5a7.009,7.009 0,0 0,-7 7v1A1,1 0,0 1,4 14Z"
android:fillColor="#2e89ff"/>
<path
android:pathData="M20,20a1,1 0,0 1,-1 -1V12a6.949,6.949 0,0 0,-1.348 -4.131A1,1 0,1 1,19.267 6.69,8.936 8.936,0 0,1 21,12v7A1,1 0,0 1,20 20Z"
android:strokeAlpha="0.35"
android:fillColor="#2e89ff"
android:fillAlpha="0.35"/>
</vector>

10
app/src/main/res/drawable/grey_border_dark_indicator.xml

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
<stroke android:width="@dimen/_1sdp" android:color="@color/black_opacity_38" />
<corners android:radius="@dimen/_2sdp" />
<solid android:color="@color/black_opacity_38" />
</shape>
</item>
</selector>

24
app/src/main/res/drawable/ic_language.xml

@ -0,0 +1,24 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M16,8V4a2,2 0,0 0,-2 -2H4A2,2 0,0 0,2 4V14a2,2 0,0 0,2 2H8Z"
android:strokeAlpha="0.35"
android:fillColor="#2e89ff"
android:fillAlpha="0.35"/>
<path
android:pathData="M15.993,18.373l-0.17,-0.728L14.074,17.645l-0.17,0.728a0.843,0.843 0,0 1,-0.829 0.639h0A0.826,0.826 0,0 1,12.25 18l1.376,-5.455a1.4,1.4 0,0 1,1.365 -1.034h0a1.4,1.4 0,0 1,1.366 1.035L17.725,18a0.826,0.826 0,0 1,-0.826 1.01h-0.078A0.844,0.844 0,0 1,15.993 18.373ZM14.976,13.143h-0.044l-0.659,3.188L15.6,16.331Z"
android:strokeAlpha="0.35"
android:fillColor="#2e89ff"
android:fillAlpha="0.35"/>
<path
android:pathData="M14.976,13.143l0.627,3.188L14.272,16.331l0.659,-3.188ZM22,10L22,20a2,2 0,0 1,-2 2L10,22a2,2 0,0 1,-2 -2L8,16l8,-8h4A2,2 0,0 1,22 10ZM17.726,18 L16.358,12.546a1.418,1.418 0,0 0,-2.731 0L12.251,18a0.826,0.826 0,0 0,0.826 1.011,0.843 0.843,0 0,0 0.829,-0.639l0.17,-0.728h1.749l0.17,0.728a0.843,0.843 0,0 0,0.829 0.639L16.9,19.011A0.826,0.826 0,0 0,17.726 18Z"
android:fillColor="#2e89ff"/>
<path
android:pathData="M11.09,6.941L9.829,6.941v5.708L9.145,12.649L9.145,9.257L7.306,9.257a0.148,0.148 0,0 0,-0.148 0.078,0.5 0.5,0 0,0 -0.038,0.214v0.4a0.467,0.467 0,0 1,-0.01 0.073,0.336 0.336,0 0,1 -0.045,0.111 0.319,0.319 0,0 1,-0.1 0.1,0.318 0.318,0 0,1 -0.176,0.043 0.831,0.831 0,0 1,-0.3 -0.063,1.744 1.744,0 0,1 -0.322,-0.168A2.321,2.321 0,0 1,5.857 9.8a2.254,2.254 0,0 1,-0.264 -0.291A1.561,1.561 0,0 1,5.41 9.2a0.726,0.726 0,0 1,-0.068 -0.294,0.332 0.332,0 0,1 0.093,-0.241 0.373,0.373 0,0 1,0.279 -0.1L9.145,8.565L9.145,6.941L5,6.941v-0.683L11.09,6.258ZM9.17,6.313a4.969,4.969 0,0 0,-0.214 -0.824,2.976 2.976,0 0,0 -0.369,-0.729 1.924,1.924 0,0 0,-0.535 -0.52,1.278 1.278,0 0,0 -0.706,-0.2 1.985,1.985 0,0 0,-0.337 0.028,2.058 2.058,0 0,0 -0.382,0.113l-0.236,-0.668a2.4,2.4 0,0 1,0.45 -0.123,2.889 2.889,0 0,1 0.48,-0.038 1.9,1.9 0,0 1,0.869 0.2,2.269 2.269,0 0,1 0.721,0.588 3.649,3.649 0,0 1,0.548 0.932,6.007 6.007,0 0,1 0.354,1.236Z"
android:strokeWidth="1"
android:fillColor="#2e89ff"
android:strokeColor="#2e89ff"/>
</vector>

BIN
app/src/main/res/drawable/ico_profile.png

After

Width: 319  |  Height: 319  |  Size: 20 KiB

17
app/src/main/res/drawable/phonelink_lock_24px.xml

@ -0,0 +1,17 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M12,15m-9,0a9,9 0,1 1,18 0a9,9 0,1 1,-18 0"
android:strokeAlpha="0.35"
android:fillColor="#2e89ff"
android:fillAlpha="0.35"/>
<path
android:pathData="M12,13a2,2 0,1 0,2 2A2,2 0,0 0,12 13Z"
android:fillColor="#2e89ff"/>
<path
android:pathData="M8.006,6.944a3.994,3.994 0,0 1,7.988 0A9.023,9.023 0,0 1,18 8.3L18,7A6,6 0,0 0,6 7L6,8.3A9.023,9.023 0,0 1,8.006 6.944Z"
android:fillColor="#2e89ff"/>
</vector>

25
app/src/main/res/drawable/round_help_24px.xml

@ -0,0 +1,25 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M20,11l-0,10l-8,0l-0,-10z"
android:strokeAlpha="0.35"
android:fillColor="#2e89ff"
android:fillAlpha="0.35"/>
<path
android:pathData="M15.942,13.74l-0.677,3.4h1.367l-0.644,-3.4Z"
android:fillColor="#2e89ff"/>
<path
android:pathData="M19,10H13a3,3 0,0 0,-3 3v6a3,3 0,0 0,3 3h6a3,3 0,0 0,3 -3V13A3,3 0,0 0,19 10ZM17.964,20h-0.08a0.874,0.874 0,0 1,-0.852 -0.681l-0.175,-0.776h-1.8l-0.175,0.776a0.872,0.872 0,1 1,-1.7 -0.4L14.6,13.1a1.443,1.443 0,0 1,2.8 0l1.405,5.818A0.873,0.873 0,0 1,17.964 20Z"
android:fillColor="#2e89ff"/>
<path
android:pathData="M2,11V5A3,3 0,0 1,5 2h6a3,3 0,0 1,3 3v6a3,3 0,0 1,-3 3H5A3,3 0,0 1,2 11Z"
android:strokeAlpha="0.35"
android:fillColor="#2e89ff"
android:fillAlpha="0.35"/>
<path
android:pathData="M7.938,12C5.069,12 5,8.677 5,8.06S5.134,4 7.993,4c2.827,0 2.972,3.389 2.972,3.983a3.5,3.5 0,0 1,-0.847 2.5v0.044l0.471,-0.017a0.745,0.745 0,0 1,0.772 0.745h0a0.746,0.746 0,0 1,-0.746 0.746ZM9.192,8.066c0,-0.331 -0.044,-2.339 -1.189,-2.339s-1.2,2 -1.2,2.339 0.011,2.349 1.2,2.349S9.192,8.389 9.192,8.066Z"
android:fillColor="#2e89ff"/>
</vector>

23
app/src/main/res/drawable/round_perm_phone_msg_24px.xml

@ -0,0 +1,23 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M9.501,2A7.488,7.488 0,0 0,2.783 12.82l-0.754,3.014a0.937,0.937 0,0 0,1.137 1.137l3.014,-0.754A7.5,7.5 0,1 0,9.501 2Z"
android:strokeAlpha="0.35"
android:fillColor="#2e89ff"
android:fillAlpha="0.35"/>
<path
android:pathData="M20.851,16.35l1.121,4.484a0.937,0.937 0,0 1,-1.137 1.137L16.351,20.85Z"
android:fillColor="#2e89ff"/>
<path
android:pathData="M16.678,7.323a7.5,7.5 0,0 1,-9.354 9.354,7.5 7.5,0 1,0 9.354,-9.354Z"
android:fillColor="#2e89ff"/>
<path
android:pathData="M13.001,9L7.001,9A1,1 0,0 1,7.001 7h6a1,1 0,0 1,0 2Z"
android:fillColor="#2e89ff"/>
<path
android:pathData="M11.001,13L7.001,13a1,1 0,0 1,0 -2h4a1,1 0,0 1,0 2Z"
android:fillColor="#2e89ff"/>
</vector>

14
app/src/main/res/drawable/round_person_24px.xml

@ -0,0 +1,14 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M12,8m-5,0a5,5 0,1 1,10 0a5,5 0,1 1,-10 0"
android:strokeAlpha="0.35"
android:fillColor="#2e89ff"
android:fillAlpha="0.35"/>
<path
android:pathData="M18,16L6,16a3,3 0,0 0,0 6L18,22a3,3 0,0 0,0 -6Z"
android:fillColor="#2e89ff"/>
</vector>

27
app/src/main/res/layout/banner_item.xml

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/offerItemImgViewParent"
android:layout_width="match_parent"
android:layout_height="@dimen/_85sdp"
android:layout_marginLeft="@dimen/_3ssp"
android:layout_marginRight="@dimen/_3ssp"
android:background="@drawable/banner_round_bg"
android:elevation="0dp"
android:outlineProvider="background"
android:padding="0dp"
tools:ignore="UnusedAttribute">
<ImageView
android:id="@+id/offerItemImgView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="1dp"
android:layout_marginBottom="1dp"
android:clickable="true"
android:focusable="true"
android:scaleType="fitXY"
>
<!--1:0.3 Aspect Ratio used-->
</ImageView>
</LinearLayout>

35
app/src/main/res/layout/banner_view_layout.xml

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/_4sdp"
android:gravity="center_horizontal"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/offerTabRecyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:orientation="horizontal"
android:paddingLeft="@dimen/_5sdp"
android:paddingRight="@dimen/_5sdp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<me.relex.circleindicator.CircleIndicator2
android:id="@+id/indicator"
android:layout_width="match_parent"
android:layout_height="@dimen/_16sdp"
android:gravity="center"
android:paddingBottom="@dimen/_4sdp"
app:ci_drawable="@drawable/circle_bullet"
app:ci_drawable_unselected="@drawable/grey_border_dark_indicator" />
<!-- <com.swifttechnology.imepay.Views.Components.BannerView
android:id="@+id/offerTabRecyclerView"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />-->
</LinearLayout>

36
app/src/main/res/layout/fragment_home_new.xml

@ -155,7 +155,7 @@
android:layout_width="@dimen/_30sdp"
android:layout_height="@dimen/_30sdp"
android:layout_marginRight="@dimen/_40sdp"
android:src="@drawable/flag_nepal"
android:src="@drawable/flag_japan"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_currency"
@ -362,5 +362,39 @@
android:layout_height="wrap_content"
android:src="@drawable/ic_arrow_right" />
</RelativeLayout>
<LinearLayout
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/agreeButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/_14sdp"
android:gravity="center_horizontal"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/bannerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:orientation="horizontal"
android:paddingLeft="@dimen/_5sdp"
android:paddingRight="@dimen/_5sdp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<me.relex.circleindicator.CircleIndicator2
android:id="@+id/indicator"
android:layout_width="match_parent"
android:layout_height="@dimen/_16sdp"
android:gravity="center"
android:paddingBottom="@dimen/_4sdp"
app:ci_drawable="@drawable/circle_bullet"
app:ci_drawable_unselected="@drawable/grey_border_dark_indicator"/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>

632
app/src/main/res/layout/fragment_profile.xml

@ -0,0 +1,632 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/swipeRefreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:scrollbars="none">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/_13sdp"
android:visibility="visible">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/fl_profile_image"
android:layout_width="@dimen/_80sdp"
android:layout_height="@dimen/_80sdp"
android:layout_centerHorizontal="true">
<ImageView
android:id="@+id/iv_profile_image"
android:layout_width="@dimen/_80sdp"
android:layout_height="@dimen/_80sdp"
android:src="@drawable/ico_profile"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:visibility="gone"
android:id="@+id/iv_edit_profile_image"
android:layout_width="@dimen/_30sdp"
android:layout_height="@dimen/_30sdp"
android:layout_gravity="bottom|center"
android:padding="@dimen/_6sdp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:srcCompat="@drawable/ic_edit" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/ll_customerName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/fl_profile_image"
android:layout_marginTop="@dimen/_12sdp"
android:layout_marginBottom="@dimen/_2sdp">
<TextView
app:layout_constraintTop_toTopOf="parent"
android:id="@+id/customerName"
style="@style/TextStyle.SemiBold20"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:textAlignment="center"
android:textColor="@color/black_opacity_87"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:text="Test Name" />
<ImageView
android:id="@+id/iv_kycStatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center"
android:layout_marginLeft="@dimen/_4sdp"
android:layout_marginTop="@dimen/_1sdp"
app:layout_constraintBottom_toBottomOf="@+id/customerName"
app:layout_constraintStart_toEndOf="@+id/customerName"
app:layout_constraintTop_toTopOf="@+id/customerName"
app:srcCompat="@drawable/ic_verified_doc" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id="@+id/ll_phone_email_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/ll_customerName"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:id="@+id/customerMsisdn"
style="@style/TextStyle.VolteSemiBold14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="center"
android:textColor="@color/black_opacity_60"
tools:text="CS12345678" />
<TextView
android:id="@+id/divider"
style="@style/TextStyle.VolteSemiBold14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/_4sdp"
android:layout_marginRight="@dimen/_4sdp"
android:text="|"
android:textAlignment="center"
android:textColor="@color/black_opacity_60"
android:visibility="gone" />
<TextView
android:id="@+id/customerEmail"
style="@style/TextStyle.VolteSemiBold14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:textAlignment="center"
android:textColor="@color/black_opacity_60"
tools:text="test@swifttech.com.np" />
<ImageView
android:id="@+id/iv_imageEmailVerified"
android:layout_width="@dimen/_12sdp"
android:layout_height="@dimen/_12sdp"
android:src="@drawable/ic_kyc_non_verified_userstatus"
android:visibility="gone" />
</LinearLayout>
<LinearLayout
android:layout_below="@+id/ll_phone_email_layout"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<View
android:layout_marginTop="@dimen/_20sdp"
android:layout_width="match_parent"
android:layout_height="@dimen/_6sdp"
android:background="#F5F5F5"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
style="@style/TextStyle.VolteSemiBold14"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/_12sdp"
android:layout_marginLeft="@dimen/_12sdp"
android:layout_marginTop="@dimen/_6sdp"
android:text="Account"
android:textColor="#969696" />
<RelativeLayout
android:id="@+id/ll_payment_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:orientation="horizontal"
android:padding="@dimen/_13sdp"
android:visibility="visible">
<ImageView
android:id="@+id/ic_nominee"
android:layout_width="@dimen/_20sdp"
android:layout_height="@dimen/_20sdp"
app:srcCompat="@drawable/round_person_24px" />
<LinearLayout
android:layout_toEndOf="@+id/ic_nominee"
android:layout_toRightOf="@+id/ic_nominee"
android:layout_marginStart="@dimen/_26sdp"
android:layout_marginLeft="@dimen/_26sdp"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
style="@style/TextStyle.SemiBold16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Payment Information"
android:textColor="@color/black_opacity_87" />
<TextView
android:id="@+id/tv_applockDesc"
style="@style/TextStyle.VolteSemiBold14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/_4sdp"
android:layout_marginRight="@dimen/_2sdp"
android:layout_toEndOf="@+id/ic_lock_app"
android:layout_toRightOf="@+id/ic_lock_app"
android:text="View orupdate linked cards"
android:textColor="@color/black_opacity_60" />
</LinearLayout>
<TextView
android:id="@+id/tv_add_nominee"
style="@style/TextStyle.VolteSemiBold14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:paddingLeft="@dimen/_5sdp"
android:paddingRight="@dimen/_5sdp"
android:textAllCaps="true"
android:textColor="@color/colorPrimary" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/ll_language"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:orientation="horizontal"
android:padding="@dimen/_13sdp"
android:visibility="visible">
<ImageView
android:id="@+id/ic_language"
android:layout_width="@dimen/_20sdp"
android:layout_height="@dimen/_20sdp"
app:srcCompat="@drawable/ic_language" />
<LinearLayout
android:layout_toEndOf="@+id/ic_language"
android:layout_toRightOf="@+id/ic_language"
android:layout_marginStart="@dimen/_26sdp"
android:layout_marginLeft="@dimen/_26sdp"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
style="@style/TextStyle.SemiBold16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Language Selection"
android:textColor="@color/black_opacity_87" />
\
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:id="@+id/ll_change_pin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:orientation="horizontal"
android:padding="@dimen/_13sdp"
android:visibility="visible">
<ImageView
android:id="@+id/ic_change_pin"
android:layout_width="@dimen/_20sdp"
android:layout_height="@dimen/_20sdp"
app:srcCompat="@drawable/round_person_24px" />
<LinearLayout
android:layout_toEndOf="@+id/ic_change_pin"
android:layout_toRightOf="@+id/ic_change_pin"
android:layout_marginStart="@dimen/_26sdp"
android:layout_marginLeft="@dimen/_26sdp"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
style="@style/TextStyle.SemiBold16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Change Account Pin"
android:textColor="@color/black_opacity_87" />
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:id="@+id/enableLockScreenLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:orientation="horizontal"
android:paddingLeft="@dimen/_13sdp"
android:paddingTop="@dimen/_13sdp"
android:paddingBottom="@dimen/_10sdp"
android:visibility="visible">
<ImageView
android:id="@+id/ic_lock_app"
android:layout_width="@dimen/_20sdp"
android:layout_height="@dimen/_20sdp"
android:layout_centerVertical="true"
app:srcCompat="@drawable/phonelink_lock_24px" />
<TextView
android:id="@+id/tv_title"
style="@style/TextStyle.VolteSemiBold16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/_26sdp"
android:layout_marginLeft="@dimen/_26sdp"
android:layout_toEndOf="@+id/ic_lock_app"
android:layout_toRightOf="@+id/ic_lock_app"
android:text="Lock app"
android:textColor="@color/black_opacity_87" />
<TextView
android:id="@+id/tv_applockDetail"
style="@style/TextStyle.VolteSemiBold14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tv_title"
android:layout_marginStart="@dimen/_26sdp"
android:layout_marginLeft="@dimen/_26sdp"
android:layout_marginTop="@dimen/_4sdp"
android:layout_marginRight="@dimen/_2sdp"
android:layout_toEndOf="@+id/ic_lock_app"
android:layout_toRightOf="@+id/ic_lock_app"
android:text="Ask verification for opening"
android:textColor="@color/black_opacity_60" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/enableLock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerInParent="true"
android:layout_marginRight="@dimen/_4sdp"
android:layout_toRightOf="@id/tv_applockDetail"
android:checked="false"
android:textAppearance="?android:attr/textAppearanceMedium"
android:theme="@style/SwitchTheme" />
</RelativeLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/fingerprintLockScreen"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:orientation="horizontal"
android:paddingLeft="@dimen/_13sdp"
android:paddingTop="@dimen/_13sdp"
android:paddingBottom="@dimen/_10sdp"
android:visibility="visible">
<ImageView
android:id="@+id/ic_fingerPrint"
android:layout_width="@dimen/_20sdp"
android:layout_height="@dimen/_20sdp"
android:layout_centerVertical="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/fingerprint_24px" />
<TextView
android:id="@+id/textView11"
style="@style/TextStyle.VolteSemiBold14"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_below="@id/tv_title_1"
android:layout_marginTop="@dimen/_3sdp"
android:layout_marginEnd="@dimen/_3sdp"
android:layout_toStartOf="@+id/enableFingerPrint"
android:layout_toLeftOf="@+id/enableFingerPrint"
android:layout_toEndOf="@+id/ic_fingerPrint"
android:layout_toRightOf="@+id/ic_fingerPrint"
android:text="Use fingerprint for payment"
android:textColor="@color/black_opacity_60"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/enableFingerPrint"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="@+id/tv_title_1"
app:layout_constraintTop_toBottomOf="@+id/tv_title_1" />
<TextView
android:id="@+id/tv_title_1"
style="@style/TextStyle.VolteSemiBold16"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/_26sdp"
android:layout_toEndOf="@+id/ic_fingerPrint"
android:layout_toRightOf="@+id/ic_fingerPrint"
android:text="Enable Biometrics"
android:textColor="@color/black_opacity_87"
app:layout_constraintBottom_toTopOf="@+id/textView11"
app:layout_constraintEnd_toStartOf="@+id/enableFingerPrint"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/ic_fingerPrint"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/enableFingerPrint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerInParent="true"
android:checked="false"
android:textAppearance="?android:attr/textAppearanceMedium"
android:theme="@style/SwitchTheme"
app:layout_constraintBottom_toBottomOf="@+id/ic_fingerPrint"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/ic_fingerPrint" />
</androidx.constraintlayout.widget.ConstraintLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/_6sdp"
android:background="#F5F5F5"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
style="@style/TextStyle.VolteSemiBold14"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/_12sdp"
android:layout_marginLeft="@dimen/_12sdp"
android:layout_marginTop="@dimen/_6sdp"
android:text="Support"
android:textColor="#969696" />
<!-- FAQs Layout Start -->
<RelativeLayout
android:id="@+id/ll_faq_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="horizontal"
android:padding="@dimen/_13sdp"
android:visibility="visible">
<ImageView
android:id="@+id/ic_profile_faq"
android:layout_width="@dimen/_20sdp"
android:layout_height="@dimen/_20sdp"
app:srcCompat="@drawable/round_help_24px" />
<TextView
style="@style/TextStyle.SemiBold16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/_26sdp"
android:layout_marginLeft="@dimen/_26sdp"
android:layout_toEndOf="@+id/ic_profile_faq"
android:layout_toRightOf="@+id/ic_profile_faq"
android:text="Faqs"
android:textColor="@color/black_opacity_87" />
</RelativeLayout>
<!-- FAQs Layout End -->
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="@dimen/_60sdp"
android:layout_marginLeft="@dimen/_60sdp"
android:background="@color/grey_stripe"
android:visibility="gone" />
<!-- Contact Us Layout Start -->
<RelativeLayout
android:id="@+id/ll_contact_us_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="horizontal"
android:padding="@dimen/_13sdp"
android:visibility="visible">
<ImageView
android:id="@+id/ic_profile_contact_us"
android:layout_width="@dimen/_20sdp"
android:layout_height="@dimen/_20sdp"
app:srcCompat="@drawable/round_help_24px" />
<TextView
style="@style/TextStyle.VolteSemiBold16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/_26sdp"
android:layout_marginLeft="@dimen/_26sdp"
android:layout_toEndOf="@+id/ic_profile_contact_us"
android:layout_toRightOf="@+id/ic_profile_contact_us"
android:text="Contact us"
android:textColor="@color/black_opacity_87" />
</RelativeLayout>
<!-- Contact Us Layout End -->
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="@dimen/_60sdp"
android:layout_marginLeft="@dimen/_60sdp"
android:background="@color/grey_stripe"
android:visibility="gone" />
<!-- About Us Layout Start -->
<RelativeLayout
android:id="@+id/ll_about_us_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="horizontal"
android:padding="@dimen/_13sdp"
android:visibility="visible">
<ImageView
android:id="@+id/ic_information"
android:layout_width="@dimen/_20sdp"
android:layout_height="@dimen/_20sdp"
app:srcCompat="@drawable/sm_about_gme" />
<TextView
style="@style/TextStyle.VolteSemiBold16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/_26sdp"
android:layout_marginLeft="@dimen/_26sdp"
android:layout_toEndOf="@+id/ic_information"
android:layout_toRightOf="@+id/ic_information"
android:text="About Us"
android:textColor="@color/black_opacity_87" />
</RelativeLayout>
<!-- Contact Us Layout End -->
<View
android:layout_width="match_parent"
android:layout_height="4dp"
android:background="@color/grey_stripe" />
<RelativeLayout
android:id="@+id/rl_logout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/_13sdp">
<TextView
android:id="@+id/tv_logout"
style="@style/TextStyle.VolteSemiBold14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginStart="@dimen/_26sdp"
android:layout_marginLeft="@dimen/_26sdp"
android:text="Log out"
android:textAllCaps="true"
android:textColor="@color/colorPrimary" />
</RelativeLayout>
<!-- Privacy Policy Layout Start -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/_63sdp"
android:layout_gravity="center"
android:background="@color/profile_background_color"
android:gravity="center"
android:paddingTop="@dimen/_10sdp">
<TextView
android:id="@+id/tv_privacy_policy"
style="@style/TextStyle.VolteSemiBold12"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginEnd="@dimen/_6sdp"
android:layout_marginRight="@dimen/_6sdp"
android:layout_toStartOf="@+id/dot_layout"
android:layout_toLeftOf="@+id/dot_layout"
android:text="Privacy Policy"
android:textColor="@color/black_opacity_60" />
<ImageView
android:id="@+id/dot_layout"
android:layout_width="@dimen/_8sdp"
android:layout_height="@dimen/_8sdp"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/_4sdp"
android:src="@drawable/blue_dot" />
<TextView
android:id="@+id/tv_term_and_condition"
style="@style/TextStyle.VolteSemiBold12"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/_6sdp"
android:layout_marginLeft="@dimen/_6sdp"
android:layout_toEndOf="@+id/dot_layout"
android:layout_toRightOf="@+id/dot_layout"
android:text="@string/terms_of_service_new"
android:textColor="@color/black_opacity_60" />
</RelativeLayout>
<!-- Privacy Policy Layout Start -->
</LinearLayout>
</RelativeLayout>
</ScrollView>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

1
app/src/main/res/layout/row_fragment_beneficiaries.xml

@ -2,6 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/const_main"
android:layout_marginEnd="@dimen/_10sdp"
xmlns:app="http://schemas.android.com/apk/res-auto">

3
app/src/main/res/values/colors.xml

@ -80,4 +80,7 @@
<color name="light_blue_10">#1A0052FF</color>
<color name="light_grey">#0000001F</color>
<color name="round_button_color">#CC0000</color>
<color name="buttonRippleColor">#70e2cecf</color>
<color name="grey_stripe">#e0f4f4f4</color>
<color name="profile_background_color">#F5F5F5</color>
</resources>

1
app/src/main/res/values/strings.xml

@ -661,4 +661,5 @@
<string name="id_number_hint_text" translatable="false">ID Number</string>
<string name="driver_license_hint_text" translatable="false">Driving License</string>
<string name="invalid_driver_license_text" translatable="false">Invalid Driving License</string>
<string name="terms_of_service_new"><![CDATA[Terms & Consitions]]></string>
</resources><!---->

10
app/src/main/res/values/styles.xml

@ -21,6 +21,15 @@
<item name="windowNoTitle">true</item>
</style>
<style name="SwitchTheme" parent="Theme.AppCompat.Light">
<item name="colorPrimary">@color/light_blue</item>
<item name="colorPrimaryDark">@color/light_blue</item>
<item name="colorAccent">@color/light_blue</item>
</style>
<style name="editetxtsingleline" parent="@android:style/Widget.EditText">
<item name="android:singleLine">true</item>
<item name="android:imeOptions">actionNext</item>
@ -452,6 +461,7 @@
</style>
<!--edit text style-->
<style name="edt_style">
<item name="android:layout_height">wrap_content</item>

Loading…
Cancel
Save