vlang / ui

A cross-platform UI library written in V
MIT License
2.32k stars 154 forks source link

android: use os.NativeActivity #466

Closed larpon closed 2 years ago

larpon commented 2 years ago

Fixes this compile error:

v -os android -nocache -cg -d no_load_styles -cc clang -dump-modules "/tmp/v.modules" -dump-c-flags "/tmp/v.cflags" ~/.vmodules/ui/examples/rectangles.v
...
~/Projects/v/vlib/gg/gg_android_outside_termux.c.v:17:53: error: field `os.NativeActivity.assetManager` is not public
   15 |     config := C.AConfiguration_new()
   16 |     activity := &os.NativeActivity(sapp.android_get_native_activity())
   17 |     C.AConfiguration_fromAssetManager(config, activity.assetManager)
      |                                                        ~~~~~~~~~~~~
   18 |     density := C.AConfiguration_getDensity(config)
   19 |     C.AConfiguration_delete(config)