@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); options = setupOptions(); LoadingThread.OLD_MODEL_ORIENTATION_FIX = false; MTLOBJLoader.loadFromLocalAssets(getApplicationContext()); dataManager = setupDataManager(); sensorManager = setupSensorManager(); setupScenes(dataManager); arViewPlaceHolder = new RelativeLayout(this); setupUILayout(arViewPlaceHolder); initARViews(); // setup compass setupCompass(); // we create it anyway to show if needed later if ((options & OAARComponentBase.OPTION_HIDE_COMPASS_VIEW) != 0) compassView.setWillNotDraw(true); initScenes(); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); options = setupOptions(); dataManager = setupDataManager(); sensorManager = setupSensorManager(); listView = new ListViewComponent(this, setupAdapter()); listView.addListViewListener( new ListViewComponentListener() { @Override public void onListEvent(SceneData data) { onSceneSelected((OAScene) data); } }); dataManager.addDataListener( new OADataListener() { @Override public void dataUpdate(OADataEvent event) { if (event.getScene() != null) { listView.addItem(event.getScene()); } } }); // load up scenes already in the data manager List<OAScene> initialScenes = dataManager.getSceneList(); for (OAScene scene : initialScenes) { listView.addItem(scene); } // trigger to start loading up new scenes to the data manager setupScenes(dataManager); setupUILayout(listView); }