Button on top of Android Map

Is it possible to put a button on top of an Android MapView?

<App>
	<Panel>
		<NativeViewHost>
			<Basic.Button Text="Click me" Height="30">
				<Clicked>
					<DebugAction Message="Clicked" />
				</Clicked>
			</Basic.Button>
			<MapView />
		</NativeViewHost>
	</Panel>
</App>

This works on iOS but not on Android.

Hi @bolav,

this looks like something that indeed should work. Or, at least behave the same on both platforms.

Is it only Basic.Button that has this problem, or is it the same with regular panels too?

Also, which Fuse version are you on? And did it work differently before?

As far as i know this is not possible (as long as you want the NativeViewHost to be active).

In my app I had to show a popup on top of the map and i solved it setting the RenderToTexture=“true” when the popup was shown and setting it back to false afterwards.

from another post:

Each NativeViewHost creates an always-on-top layer on top of the underlaying GraphicsView. OpenGL and native controls cannot share layers, unfortunately.

https://www.fusetools.com/community/forums/howto_discussions/fusetools_example_-overlay_menu-_how_to_enable_n

@zaulin, you are correct that you can not put stuff on top of a NativeViewHost. You can, however, layer stuff inside of one.

So, @bolav’s use-case appears to be completely valid and, as pointed out, works as expected on iOS.

@uldis, I was using 0.36.0. Tried with 0.36.1 and 0.37.0 as well.

@zaulin, RenderToTexture=“true” is not possible with maps because of DRM.

@bolav I would be more interested in if this worked fine on 0.35 to see if that’s a regression :slight_smile:

Also, it would help a lot to know if it’s just Basic.Button misbehaving or the problem is more wide-spread.

More details means more attention :slight_smile:

I have not tried it before, so I don’t know about earlier versions. I have tried with Panel and other elements as well, and it looks to be to be everything.

@bolav: a ticket has been logged; someone from the team will get back to you after holidays.

Hi Bjørn,

happy to report that the cause of this issue has been found and I’ll update you on the progress when there is any.