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 5ce01bd..7c7b9d4 100644 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/MerchantsFragment.kt +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/MerchantsFragment.kt @@ -210,7 +210,7 @@ class MerchantsFragment : Fragment(), OnMapReadyCallback { override fun getInfoWindow(marker: Marker?): View { val infoWindowLayout: View = LayoutInflater.from(context).inflate( - R.layout.map_pin_info_dialog, null) + R.layout.marker_info_window, null) val tvName = infoWindowLayout.findViewById(R.id.tvName) val tvAddress = infoWindowLayout.findViewById(R.id.tvAddress) val tvPhone = infoWindowLayout.findViewById(R.id.tvPhone) @@ -230,9 +230,10 @@ class MerchantsFragment : Fragment(), OnMapReadyCallback { else tvPhone.visibility = View.GONE - if (selectedMerchant?.telegram != null) - tvTelegram.text = selectedMerchant?.telegram - else + if (selectedMerchant?.telegram != null) { + val telegram = "Telegram: ${selectedMerchant?.telegram}" + tvTelegram.text = telegram + } else tvTelegram.visibility = View.GONE if (selectedMerchant?.website != null) diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/utils/Extensions.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/utils/Extensions.kt index 3d80e05..340a2ff 100644 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/utils/Extensions.kt +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/utils/Extensions.kt @@ -29,7 +29,7 @@ fun FloatingActionButton.disable(colorResource: Int) { /** * Easily create a toast message with less boilerplate code */ -fun Context.toast(message: CharSequence, duration: Int = Toast.LENGTH_LONG) { +fun Context.toast(message: CharSequence, duration: Int = Toast.LENGTH_SHORT) { Toast.makeText(this, message, duration).show() } diff --git a/app/src/main/res/drawable/marker_info_window_background.xml b/app/src/main/res/drawable/marker_info_window_background.xml new file mode 100644 index 0000000..22431b1 --- /dev/null +++ b/app/src/main/res/drawable/marker_info_window_background.xml @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/map_pin_info_dialog.xml b/app/src/main/res/layout/marker_info_window.xml similarity index 94% rename from app/src/main/res/layout/map_pin_info_dialog.xml rename to app/src/main/res/layout/marker_info_window.xml index 5612a03..29afe3b 100644 --- a/app/src/main/res/layout/map_pin_info_dialog.xml +++ b/app/src/main/res/layout/marker_info_window.xml @@ -5,8 +5,8 @@ android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" - android:padding="4dp" - android:background="?android:colorBackground"> + android:padding="12dp" + android:background="@drawable/marker_info_window_background">