under gluon project how to get the Android assets folder

风格不统一 提交于 2019-12-12 04:39:01

问题


I had creat a gluon project ,then I put some folders and files under assets folder(Android) and I want to read the files in application,now how do I can read the assets folder ? or how do I get the android Context or AssetManager ? under gluon project there is no Activity class or any class extends Activity.I had read all of the gluonMobile API, javaFXports API and developer docs, there is no help! Dose anyone can help me? I nearly got crazy!


回答1:


FXActivity which you obtain via FXActivity.getInstance extends Activity, thus you can call fxActivity.getAssets() to get an instance of AssetManager



来源:https://stackoverflow.com/questions/44416340/under-gluon-project-how-to-get-the-android-assets-folder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!