Godot-Android-Samples icon indicating copy to clipboard operation
Godot-Android-Samples copied to clipboard

Is it possible to combine android studio view (frameLayout) and my Godot UI display?

Open Famouzy opened this issue 1 year ago • 4 comments

Good afternoon. Could you please suggest a solution where I can use View from android studio along with godot scene tree? Let me describe the situation:

I'm trying to combine google map and godot UI (plugin for godot). Using shouldBeOnTop() it is possible to put the map on top, which overlaps the interface created in godot - not suitable. If it specify false - shouldBeOnTop(), then the view goes under the viewport of godot, and it is not visible even if i set all possible flags transparent in the project settings (simply remains black background) when running on android.

Is there a solution where I can combine the google map together with the scene tree or display the view under the UI elements? Thanks.

godot 4.2.1 Android Studio

Famouzy avatar Jan 17 '24 08:01 Famouzy

I used it like that:

    @Override
    override fun shouldBeOnTop(): Boolean {
        return false //rue
    }

    @Override
    override fun onMainCreate(activity: Activity?): View? {
        GoogleMapsApi.layout = FrameLayout(activity!!)

        return GoogleMapsApi.layout
    }

Famouzy avatar Jan 17 '24 08:01 Famouzy

Are you trying to embed Godot view in androdi project or android view in Godot project?

myselfuser1 avatar Jan 26 '24 04:01 myselfuser1

Are you trying to embed Godot view in androdi project or android view in Godot project?

Android view as a plugin with godot view. Ideally, it would be great if i could make the viewport background transparent, but in many of the rendering modes with the right settings and all possible combinations did not work for me. On windows transparency works, on android it doesn't. That's why i need a way to combine plugin android with view and my Godot UI

Famouzy avatar Jan 26 '24 06:01 Famouzy

Check this

myselfuser1 avatar Jan 29 '24 03:01 myselfuser1