From 8aab7c03ac2ee9b9f50f0da3f7fff084befcdc35 Mon Sep 17 00:00:00 2001 From: Severiano Jaramillo Date: Sat, 26 Jan 2019 16:25:59 -0600 Subject: [PATCH] Added a dialog to explain what merchants and tellers are, which is opened in from the About option in the Merchants & Tellers's popup menu. --- .../fragments/MerchantsFragment.kt | 10 +++-- .../layout/dialog_merchants_tellers_info.xml | 37 +++++++++++++++++++ app/src/main/res/values-es/strings.xml | 2 + app/src/main/res/values/strings.xml | 2 + 4 files changed, 47 insertions(+), 4 deletions(-) create mode 100644 app/src/main/res/layout/dialog_merchants_tellers_info.xml diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/MerchantsFragment.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/MerchantsFragment.kt index 735af9f..189ad39 100644 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/MerchantsFragment.kt +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/MerchantsFragment.kt @@ -21,6 +21,7 @@ import androidx.core.content.ContextCompat import androidx.lifecycle.Observer import androidx.lifecycle.ViewModelProviders import com.afollestad.materialdialogs.MaterialDialog +import com.afollestad.materialdialogs.customview.customView import com.google.android.gms.maps.CameraUpdateFactory import com.google.android.gms.maps.model.* import com.google.maps.android.MarkerManager @@ -69,7 +70,7 @@ class MerchantsFragment : Fragment(), OnMapReadyCallback { private var merchants = ArrayList() private var tellers = ArrayList() private var showMerchantsMarkers = true - private var showTellerMarkers = false + private var showTellerMarkers = true override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { setHasOptionsMenu(true) @@ -116,9 +117,10 @@ class MerchantsFragment : Fragment(), OnMapReadyCallback { val tvAbout = popupView?.findViewById(R.id.tvAbout) tvAbout?.setOnClickListener { val context = context ?: return@setOnClickListener - MaterialDialog(context) - .message(text = "Anything") - .show() + MaterialDialog(context).show { + customView(R.layout.dialog_merchants_tellers_info, scrollable = true) + positiveButton(android.R.string.ok) { dismiss() } + } } mPopupWindow = PopupWindow(popupView, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT) diff --git a/app/src/main/res/layout/dialog_merchants_tellers_info.xml b/app/src/main/res/layout/dialog_merchants_tellers_info.xml new file mode 100644 index 0000000..1a505f1 --- /dev/null +++ b/app/src/main/res/layout/dialog_merchants_tellers_info.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index d1081da..e3780c1 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -62,6 +62,8 @@ Comerciantes Tellers Acerca de + Los comerciantes PalmPay son la columna vertebral de la nueva economía Cripto. Si estás buscando por negocios que acepten Criptomonedas, entonces sólo usa la función de búsqueda o el mapa de abajo. Más comerciantes serán agregados aquí conforme los Embajadores PalmPay nos informen. + Los Tellers son personas que intercambian tu dinero en moneda fiduciaria a criptomonedas, y viceversa. Ellos también apoyan a los Comerciantes a cambiar sus Criptomonedas a moneda fiduciaria. El permiso de localización es necesario para mostrar tu ubicación actual en el mapa. diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e9959e4..0123e2a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -62,6 +62,8 @@ Merchants Tellers About + PalmPay merchants are the backbone of the new Crypto Economy. If you are looking for businesses that will accept your Cryptocurrency, then just use the Search and Map data below. More merchants will be added here as the PalmPay Ambassadors inform us. + Tellers are people who will exchange your fiat currencies with cryptocurrencies, and vice versa. They also assist Merchants with fiat settlement. Location permission is necessary to show your current location on the map.