Multiple libGDX views in one android activity
I am interested in using libGDX in broader Android and iOS apps. The main idea is to implement a common, core library of graphical representations, which can be core games, models, data visualizations, etc.
A simple wired shot below explains the scenario better. Text elements must be inline views in android / iOS - only views 1, 2 and 3 must be rendered by libGDX.
I have tested the ability to add ApplicationListeners as views in Android so far with the code below:
// Create a libGDX view
View view = initializeForView(new ApplicationListenerImpl());
// Add it to the layout
layout.addView(view);
I have some problems with multiple views that might result from shared resources in the libGDX implementation. I couldn't find any helpful resources describing this use of the library.
Optional : performance is of course important. Preferably, libGDX streaming resources should be shared across all views to reduce redundancy. But each view must have its own data and controller.
Is libGDX the right fit for this scenario? Or are alternative libraries better suited for this scenario?
source to share
No one has answered this question yet
Check out similar questions: