2

I am using Admobs UMP to generate a GDPR EU Consent message: https://developers.google.com/interactive-media-ads/ump/android/quick-start

Here is the dialog in my app:enter image description here

I want to change the color of Bottom Navigation Bar (shown in the photo with blue arrows) to gray color to match it with the app's styling. It is white by default and it ruins the app styling. How can I make it gray?

cs guy
  • 926
  • 2
  • 13
  • 33

1 Answers1

1

That does not seem to be supported in any way by the UMP library alone.

So you might have to change the color first, then call your UMP screen, to see if that would give you the expected effect.

Something like this answer, but applied to the all bar:

val bottomNavigationView = findViewById<BottomNavigationView>(R.id.bottomNavigationView)

// Get the color resource ID for the desired color.
val colorResId = R.color.gray
// Set the bottom navigation bar color.
bottomNavigationView.setBackgroundColor(ContextCompat.getColor(this, colorResId))

// Then call your UMP dialog
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • My app launches with a gray bottom navigation bar. When UMP is displayed bottom navigation bar turns white and after closing UMP, bottom navigation bar becomes gray again so I don't think that this is the right approach – cs guy Jul 26 '23 at 16:27
  • @csguy That is unfortunate. You would need to make a feature request to that UMP library if it is confirmed, as I mention in the answer, that changing the color of the bottom bar is not supported. – VonC Jul 26 '23 at 16:56