diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/HomeFragment.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/HomeFragment.kt
index 4c7c434..665310b 100644
--- a/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/HomeFragment.kt
+++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/HomeFragment.kt
@@ -38,9 +38,13 @@ class HomeFragment : Fragment() {
val toolbar: Toolbar? = activity?.findViewById(R.id.toolbar)
toolbar?.navigationIcon = resources.getDrawable(R.drawable.ic_bitsy_logo_2, null)
toolbar?.setBackgroundResource(if (!nightMode) R.color.colorPrimary else R.color.colorToolbarDark)
+ toolbar?.visibility = View.VISIBLE
- // Sets the status bar background color to a primaryColorDark
+ // Makes sure the Navigation and Status bar are not translucent after returning from the MerchantsFragment
val window = activity?.window
+ window?.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION)
+ window?.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS)
+ // Sets the status bar background color to a primaryColorDark
window?.statusBarColor = ContextCompat.getColor(context!!,
if (!nightMode) R.color.colorPrimaryDark else R.color.colorStatusBarDark)
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 1453506..5885644 100644
--- a/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/MerchantsFragment.kt
+++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/MerchantsFragment.kt
@@ -106,6 +106,12 @@ class MerchantsFragment : Fragment(), OnMapReadyCallback, SearchView.OnSuggestio
// Get a reference to the toolbar, to correctly place the merchants and tellers popup menu
mToolbar = activity?.findViewById(R.id.toolbar)
+ mToolbar?.visibility = View.GONE
+
+ // Sets the Navigation and Status bars translucent so that the map can be viewed through them
+ val window = activity?.window
+ window?.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION)
+ window?.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS)
return inflater.inflate(R.layout.fragment_merchants, container, false)
}
@@ -326,6 +332,10 @@ class MerchantsFragment : Fragment(), OnMapReadyCallback, SearchView.OnSuggestio
override fun onMapReady(googleMap: GoogleMap) {
mMap = googleMap
+ // Add padding to move the controls out of the toolbar/status bar and navigation bar.
+ // TODO might be necessary to convert dp to pixels
+ mMap.setPadding(0, 200, 0, 100)
+
applyMapTheme()
verifyLocationPermission()
diff --git a/app/src/main/res/layout/fragment_merchants.xml b/app/src/main/res/layout/fragment_merchants.xml
index d040243..c85e810 100644
--- a/app/src/main/res/layout/fragment_merchants.xml
+++ b/app/src/main/res/layout/fragment_merchants.xml
@@ -1,15 +1,35 @@
-
\ No newline at end of file
+ android:orientation="vertical"
+ tools:context=".activities.MainActivity">
+
+
+
+
+
+
+
\ No newline at end of file